l10n-switzerland-flectra/ebill_paynet/models/sale_order.py

18 lines
542 B
Python
Raw Permalink Normal View History

2021-06-30 06:38:22 +00:00
# Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
2021-06-30 06:39:40 +00:00
from flectra import api, fields, models
2021-06-30 06:38:22 +00:00
class SaleOrder(models.Model):
_inherit = "sale.order"
paynet_client_order_ref = fields.Char(compute="_compute_paynet_client_order_ref")
@api.depends("client_order_ref")
def _compute_paynet_client_order_ref(self):
"""Compute the customer reference order to allow for glue module."""
for order in self:
order.paynet_client_order_ref = order.client_order_ref