Odoo Help


Purchase discounts at odoo8

Roberto Barreiro
on 11/13/14, 12:55 PM 1,210 views

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

        <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>
        <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"/>



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.

Roberto Barreiro
on 12/11/14, 2:04 AM

Hi Roberto, please explain your need, you want to add discount to specified suppliers?

Baiju KS
on 12/11/14, 2:05 AM

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 11/13/14, 12:55 PM
Seen: 1210 times
Last updated: 3/16/15, 8:10 AM