-
- Downloads
[FIX] account: enforce contraint on required field for cash rounding
Steps to reproduce: - install l10n_be (company B) - stay on Company A and create a cash rounding - Go to Company B and create an invoice - In Other Infos > Cash Rouding Method, set it to the earlier created one - Save Issue: You won't be able to save. But the message is too generic to know what is the cause of it "Missing required account on accountable invoice line." Cause: The field `profit_account_id` is company_dependent. Therefore, the same cash rounding record will be accessible in both companies but in Company B the `profit_account_id` won't be set. When Saving, we compute a cash difference (rounding) and try to create a new line for it. But since there is no account set, the sql constraint will be raised. Solution: The less dirty solution is to have an onchange that check that whenever we want to set a cash rounding method, it has all the required fields set opw-3185950 closes odoo/odoo#122949 X-original-commit: 2092e8a76024ee1a818cc58e5675f5b0fa3037b6 Signed-off-by:Josse Colpaert <jco@odoo.com> Signed-off-by:
Yolann Sabaux (yosa) <yosa@odoo.com>
Loading
Please register or sign in to comment