Skip to content

[18.0][ADD] account_edi_ubl_cii_payment_unece#1337

Open
sebalix wants to merge 1 commit into
OCA:18.0from
akretion:18-add-account_edi_ubl_cii_unece
Open

[18.0][ADD] account_edi_ubl_cii_payment_unece#1337
sebalix wants to merge 1 commit into
OCA:18.0from
akretion:18-add-account_edi_ubl_cii_unece

Conversation

@sebalix
Copy link
Copy Markdown
Contributor

@sebalix sebalix commented May 6, 2026

Integrate the UNECE payment means (account_payment_unece) with Odoo standard module account_edi_ubl_cii.

@OCA-git-bot OCA-git-bot added series:18.0 mod:account_edi_ubl_cii_unece Module account_edi_ubl_cii_unece labels May 6, 2026
@sebalix sebalix force-pushed the 18-add-account_edi_ubl_cii_unece branch 2 times, most recently from 910c688 to 396a92c Compare May 7, 2026 07:33
@sebalix sebalix marked this pull request as ready for review May 7, 2026 07:37
@sebalix sebalix force-pushed the 18-add-account_edi_ubl_cii_unece branch 2 times, most recently from f0dad94 to 3fd834f Compare May 8, 2026 06:45
Copy link
Copy Markdown
Contributor

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. LG.

Can you rename the module to ` account_edi_ubl_cii_payment_unece´ to remove confusion with the module implementing tax_unece.

Can you also squash fixups?

Comment thread account_edi_ubl_cii_payment_unece/models/account_edi_ubl.py
Comment thread account_edi_ubl_cii_unece/readme/DESCRIPTION.md Outdated
@sebalix sebalix force-pushed the 18-add-account_edi_ubl_cii_unece branch from 3fd834f to d6dfc60 Compare May 11, 2026 07:01
@OCA-git-bot OCA-git-bot added mod:account_edi_ubl_cii_payment_unece Module account_edi_ubl_cii_payment_unece and removed mod:account_edi_ubl_cii_unece Module account_edi_ubl_cii_unece labels May 11, 2026
@sebalix sebalix changed the title [18.0][ADD] account_edi_ubl_cii_unece [18.0][ADD] account_edi_ubl_cii_payment_unece May 11, 2026
@sebalix sebalix requested a review from jbaudoux May 11, 2026 07:10
@jbaudoux
Copy link
Copy Markdown
Contributor

@sbejaoui Can you review this one and, if approved, backport it to v16.0 ?

@jbaudoux
Copy link
Copy Markdown
Contributor

jbaudoux commented May 11, 2026

@sebalix I just tested the module. An account.payment.method cannot be created manually.

Something needs to provide a supplier SEPA direct debit payment method data entry so that it can be configured.

Like this https://github.com/OCA/bank-payment-alternative/blob/18.0/account_payment_sepa_direct_debit/data/account_payment_method.xml but in outbound (name=SEPA Direct Debit for suppliers). I think it make sense to add it in this module. WDYT?

@jbaudoux
Copy link
Copy Markdown
Contributor

jbaudoux commented May 11, 2026

Like this https://github.com/OCA/bank-payment-alternative/blob/18.0/account_payment_sepa_direct_debit/data/account_payment_method.xml but in outbound (name=SEPA Direct Debit for suppliers). I think it make sense to add it in this module. WDYT?

@sebalix We even need 2 data entries as there are 2 UNECE code for direct debit: 59 or 49 https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4461/

@jbaudoux
Copy link
Copy Markdown
Contributor

Tested. Works fine once the missing data entry is added
image

Would also be worth adding a note that the payment methods can be managed by installing the module https://github.com/OCA/bank-payment-alternative/tree/18.0/account_payment_base_oca
Otherwise, you can't configure it properly.

@sebalix
Copy link
Copy Markdown
Contributor Author

sebalix commented May 11, 2026

@jbaudoux yes, that would mean adding UNECE module(s) dependency to such modules (those in OCA/bank-payment-alternative, and also OCA/bank-payment). Or adding new glue module(s) completing the missing unece config on payment methods.

@jbaudoux
Copy link
Copy Markdown
Contributor

@jbaudoux yes, that would mean adding UNECE module(s) dependency to such modules (those in OCA/bank-payment-alternative, and also OCA/bank-payment). Or adding new glue module(s) completing the missing unece config on payment methods.

My idea was to add the data in this module as this doesn't require a new dependency. And for having the menu to configure payment method lines, just add a note in the README (maybe in a separate commit as this is relevant to v18 and not before). I think only OCA/bank-payment-alternative uses the native odoo account.payment.method.line. It's then up to the user to install it or not.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Integrate UNECE Payment Means (module `account_payment_unece` from
`OCA/community-data-files`) with Odoo standard UBL/CII electronic invoices
(module `account_edi_ubl_cii`).
@sebalix sebalix force-pushed the 18-add-account_edi_ubl_cii_unece branch from 85cf1c4 to c5cc136 Compare May 12, 2026 13:07
<odoo noupdate="1">
<record id="direct_debit" model="account.payment.method">
<field name="name">Direct Debit to suppliers</field>
<field name="code">direct_debit</field>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the code you use here, you need to extend the method in AccountPaymentMethod to have the AccountPaymentMethodLine created

class AccountPaymentMethod(models.Model):
    _inherit = "account.payment.method"

    @api.model
    def _get_payment_method_information(self):
        res = super()._get_payment_method_information()
        res["direct_debit"] = {"mode": "multi", "type": ("bank",)}
        res["direct_debit_sepa"] = {"mode": "multi", "type": ("bank",)}
        return res

like here:
https://github.com/OCA/bank-payment-alternative/blob/18.0/account_payment_sepa_direct_debit/models/account_payment_method.py#L41


<record id="direct_debit_sepa_" model="account.payment.method">
<field name="name">SEPA Direct Debit to suppliers</field>
<field name="code">direct_debit_sepa</field>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexis-via As we need different code for sepa direct debit inbound and outbound (because inbound requires a pain version and outbound doesn't - also it is in different modules) and you already used
sepa_direct_debit for inbound and sepa_credit_transfer for outbound, we've put direct_debit_sepa for outbound.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, for SEPA direct debit outbound, the code is "manual", using the native account.payment.method declared in the account module here: https://github.com/odoo/odoo/blob/18.0/addons/account/data/account_data.xml#L135
When there is no bank file to generated, using the account.payment.method with code "manual" is the good implementation for me. You can have several account.payment.method.line that use the same account.payment.method with code "manual".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexis-via The issue is that the unece code is on account.payment.method and there is a unicity constrain per code, payment_type (in/out). So we have to put a different code for each account.payment.method having a different unece code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants