-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
l10n_fr_chorus_account: use _get_commitment_number to be able to retr…
…ieve the right commitment number
- Loading branch information
1 parent
b50587e
commit 4c558ee
Showing
2 changed files
with
30 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,27 @@ | |
# @author: Alexis de Lattre <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from lxml import etree | ||
|
||
from odoo import api, models | ||
|
||
|
||
class AccountMove(models.Model): | ||
_inherit = "account.move" | ||
|
||
def _cii_add_buyer_order_reference(self, trade_agreement, ns): | ||
self.ensure_one() | ||
if self.transmit_method_code == "fr-chorus": | ||
buyer_order_ref = etree.SubElement( | ||
trade_agreement, ns["ram"] + "BuyerOrderReferencedDocument" | ||
) | ||
buyer_order_id = etree.SubElement( | ||
buyer_order_ref, ns["ram"] + "IssuerAssignedID" | ||
) | ||
buyer_order_id.text = self._get_commitment_number() | ||
else: | ||
return super()._cii_add_buyer_order_reference(trade_agreement, ns) | ||
|
||
@api.model | ||
def _cii_trade_contact_department_name(self, partner): | ||
if partner.fr_chorus_service_id: | ||
|