changeset dcd1db71737a in modules/sale_invoice_date:6.4
details:
https://hg.tryton.org/modules/sale_invoice_date?cmd=changeset&node=dcd1db71737a
description:
Return invoice term id as default value
issue11629
review417661003
(grafted from a1d42034b3d1633c1fe06a54a67d6a7f61787f37)
diffstat:
sale.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r eda534ec5e8e -r dcd1db71737a sale.py
--- a/sale.py Mon May 02 17:38:25 2022 +0200
+++ b/sale.py Mon Aug 08 22:18:07 2022 +0200
@@ -105,7 +105,8 @@
pool = Pool()
Configuration = pool.get('sale.configuration')
config = Configuration(1)
- return config.get_multivalue('sale_invoice_term', **pattern)
+ invoice_term = config.get_multivalue('sale_invoice_term', **pattern)
+ return invoice_term.id if invoice_term else None
@fields.depends('party', 'company')
def on_change_party(self):