Ir al contenido
Menú
Se marcó esta pregunta
3047 Vistas

hi,

please help me i want to recuperate some fields of budget line like :' bugdet_line_amount ', 'budget_lines_cosummed1'

depends to 'account_id' i dont know how to solve it , i had try this but is'nt work i get just 'account_id' my code :

models.py

credit_inscrit=fields.Many2one('m_gov.account.budget.line', string='Crédit inscrit')

depense_anterieure=fields.Many2one('m_gov.account.budget.line',string='Dépense Antérieure')


credit =""

budget = self.env['m_gov.account.budget'].search([('id','=',self.budget_id.id),])

for line in budget.budget_lines_ids:

if line.account_id == self.compte_id:

self.credit_inscrit = line.budget_line_amount

views.xml

<field name="credit_inscrit" attrs="{'invisible': [('order_nature','in',['OI','OR'])]}"/>

<field name="depense_anterieure" attrs="{'invisible': [('order_nature','in',['OI','OR'])]}"/>

 

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
jul 17
9732
2
jul 17
3885
1
jul 16
4942
0
jun 16
3006
0
ago 17
3113