El 16/01/18 a les 11:02, Cato Nano ha escrit:
> I have 2 models, with a relation between them
>
> Much like Sales and SaleLine
>
> Let' s say I have Bolletta and BollettaLine
>
> Some BollettaLine fields are calcolated and they depend on some Bolletta
> fields
>
> How do I do that ?
>
> Also, I' d like to show on the BollettaLine form view some Bolletta fields
>
> I tried this
>
> SomeBollettaField = fields.Many2One('tributi.bolletta', 'Some Bolletta Field')
>
You have to create a function fields which is updated via
on_change_with. For example the product_uom_category [1]on the sale
lines uses the value from the product relation.
[1] http://hg.tryton.org/modules/sale/file/3414b8d97403/sale.py#l1057
--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk
--
You received this message because you are subscribed to the Google Groups
"tryton" group.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tryton/3ca994d0-c373-8282-e666-b9186cab329f%40koolpi.com.