Objective

Multiple set of fixed price list needs to be maintained for wholesale and retail.  Wholesales price are used for OTC whilst retail prices are intended for the website shop.

Setup

  1. Login as administrator then Activate the Developer Mode from About
  2. Add a new column (x_retail_price) for storing the retail price in the table product.template
  3. Modify ​​the view (product.pricelist.item.form) to include this new line
    • <label string=”New Price =”/>
      <div>
               <span attrs=”{‘invisible’:[(‘base’, ‘!=’, ‘list_price’)]}”>Public Price  –  </span>
               <span attrs=”{‘invisible’:[(‘base’, ‘!=’, ‘standard_price’)]}”>Cost  –  </span>
               <span attrs=”{‘invisible’:[(‘base’, ‘!=’, ‘pricelist’)]}”>Other Pricelist  –  </span>
               <span attrs=”{‘invisible’:[(‘base’, ‘!=’, ‘x_retail_price’)]}”>Retail Price  –  </span>
      </div>
  4. Modify the view product.template.common.form to allow input for retail price (x_retail_price)
    • <group name=”group_standard_price”>
         <field name=”list_price” widget=”monetary” options=”{‘currency_field’: ‘currency_id’}”/>
         <label for=”standard_price” groups=”base.group_user” attrs=”{‘invisible’: [(‘product_variant_count’, ‘&gt;’, 1)]}”/>
         <div name=”standard_price_uom” groups=”base.group_user”>
               <field name=”standard_price” widget=”monetary” options=”{‘currency_field’: ‘currency_id’}” class=”oe_inline”/>
          </div>
          <field name=”uom_id” on_change=”onchange_uom(uom_id,uom_po_id)” groups=”product.group_uom”/>
          <field name=”uom_po_id” groups=”product.group_uom”/>
          <field name=”currency_id” invisible=”1″/>
          <field name=”x_retail_price” widget=”monetary” options=”{‘currency_field’: ‘currency_id’}”/>
      </group>
  5. Modify the python code /usr/lib/python2.7/dist-packages/openerp/addons/product/pricelist.py to allow Retail Price entry under the field ‘base’

    ‘base’: fields.selection([(‘list_price’, ‘Public Price’), (‘standard_price’, ‘Cost’), (‘pricelist’, ‘Other Pricelist’),(‘x_retail_price’,’Retail Price’)], string=”Based on”, required=True,

 

Odoo – Multiple fixed price price list