OCA / account-financial-tools

Odoo Accountant Financial Tools and Utils
GNU Affero General Public License v3.0
309 stars 752 forks source link

[16.0][IMP] account_move_template: Company compatibility in tests #1887

Closed victoralmau closed 4 months ago

victoralmau commented 4 months ago

Company compatibility in tests

We need to obtain records from the company in question to avoid errors if there is data created in different companies.

odoo.exceptions.UserError: Incompatible companies on records:
- 'AR Line 1' belongs to company 'My Company (San Francisco)' and 'Account' (account_id: '430000 Clientes (euros)') belongs to another company.
- 'AR Line 1' belongs to company 'My Company (San Francisco)' and 'Account if Negative' (opt_account_id: '400000 Proveedores (euros)') belongs to another company.
- 'Income Line 2' belongs to company 'My Company (San Francisco)' and 'Account' (account_id: '768000 Diferencias positivas de cambio') belongs to another company.
- 'Income Line 2' belongs to company 'My Company (San Francisco)' and 'Account if Negative' (opt_account_id: '600000 Compras de mercaderías') belongs to another company.
- 'Income Line 2' belongs to company 'My Company (San Francisco)' and 'Account' (account_id: '768000 Diferencias positivas de cambio') belongs to another company.

@Tecnativa

pedrobaeza commented 4 months ago

Which error?

victoralmau commented 4 months ago

Updated in PR description

OCA-git-bot commented 4 months ago

This PR looks fantastic, let's merge it! Prepared branch 16.0-ocabot-merge-pr-1887-by-pedrobaeza-bump-patch, awaiting test results.

OCA-git-bot commented 4 months ago

Congratulations, your PR was merged at 0c3e00ff876f086484ef954c7b389ef8d626ccfa. Thanks a lot for contributing to OCA. ❤️