Add sale_list_price.diff # [sale] Can't convert to currency with list price is null (multicompany)

This commit is contained in:
Raimon Esteve 2019-02-06 16:38:35 +01:00
parent 19e9d95255
commit 2cb6c1bfd0
2 changed files with 23 additions and 0 deletions

21
sale_list_price.diff Normal file
View File

@ -0,0 +1,21 @@
diff -r 656db55c90c0 trytond/trytond/modules/sale/product.py
--- a/trytond/trytond/modules/sale/product.py Sat Jan 26 01:12:51 2019 +0100
+++ b/trytond/trytond/modules/sale/product.py Wed Feb 06 16:31:25 2019 +0100
@@ -1,7 +1,7 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import datetime
-
+from decimal import Decimal
from trytond.model import fields
from trytond.pyson import Eval
from trytond.pool import Pool, PoolMeta
@@ -137,7 +137,7 @@
user = User(Transaction().user)
for product in products:
- prices[product.id] = product.list_price
+ prices[product.id] = product.list_price or Decimal(0)
if uom and product.default_uom.category == uom.category:
prices[product.id] = Uom.compute_price(
product.default_uom, prices[product.id], uom)

2
series
View File

@ -27,3 +27,5 @@ issue7856.diff # [stock] Can't move qty from a parent location to child location
issue8038.diff # [sale_supply_drop_shipment] Crash when process a purchase from purchase request created from a sale
issue8058.diff # [stock_supply_production] Can't create productions from request because exceeds digits limit
sale_list_price.diff # [sale] Can't convert to currency with list price is null (multicompany)