2014-04-09 16:55 GMT+02:00 Guillem Barba Domingo <[email protected]>:

> 2014-04-09 14:29 GMT+02:00 jmartin <[email protected]>:
>
> Hi,
>>
>> I'm trying to add a domain in the product field os sale.line that is
>> filled from the sale.sale form view, in order to avoid make sales of some
>> products grouped by their categories to some parties. This is the code:
>>
>> class SaleLine:
>>     __name__ = 'sale.line'
>>     product_domain = fields.Function(fields.One2Many(
>>             'product.product', None, 'Product Category Domain',
>>             on_change_with=['_parent_party', 'product'],
>>             depends=['_parent_party']),
>>
>
> I'm not sure if it is the problem, but I think this "parent" references
> are wrong, they should be "_parent_sale.party".
> If I'm not wrong :-P the "parent" reference always have to include the
> field that acts as parent relation because a model can have different
> "parents".
>

You are right. But it does not work either. :(


>
> --
> Guillem Barba
> http://www.guillem.alcarrer.net
>



-- 

Jesús Martín

Zikzakmedia SL
Dr. Fleming, 28, baixos
08720 Vilafranca del Penedès
☏ 93 890 21 08

Reply via email to