Il giorno martedì 16 gennaio 2018 11:40:47 UTC+1, Sergi Almacellas Abellana ha 
> 
> 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
> 
> 
> -- 


Thank you Sergi

This is the situation:

bollettaDataCommissione = fields.Function(fields.Many2One('tributi.bolletta',   
  'Data di Commissione'), 'on_change_with_bollettaDataCommissione')

@fields.depends('bolletta')
def on_change_with_bollettaDataCommissione(self, name=None):
    if self.bolletta:
        return self.bolletta.dataCommissione


and I get

can't compare datetime.date to int

-- 
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/5c0dbd6d-78dc-4627-a580-8f78968a1e4c%40googlegroups.com.

Reply via email to