Commit 55107998 authored by Łukasz Nowak's avatar Łukasz Nowak

Set price_currency on deliveries.

parent 02ac0896
...@@ -5,10 +5,15 @@ def DeliveryLineSetZeroPriceAndOrUpdateAppliedRule(self): ...@@ -5,10 +5,15 @@ def DeliveryLineSetZeroPriceAndOrUpdateAppliedRule(self):
portal_type = self.getPortalType() portal_type = self.getPortalType()
assert( portal_type in self.getPortalDeliveryMovementTypeList()) assert( portal_type in self.getPortalDeliveryMovementTypeList())
common_specialise = 'sale_trade_condition_module/vifib_trade_condition' common_specialise = 'sale_trade_condition_module/vifib_trade_condition'
specialise = self.getParentValue().getSpecialise() delivery = self.getParentValue()
if common_specialise != specialise: price_currency = 'currency_module/EUR'
self.getParentValue().setSpecialise(common_specialise) if delivery.getPortalType() in ['Purchase Packing List', 'Sale Packing List']:
self.getParentValue().SalePackingList_setArrow() specialise = delivery.getSpecialise()
if common_specialise != specialise:
self.getParentValue().setSpecialise(common_specialise)
delivery.SalePackingList_setArrow()
if delivery.getPriceCurrency() != price_currency:
delivery.setPriceCurrency(price_currency)
self.setPrice(0.0) self.setPrice(0.0)
if self.getSimulationState() == 'cancelled': if self.getSimulationState() == 'cancelled':
# force no simulation # force no simulation
......
...@@ -55,9 +55,13 @@ ...@@ -55,9 +55,13 @@
context.setPrice(0.0)\n context.setPrice(0.0)\n
context.setQuantity(1.0)\n context.setQuantity(1.0)\n
common_specialise = \'sale_trade_condition_module/vifib_trade_condition\'\n common_specialise = \'sale_trade_condition_module/vifib_trade_condition\'\n
specialise = context.getParentValue().getSpecialise()\n sale_order = context.getParentValue()\n
specialise = sale.getSpecialise()\n
if common_specialise != specialise:\n if common_specialise != specialise:\n
context.getParentValue().setSpecialise(common_specialise)\n sale_order.setSpecialise(common_specialise)\n
price_currency = \'currency_module/EUR\'\n
if sale_order.getPriceCurrency() != price_currency:\n
sale_order.setPriceCurrency(price_currency)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
52 53
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment