[FIX] web_select_all_companies: avoid to add duplicated company ids in context
The result of this bug was to add duplicate company ids in allowed_company_ids context. The side effect of this was to get duplicated lines in self.env['res.currency']._get_query_currency_table() and wrong results in currency_table of account.invoice.report.
...
FROM account_move_line line
LEFT JOIN res_partner partner ON partner.id = line.partner_id
LEFT JOIN product_product product ON product.id = line.product_id
LEFT JOIN account_account account ON account.id = line.account_id
LEFT JOIN product_template template ON template.id = product.product_tmpl_id
LEFT JOIN uom_uom uom_line ON uom_line.id = line.product_uom_id
LEFT JOIN uom_uom uom_template ON uom_template.id = template.uom_id
INNER JOIN account_move move ON move.id = line.move_id
LEFT JOIN res_partner commercial_partner ON commercial_partner.id = move.commercial_partner_id
JOIN (VALUES (1, 1.0, 2),(2, 1.0, 2),(4, 1.0, 2),(1, 1.0, 2),(2, 1.0, 2),(3, 1.0, 2),(4, 1.0, 2)) AS currency_table(company_id, rate, precision) ON currency_table.company_id = line.company_id
...
@santostelmo as the author of this module, could you give a review to this one?
This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖
@santostelmo Is it possible to merge this?
@santostelmo Is it possible to merge this?
@santostelmo Is it possible to merge this?
hbrunn could you please trigger merge ?
/ocabot merge patch
What a great day to merge this nice PR. Let's do it! Prepared branch 16.0-ocabot-merge-pr-3348-by-yvaucher-bump-patch, awaiting test results.
Congratulations, your PR was merged at 2c765770bab046d3aa238260b7f5dd80b300e591. Thanks a lot for contributing to OCA. ❤️