Odoo Help


Replace sales_price with cost_price in product list

Scott Hart
on 2/19/16, 7:32 AM 835 views

Is there a way to edit the internal product list to show cost and not sales price? We don't use sales price, because we use cost + formulation, so it doesn't factor into our equation. Basically replace sales_price with cost_price.

William Brugger
On 2/19/16, 2:08 PM

Perhaps you could be more specific in what you are trying to accomplish by using an example?  But to hazard a guess,  it seems you need to create a pricelist that will handle the equation for you.  A pricelist will look at either cost, sale price or event other pricelists, and then create a new sales price based on a computation (fixed, percentage or formula).

If you have already done this and you'd just like to prevent certain users from seeing certain fields you can accomplish this with permissions.  I believe you can restrict the user groups that can see a certain field or group of fields by inheriting the view in question and adding permissions to the field(s).   For example, in the calendar event form you can find this:

  <page string="Invitations" groups="base.group_no_one">

 This restricts everyone but the admin from seeing this.  

Thank you William. Here is my desired outcome: 1st, we have a Purchase Pricelist that adds % onto Supplier cost, that we don't want the salesman to see. This % markup pays for the warehouse functions, so I don't want them thinking there is extra money to be had in the commision structure. Example: Product "x" costs $10. PAD is 15%. I would only like to allow the salesman to see only the $11.50 calculated cost. 2nd, I'd like the products list/tree (sales > products) to only show the calculated cost_price + the above mentioned calculated cost. Currently Odoo only shows the sales_price and I'd like to replace that value with what I had suggested. Obviously, each customer/ product category would have their individual pricelists which would calculate under quotations/ invoices.

Scott Hart
on 2/20/16, 7:21 AM

I guess if I use , how can I replace the viewable "sales_price" with "cost_price" on the product view? It's basically when you view the products on block, not the list.

Scott Hart
on 2/20/16, 7:23 AM
Scott Hart
On 2/19/16, 7:48 AM

Technically, I'd like to only show cost_price + purchase pricelist, so the salesman will never view received cost.

So it seems you want your formulated cost to show up as the cost on the product page? And you want to be able to enter the real cost $10 into the Cost field and have it appear as $11.50 to the sales reps? If you don't have a lot of products, you could the calculation yourself (i.e. just enter 11.50) If you have a lot, you could set up a Bill of Materials for the products. This is were you would put the PAD. This method is probably too complicated for a simple 15% increase, but there is an app called product_extended that calculates a products cost based on BOM. Probably the easiest way to do this is to extend sale module and create a calculated field (i.e. my_real_cost) that would grab the value you entered in cost and multiply it by 1.15%. There is a lot of documentation on how to do this. Then remove the cost field from the tree view and make in the form view make sure only you can see it by adding groups="base.group_no_one" to the cost field. This will hide the field from everyone but the admin. If you want others to see it, you can use a group that your sales_reps aren't in. Also, be sure to add the calculated field "my_real_cost" to both the form and tree views. Also, that field in form view should be readonly.

Amy Kuschel Bride, William Brugger
on 2/20/16, 2:39 PM

Hello Amy. Thank you for your response. We aren't calculating anything complicated. It's simply a base of 12.5% globally. Didn't want to go into BOM module because that's a lot of steps I don't need to jump through. Maybe I'm wrong.

Scott Hart
on 2/20/16, 9:57 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: 2/19/16, 7:32 AM
Seen: 835 times
Last updated: 2/19/16, 2:08 PM