Update cost_price and list_price instead on just cost_price after a product purchase

Dear community

Since template cost_price is updated on any product purchase and stock in, and template price_list is user in value, a user requirement uses price lists feature in order to calculate prices, however this calculation uses price list, but since purchase update template cost_price, my customer requires to use it. I have done an implementation on tryton 4.2 on update_product_cost_price on stock.move module, but on tryton 5.0, this method is no used anymore.

I was looking for a solution and I have find the set_cost_value method, but, since it is using a mixing, I couldnt find a way to solve it on a customer module customization.

Any suggest?


Since Issue 8467: Allow cost_price as price_list formula - Tryton issue tracker you can use the product cost price in the price list formula.


I have read it, but my question is on wich tryton version. I am using 5.0, and I have try to use


But tryton says me: cost_price is undefined for the expresion. I will code lines and updates but any help is ok


I don’t know in wich version was introduced that change but you can look for wich part of code defines that expression and implement it in your code at least you upgrade the version. This is a bad practice very used by us.

1 Like

@jeromarquez that is What I want to avoid to do :smiley:

So you need to upgrade your server, dbs and customized modules… a lot of work, jeje.

I mean: “No touch core tryton or core tryton modules code”

I usually prefer extend functionality on modules, but this change is required to do on the tryton core modules ( product_price_list ), that is the reason on asking the version in order to use the core patch to update my current version.

As you said on a previous comment, probably the current solution is apply the change on a manual edition to the product_price_list.price_list module and keep it on mind to the next upgrade.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.