l10n-switzerland-flectra/ebill_paynet/models/sale_order.py
Raphael Ritter bc2374f0d9 moved to f2
2021-06-30 08:39:40 +02:00

18 lines
542 B
Python

# Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from flectra import api, fields, models
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