|
Hi José,
I believe this function already exists in v.8 .
Use the real price costing method .
to activate it go to Purchase settings and activate the option
contains real and average price then apply.
test it by creating POs for the one product and every new PO
increase or decrease the price and check the product cost price
after each PO confirmation.
Regards,
On 12/01/2014 11:24 PM, José Persichini
wrote:
Update a field in model
product.template when PO is confirmed
Hello, I have Odoo 8 running over Win 7 x64.
I am developing a new module, I have created a class that
inherit from product.template:
from openerp import fields, models
class Product(models.Model):
_inherit = 'product.template'
last_cost_price = fields.Float(digits=(8,2), string="Last
cost price", readonly=True)
When the user confirms a PO, I want to read every line order
and set the unit_price of this order_line in last_cost_price of
the corresponding product.template.
Have I to override wkf_confirm_order() method of purchase_order
class? In this case, how can I access to product.last_cost_price
attribute to edit it?
Thanks!
_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-community
More help : https://help.launchpad.net/ListHelp
|
_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-community
More help : https://help.launchpad.net/ListHelp