Files
odoo_source/addons/account/wizard
Julien Van Roy af69310b38 [IMP] account[_edi_ubl_cii]: new setting to uncheck the UBL/CII formats by default
Currently, the UBL/CII format (if enabled on the invoice) is checked by
default, which will trigger the validation checks upon generation. This
can be annoying (feedback: "error message when we want to send invoices
to customer. For some customer, there is a problem with the xml file. To
be able to send the invoice, we uncheck the box for the xml invoice. See
video:
https://drive.google.com/file/d/12IkhqQtHw0EUF3srqRX8uZjCXU2DYpns/view?usp=sharing)

To solve the issue, we add a new field `invoice_is_ubl_cii` to check or
uncheck the UBL/CII checkbox by default.

In addition, rename the field `invoice_is_print` to
`invoice_is_download` since it corresponds to the checkbox 'Download'.

Finally, make the `company_id` of account.move.send a computed field
instead of using the `_default_get`. Indeed, when creating the wizard
and passing a `move_ids` key, this key will not be detected as missing
by the `default_get`, and we will not enter the statement in the
`default_get` in `account_move_send.py` to set the `company_id`. As a
consequence, the `company_id` will not be set, and the subsequent
computed fields will not be correct (e.g.
`wizard.company_id.invoice_is_ubl_cii` will always be False inside
`_compute_checkbox_ubl_cii_xml` if `company_id` is not set).

task-3297308

closes odoo/odoo#119397

Related: odoo/upgrade#4581
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-12 19:54:42 +02:00
..