Odoo Help
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.
Purchase discounts at odoo8
Hello, i had installed the module purchase discounts for odoo8, but there is no field for discounts at purchase orders. I was diving on the code of the module, and all seems to be ok. I think perhaps thereis a problem with the view of the module, but i don't find what is wrong. Can anyone confirm if this code is right for odoo8? Thanks
<openerp>
<data>
<record model="ir.ui.view" id="purchase_discount_order_line_form">
<field name="name">purchase_discount.order.line.form</field>
<field name="model">purchase.order.line</field>
<field name="type">form</field>
<field name="inherit_id" ref="purchase.purchase_order_line_form"/>
<field name="arch" type="xml">
<field name="price_unit" position="after"> # I tryed changing this with: <xpath expr="//field[@name='price_unit']" position="after">
<field name="discount"/>
</field> # and changing this to </xpath>
</field>
</record>
<record model="ir.ui.view" id="purchase_discount_order_line_tree">
<field name="name">purchase_discount.order.line.tree</field>
<field name="model">purchase.order.line</field>
<field name="type">tree</field>
<field name="inherit_id" ref="purchase.purchase_order_line_tree"/>
<field name="arch" type="xml">
<field name="price_unit" position="after">
<field name="discount"/>
</field>
</field>
</record>
</data>
</openerp>
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.
RegisterOdoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.
Test it nowQuestion tools
Stats
Asked: 11/13/14, 12:55 PM |
Seen: 1210 times |
Last updated: 3/16/15, 8:10 AM |
I could solve this error. The problem is with model and inherit_id fields for form. The default values that comes with this addon are: model=purchase.order.line inherit_id=purchase.purchase_order_line_form Right values: model=purchase.order inherit_id=purchase.purchase_order_form This addon comes with a bug.
Hi Roberto, please explain your need, you want to add discount to specified suppliers?