From 070c2853956c97bd64aac6abe0e208ef11ef8d3d Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Mon, 3 May 2021 15:17:13 +0000 Subject: [FIX] *: avoid cutting 0.0 value in first row Have in a purchase order a first row with unit price 0 Export the PO adding unit price in the list of fields to export The unit price is not reported This occur because the first line of the order lines is meld with the purchase order line but in the process the 0.0 values is discarded opw-2510917 closes odoo/odoo#70355 X-original-commit: 242bf5024ce6ae9c32176cd1a65a4f57a242dd45 Signed-off-by: agr-odoo --- odoo/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'odoo') diff --git a/odoo/models.py b/odoo/models.py index ff34e09f754..d77c22f4dad 100644 --- a/odoo/models.py +++ b/odoo/models.py @@ -911,7 +911,7 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})): if lines2: # merge first line with record's main line for j, val in enumerate(lines2[0]): - if val or isinstance(val, bool): + if val or isinstance(val, (int, float)): current[j] = val # append the other lines at the end lines += lines2[1:] -- cgit v1.2.3