CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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!
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
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 :
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((-1, _('Other Pricelist')))
result.append((-2, _('Supplier Prices on the product form')))
'base': fields.selection(_price_field_get, 'Based on', required=True, size=-1, help="Base price for computation."),
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.
About This Community
Odoo Training Center
|Asked: 3/12/15, 3:44 PM|
|Seen: 1028 times|
|Last updated: 3/16/15, 8:10 AM|