Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

recuperate fields of budget lines

By
B.hind
on 8/24/16, 6:07 AM 166 views

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'])]}"/>

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/24/16, 6:07 AM
Seen: 166 times
Last updated: 8/24/16, 6:22 AM