Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 16.0 & add 16.0-negative-unit-price-hook #2

Merged
merged 5 commits into from
Mar 8, 2024

Conversation

houzefa-abba
Copy link
Member

houzefa-abba and others added 5 commits December 14, 2023 09:19
This avoids conflicts when tests of the `account_invoice_facturx` module
run on a DB where `account_banking_sepa_direct_debit` (OCA/bank-payment)
is also installed.

In its demo data, `account_banking_sepa_direct_debit` changes the
payment method of the partner used in this test to a SEPA one which has
no UNECE code by default (guess it should have one, but that's another
issue).

The same partner is used in this test; leads to error:
```
ERROR: TestFacturXInvoice.test_deep_customer_invoice
Traceback (most recent call last):
  File "/opt/odoo/lib/python3.10/site-packages/odoo/addons/account_invoice_facturx/tests/test_facturx_invoice.py", line 93, in test_deep_customer_invoice
    xml_bytes, fx_level = self.invoice.generate_facturx_xml()
  File "/opt/odoo/lib/python3.10/site-packages/odoo/addons/account_invoice_facturx/models/account_move.py", line 871, in generate_facturx_xml
    self._cii_add_trade_settlement_block(trade_transaction, ns)
  File "/opt/odoo/lib/python3.10/site-packages/odoo/addons/account_invoice_facturx/models/account_move.py", line 498, in _cii_add_trade_settlement_block
    raise UserError(
odoo.exceptions.UserError: Missing UNECE code on payment method '[sepa_direct_debit] SEPA Direct Debit for customers (inbound)'
```
This allows negative unit prices in specific cases.
@vincent-hatakeyama vincent-hatakeyama merged commit 1ad8172 into xcg/16.0 Mar 8, 2024
@vincent-hatakeyama vincent-hatakeyama deleted the xcg/16.0-merge-request branch March 8, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants