Skip to content

Conversation

@myrrkel
Copy link

@myrrkel myrrkel commented Nov 5, 2025

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
...
         

@myrrkel myrrkel force-pushed the 16.0-fix-web_select_all_companies branch from 04dafe9 to a434ba7 Compare November 5, 2025 09:44
@myrrkel myrrkel force-pushed the 16.0-fix-web_select_all_companies branch from a434ba7 to d7c496f Compare November 5, 2025 09:48
@myrrkel myrrkel changed the title [FIX] web_select_all_companies: avoid to add in context duplicated company ids [FIX] web_select_all_companies: avoid to add duplicated company ids in context Nov 5, 2025
@yvaucher yvaucher requested a review from santostelmo November 5, 2025 13:31
@yvaucher
Copy link
Member

yvaucher commented Nov 5, 2025

@santostelmo as the author of this module, could you give a review to this one?

@OCA-git-bot
Copy link
Contributor

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). 🤖

@myrrkel
Copy link
Author

myrrkel commented Nov 18, 2025

@santostelmo Is it possible to merge this?

@santostelmo
Copy link

@santostelmo Is it possible to merge this?

@santostelmo Is it possible to merge this?

hbrunn could you please trigger merge ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants