Commit 1f31d4d6 authored by Romain Courteaud's avatar Romain Courteaud 🐸

slapos_accounting: do not expand packing list if no invoice is supposed to be generated

(aka, no need for slapos_consumption_trade_condition)
parent 1214a69b
if context.getPortalType() == 'Sale Packing List' \
and context.getSpecialise() == 'sale_trade_condition_module/slapos_consumption_trade_condition':
# no rule for consumption
# Do need to generate invoices in case no section are defined
source_section = context.getSourceSection()
destination_section = context.getDestinationSection()
if source_section == destination_section or source_section is None \
or destination_section is None:
return None
return 'default_delivery_rule'
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