Commit 38142b4c authored by Vincent Pelletier's avatar Vincent Pelletier

Revert "erp5_pdm: It is never the good solution to delete matrix cells directly."

This reverts commit ec926ea5.

This commit is still experimental, it was not supposed to be part of
this push.
parent ec926ea5
supply_line = state_change['object']
supply_line.updateQuantityPredicate(
'slice_base_price'
if supply_line.isBasePricePerSlice() else
'base_price'
)
to_delete_cell_list = [
cell for cell in supply_line.getCellIdList(base_id='path')
if hasattr(supply_line, cell)
]
supply_line.manage_delObjects(ids=to_delete_cell_list)
if state_change.kwargs['workflow_method_args'][0]:
price_parameter = 'slice_base_price'
else:
price_parameter = 'base_price'
supply_line.updateQuantityPredicate(price_parameter)
supply_line.updateCellRange(base_id='path')
for cell_value in supply_line.getCellValueList(base_id='path'):
# XXX: only to trigger supply_cell_interaction_workflow/scripts/SupplyCell_updateSliceBasePrice
cell_value.setBasePrice(cell_value.getBasePrice())
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