Reputation: 23
i am trying to track changes over sale and cost price in odoo 8 by inheriting product.product model and change track visibility of price_list
and standard_cost
but no changes.
any hint please.
models.py:
from openerp.osv import osv, fields, expression
import openerp.addons.decimal_precision as dp
class product_template(osv.osv):
_name = 'product.template'
_inherit = 'product.template'
_columns = {
'list_price': fields.float('Sale Price',track_visibility='onchange', digits_compute=dp.get_precision('Product Price'),
help="Base price to compute the customer price. Sometimes called the catalog price."),
}
Upvotes: 0
Views: 344
Reputation: 1659
For tracking changes, you should add some more options, such as
You should do _inherit = ['mail.thread']
in your model
Secondly, add a chatter option in form view like this
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" help="Follow this project to automatically track the events associated to tasks and issues of this project." groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
Upvotes: 1