[Erp5-dev] MovementGroup - stopped by more complicated problem

Łukasz Nowak lukasz.nowak at ventis.com.pl
Mon Mar 12 15:56:08 CET 2007


Hello,

I'm responding to myself. Maybe someone in future will get on same path 
as mine, and my response will solve her/his problem. Of course solution 
provided by me is not perfect, but it (a) works, (b) it is easy, (c) it 
is simple to unit test.

Łukasz Nowak napisał(a):
> Hello,
(...)

I modified ERP5 system to "glue" many Sale Order into one Sale Packing 
List. But my Sale Packing List portal type hadn't TradeCondition 
portal_type associated, as well Payment Condition in allowed content 
types. So my MovementGroup class wasn't able to find 
default_payment_condition_* on Sale Packing List, so it was reverting to 
getCausality object. Well, I still do not understand MovementGroup 
system good enough, but it was always splitting.

To solve it I added Trade Condition Property Sheet to Sale Packing List, 
Payment Condition to allowed content type to Sale Packing List and 
sale_packing_list_builder was instructed to copy Payment Condition 
related values from Sale Order do Sale Packing List, and then Movement 
Group was able to compare simulation movements.

I *think* that it is possible to resolved this issue without 
coping/adding Payment Condition related values from Sale Order to Sale 
Packing List, but I see that such simple solution is more generic and 
easier to understand. Besides I've seen on MovementGroup class, that 
other movement groups are using same scenario.

End of transmission,
Luke

-- 
Łukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...''



More information about the Erp5-dev mailing list