Skip to content

Commit 4e1e57c

Browse files
committed
[FIX] account_edi_ubl_cii: revert mandatory buyer ref sending rechnung
This commit reverts 5594b08 because while buyer reference is mandatory for B2G it is not for B2C and B2B: "The buyer reference must be indicated on every electronic invoice to public contracting authorities of the federal administration." https://en.e-rechnung-bund.de/e-invoicing-faq/buyer-reference/ opw-4460079 closes odoo#202790 X-original-commit: 280b731 Signed-off-by: Antoine Dupuis (andu) <[email protected]> Signed-off-by: Guillaume Teboul-Tornezy (gute) <[email protected]>
1 parent e0584a7 commit 4e1e57c

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

addons/account_edi_ubl_cii/models/account_edi_xml_ubl_xrechnung.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def _export_invoice_constraints(self, invoice, vals):
3333
constraints.update({
3434
'bis3_de_supplier_telephone_required': self._check_required_fields(vals['supplier'], ['phone', 'mobile']),
3535
'bis3_de_supplier_electronic_mail_required': self._check_required_fields(vals['supplier'], 'email'),
36-
'bis3_de_buyer_reference_required': self._check_required_fields(vals['customer'], 'ref'),
3736
})
3837

3938
return constraints

addons/l10n_account_edi_ubl_cii_tests/tests/test_xml_ubl_de.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -297,37 +297,3 @@ def test_import_export_invoice_xml(self):
297297
self._detach_attachment(attachment)
298298
created_bill.message_post(attachment_ids=[attachment.id])
299299
self.assertTrue(created_bill)
300-
301-
def test_ensure_buyer_reference_xrechnung_xml(self):
302-
acc_bank = self.env['res.partner.bank'].create({
303-
'acc_number': 'BE15001559627232',
304-
'partner_id': self.company_data['company'].partner_id.id,
305-
})
306-
307-
self.partner_1.ref = False
308-
invoice = self._generate_move(
309-
self.partner_1,
310-
self.partner_2,
311-
move_type='out_invoice',
312-
partner_id=self.partner_1.id,
313-
partner_bank_id=acc_bank.id,
314-
invoice_date='2017-01-01',
315-
date='2017-01-01',
316-
invoice_line_ids=[{
317-
'product_id': self.product_a.id,
318-
'product_uom_id': self.env.ref('uom.product_uom_dozen').id,
319-
'price_unit': 275.0,
320-
'quantity': 5,
321-
'discount': 20.0,
322-
'tax_ids': [(6, 0, self.tax_19.ids)],
323-
}],
324-
)
325-
326-
with self.assertRaises(UserError):
327-
self.env['account.move.send'].with_context(
328-
active_model='account.move',
329-
active_ids=invoice.ids,
330-
).create({
331-
'checkbox_download': False,
332-
'checkbox_send_mail': False,
333-
}).action_send_and_print()

0 commit comments

Comments
 (0)