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 new to Odoo, so I want to hear suggestions from you guys please.
For some reasons we want to add supplier's name to our sale order (and potentially more fields from the purchase module), how can I do that?
I was trying to do it from the GUI, so I went to Settings-->Technical-->Database Structure-->Models (sale.order), added a field called x_Supplier, set it to Many2One, set Object Relation to res.partner.
Could some of you experienced users let me know what am I missing?
Thanks in advance!
To add a field to a Qweb view from the GUI, you should go to Settings/Technical/Reports/Reports and then :
Search for 'sale.order' report,
Click on the link "Search for Qweb Views",
Open the view named : report_saleorder_document,
In the view, choose th place you want to insert your new field (x_Supplier)
For example, to insert it after the Saleperson name, add this code after the div of Salepersonn
<div t-if="o.x_Supplier" class="col-xs-3">
Save the view.
Test by printing a Sale order .
Hope it helps
Thank you Laurent OLIVIER. I've tried that, but it did not work..
I wanted to add next to the product description in the table, so I did below:
When I tested it, the Supplier header showed up, but it's blank. I guess the o.x_Supplier didn't work?
<table class="table table-condensed">
<tr t-foreach="o.order_line" t-as="l">
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: 11/29/16, 5:44 PM|
|Seen: 622 times|
|Last updated: 11/30/16, 11:25 PM|