Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I'm very new in python and odoo so I need a help.
In project>task module I've added a selection field which for select customer. now I need when I select a customer then his products will show in a tab.
can anyone help me please.
<record id="view_task_form2_inherited" model="ir.ui.view">
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<field name="reviewer_id" position="after">
<field name="customer" />
<field name="products" />
from openerp import api, fields, models
_inherit = "project.task"
customer = fields.Many2one('res.partner', string="Search Customer Name")
products = fields.One2many('product.template', compute='_get_products', string="Products")
order_line_list = self.env['sale.order.line'].search([('name.id','=',self.order_partner_id.id)])
ol_list = 
for partner in order_line_list:
prod = self.env['product.template'].browse(ol_list)
self.products = prod
I want: From selection field when a customer will be selected then his bought product will show in a tab below.
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 platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 3/3/16, 3:11 AM|
|Seen: 323 times|
|Last updated: 3/7/16, 7:38 AM|