Generated commissions when invoice line product is empty

22 views
Skip to first unread message

Sergi Almacellas Abellana

unread,
May 10, 2017, 11:40:25 AM5/10/17
to try...@googlegroups.com
Hi All,

I strange behaviour with the comissions generated from an invoice with a
mix of lines with products and without products.

Our comission plan contains three lines:

- One for category A
- One for category B
- Another for all the others.

When generating the commissions of this invoice, the lines with product
work correctly as they match depending on the product category, but the
line without product always matches the first line of the plan. Which is
at least something strange.

I'm not sure which will be the expected behavior on this case. Any ideas?


--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Cédric Krier

unread,
May 10, 2017, 12:35:06 PM5/10/17
to try...@googlegroups.com
On 2017-05-10 17:40, Sergi Almacellas Abellana wrote:
> Hi All,
>
> I strange behaviour with the comissions generated from an invoice with a mix
> of lines with products and without products.
>
> Our comission plan contains three lines:
>
> - One for category A
> - One for category B
> - Another for all the others.
>
> When generating the commissions of this invoice, the lines with product work
> correctly as they match depending on the product category, but the line
> without product always matches the first line of the plan. Which is at least
> something strange.
>
> I'm not sure which will be the expected behavior on this case. Any ideas?

I think it is a wrong behaviour because in Plan.compute the pattern for
product is set only if there is a product. But I think it should be set
to None if no product is passed.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Sergi Almacellas Abellana

unread,
May 11, 2017, 4:04:12 AM5/11/17
to try...@googlegroups.com
El 10/05/17 a les 18:32, Cédric Krier ha escrit:
> On 2017-05-10 17:40, Sergi Almacellas Abellana wrote:
>> Hi All,
>>
>> I strange behaviour with the comissions generated from an invoice with a mix
>> of lines with products and without products.
>>
>> Our comission plan contains three lines:
>>
>> - One for category A
>> - One for category B
>> - Another for all the others.
>>
>> When generating the commissions of this invoice, the lines with product work
>> correctly as they match depending on the product category, but the line
>> without product always matches the first line of the plan. Which is at least
>> something strange.
>>
>> I'm not sure which will be the expected behavior on this case. Any ideas?
> I think it is a wrong behaviour because in Plan.compute the pattern for
> product is set only if there is a product. But I think it should be set
> to None if no product is passed.
Ok, so I opened https://bugs.tryton.org/issue6501 in order to fix it.

Thanks.
Reply all
Reply to author
Forward
0 new messages