Commit b711b12c authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: only automate packing list with automated ledger

parent 000f7f8d
......@@ -17,17 +17,11 @@ accounting_date = params.get('accounting_date', DateTime().earliestTime())
portal = context.getPortalObject()
trade_condition_uid_list = [portal.restrictedTraverse(portal.portal_preferences.getPreferredAggregatedSaleTradeCondition()).getUid()]
trade_condition_uid_list.extend([
i.uid for i in portal.ERP5Site_searchRelatedInheritedSpecialiseList(
specialise_uid=trade_condition_uid_list,
validation_state="validated")])
portal.portal_catalog.searchAndActivate(
portal_type='Sale Packing List',
simulation_state='confirmed',
causality_state='solved',
specialise_uid=trade_condition_uid_list,
ledger__uid=portal.portal_categories.ledger.automated.getUid(),
method_id='Delivery_startConfirmedAggregatedSalePackingList',
activate_kw={'tag': tag},
**{'delivery.start_date': Query(range="max",
......
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