amount_generator: refresh "Trade Model" view on deliveries and delivery lines
It's been a few years since getAggregatedAmountList should be called on the delivery or the movement, and a single form for both levels is enough.
This commit also adds a form to view non-aggregated amounts. We still have to decide where to put a link to view it: a new tab would be too much. For this
form, it would be also interesting to add a column to the delivery/movement being processed (currently, a private
_base attribute on each amount).
Rows don't link anywhere. This could be changed to jump the
causality object (e.g. Trade Model Line).
At last, maybe erp5_base or erp5_simulation would be a better place than erp5_trade for these forms, except that it's not trivial to move because they use
- in contribution/application columns, display variations
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/DeliveryLine_viewAggregatedAmountList/listbox.xml → bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_viewAggregatedAmountList/listbox.xml
92 112 </tuple> 93 113 <tuple> 94 114 <string>resource_title</string> 95 <string>Model</string> 115 <string>Resource</string>
Usually in erp5_trade, the glossary term is Product or Service, not Resource
I prefer Resource because these forms are:
- generic, i.e. not specific to trade, and we may have other type of resources
- somewhat technical and this should be clear for people using them
Looks good, but I could not figure a few things:
Base_viewGeneratedAmountListis not used, is it ?
- What is difference between Generated amount and Aggregated amount ? I tried to read amount_generator interface ( https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5/interfaces/amount_generator.py ) but it is not clearly stated. Is "generated amount" just the intermediate results of getAggregatedAmountList where two amounts that should be grouped together are not yet grouped in one amount but are still two separate amount ?
Base_viewGeneratedAmountList is not used, is it ?
... I understand after reading again the MR description