Hi,
I want to check whether it is a bug or design as per initial.
For Product > Configuration > Product, when want to change the value.
It call the below method "set_default_cost_price, with the delete "Property". However, the property is the system created record (xml below).
So whenever want to change the value, system will prevent it due to "System Created Record". In other words, it will forever unable to change this value.
Is it system design or miss on that?
@classmethod
def set_default_cost_price_method(cls, configurations, name, value):
pool = Pool()
Property = pool.get('ir.property')
field = cls._get_product_field('cost_price_method')
properties = Property.search([
('res', '=', None),
])
Property.delete(properties)
if value:
Property.create([{
'value': ',%s' % value,
}])
<data noupdate="1">
<record model="ir.property" id="property_cost_price_method">
<field name="field"
search="[('model.model', '=', 'product.template'), ('name', '=', 'cost_price_method')]"/>
<field name="value">,fixed</field>
</record>
</data>