Odoo Help


Purchase pricelist

Francine Maltais
on 3/12/15, 3:44 PM 1,146 views

Hello all

I started on Odoo and I need your help

I work on my purchase pricelits and I would like to ensure that it is based "Supplier Prices on the product form" for my Price List Items

My XML, when I want to have as based on "Public sale price" I use "product.standard_price" but I do not know what to use for "Supplier Prices on the product form"

Could someone tell me where I could find it?

Thank you very much for your help!

Francine Maltais
On 3/12/15, 9:11 PM

Thank you for your help

I managed to solve my problem thanks to your advice.

Here is my XML file for my price list rule is functional as I wanted

<record id="purchase.item4" model="product.pricelist.item">
            <field name="price_version_id" ref="purchase.ver4" />
            <field name="name">Default purchase rule - PT</field>
            <field name="company_id" type="int">1</field>
            <field name="base" eval="-2"  />

Thank you again


Cyril Gaspard (GEM)

--Cyril Gaspard (GEM)--

| 5 6 8
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Cyril Gaspard (GEM)
On 3/12/15, 5:35 PM


there is no xml_id for this item :

field base is a field type selection and also a field function, the base price "Supplier Prices on the product form" is always add in the base field selection with value -2, see the function used for that (v8) in module product, file pricelist.py :

class product_pricelist_item(osv.osv):
    def _price_field_get(self, cr, uid, context=None):
        pt = self.pool.get('product.price.type')
        ids = pt.search(cr, uid, [], context=context)
        result = []
        for line in pt.browse(cr, uid, ids, context=context):
            result.append((line.id, line.name))

        result.append((-1, _('Other Pricelist')))
        result.append((-2, _('Supplier Prices on the product form')))
        return result

'base': fields.selection(_price_field_get, 'Based on', required=True, size=-1, help="Base price for computation."),




Pascal Tremblay

--Pascal Tremblay--
| 5 3 7
Alma, Canada
--Pascal Tremblay--

Pascal Tremblay
On 3/12/15, 4:37 PM


I think you could try something like this :

        <record id="purchase.item3" model="product.pricelist.item">
            <field name="price_version_id" ref="purchase.ver3" />
            <field name="name">Default purchase rule - ES</field>
            <field name="company_id" type="int">4</field>
            <field name="base" val="-2" />

In my table product.pricelist.item, when I put an item « based on supplier price » this is the value I get (-2) in the field « base ». Si id 138 in image below.

I bet we could put an external ID rather than -2... but which external ID?

Pascal Tremblay
on 3/12/15, 4:38 PM

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

1 follower(s)


Asked: 3/12/15, 3:44 PM
Seen: 1146 times
Last updated: 3/16/15, 8:10 AM