mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
Add stock_sync_outgoing_unit_price.diff # [stock] set unit price 0 when product list price is null
#037036
This commit is contained in:
parent
3c9584db1a
commit
1ee6d9263f
1
series
1
series
|
@ -18,6 +18,7 @@ purchase_request.diff # [purchase_request] as shippment_date it's not required w
|
||||||
issue4482.diff # [stock] stock inventory misses company access rule
|
issue4482.diff # [stock] stock inventory misses company access rule
|
||||||
search_warehouse.diff #[stock] search function for warehouse.
|
search_warehouse.diff #[stock] search function for warehouse.
|
||||||
improve_performance_on_try_assign.diff # [stock] change browse of product to get default_uom to pysql
|
improve_performance_on_try_assign.diff # [stock] change browse of product to get default_uom to pysql
|
||||||
|
stock_sync_outgoing_unit_price.diff # [stock] set unit price 0 when product list price is null
|
||||||
|
|
||||||
issue240_631.diff # [stock_lot] stock_by_locations get all locations with that lot.
|
issue240_631.diff # [stock_lot] stock_by_locations get all locations with that lot.
|
||||||
issue10467.diff # stock_lot: add lot to grouping if lot it's required on product
|
issue10467.diff # stock_lot: add lot to grouping if lot it's required on product
|
||||||
|
|
20
stock_sync_outgoing_unit_price.diff
Normal file
20
stock_sync_outgoing_unit_price.diff
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
diff -r 01ad0c7e627f trytond/trytond/modules/stock/shipment.py
|
||||||
|
--- a/trytond/trytond/modules/stock/shipment.py Mon Feb 25 15:12:20 2019 +0100
|
||||||
|
+++ b/trytond/trytond/modules/stock/shipment.py Mon Feb 25 15:13:34 2019 +0100
|
||||||
|
@@ -5,6 +5,7 @@
|
||||||
|
import functools
|
||||||
|
import datetime
|
||||||
|
from collections import defaultdict
|
||||||
|
+from decimal import Decimal
|
||||||
|
|
||||||
|
from sql import Table, Null
|
||||||
|
from sql.functions import Overlay, Position
|
||||||
|
@@ -1329,7 +1330,7 @@
|
||||||
|
if not out_quantity:
|
||||||
|
continue
|
||||||
|
unit_price = Uom.compute_price(move.product.default_uom,
|
||||||
|
- move.product.list_price, move.uom)
|
||||||
|
+ move.product.list_price or Decimal('0'), move.uom)
|
||||||
|
to_create.append(shipment._get_outgoing_move(move))
|
||||||
|
to_create[-1].quantity = out_quantity
|
||||||
|
to_create[-1].unit_price = unit_price
|
Loading…
Reference in a new issue