[FIX] account_edi_ubl_cii: remove old bronnoysund constraint
In saas-16.2, the `peppol_endpoint` and `peppol_eas` fields were added on the partner. These fields are used to fill the `<cbc:EndpointID` node. Before that, we had to map every localization specific field to this node. For instance, with the norvegian "Bronnoysund" field (see: [1]). To ensure the node was filled, a constraint was checking the existence of this field. Now that we have the `peppol_endpoint` and `peppol_eas`, we no longer have to require the bronnoysund to be filled. [1] https://github.com/odoo/odoo/blob/saas-16.1/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py#L119 opw-3763725 closes odoo/odoo#155901 X-original-commit: 6827d6a5d0c213f11cae92655cfe015cae56b8fa Signed-off-by: Laurent Smet (las) <las@odoo.com> Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
This commit is contained in:
@@ -423,18 +423,5 @@ class AccountEdiXmlUBLBIS3(models.AbstractModel):
|
||||
'no_r_001': _(
|
||||
"The VAT number of the supplier does not seem to be valid. It should be of the form: NO179728982MVA."
|
||||
) if not mva.is_valid(vat) or len(vat) != 14 or vat[:2] != 'NO' or vat[-3:] != 'MVA' else "",
|
||||
|
||||
'no_supplier_bronnoysund': _(
|
||||
"The supplier %s must have a Bronnoysund company registry.",
|
||||
vals['supplier'].display_name
|
||||
) if 'l10n_no_bronnoysund_number' not in vals['supplier']._fields or not vals['supplier'].l10n_no_bronnoysund_number else "",
|
||||
})
|
||||
if vals['customer'].country_id.code == 'NO':
|
||||
constraints.update({
|
||||
'no_customer_bronnoysund': _(
|
||||
"The supplier %s must have a Bronnoysund company registry.",
|
||||
vals['customer'].display_name
|
||||
) if 'l10n_no_bronnoysund_number' not in vals['customer']._fields or not vals['customer'].l10n_no_bronnoysund_number else "",
|
||||
})
|
||||
|
||||
return constraints
|
||||
|
||||
Reference in New Issue
Block a user