I developed a custom module with computed fields. When I load the module to production database, nothing happens and I am getting this warning and the bottom line of the log file is:
Storing computed field 'product_total_cost '
Storing computed field 'product_unit_cost_store '
WARNING : Skipping database because of modules to install/upgrade/remove.
The computed fields in the model is as follows:
|
class MrpBomLine(models.Model):
_inherit = 'mrp.bom.line'
product_unit_cost = fields.Float(
related='product_id.standard_price',
string='Maliyet', digits=dp.get_precision('Product Price'),
help="Bom yapısındaki seçili ürünün otomatik hesaplanacak olan birim maliyeti")
product_total_cost = fields.Monetary(
string="Toplam Maliyet", compute='_compute_total_price', store=True, readonly=True,
help="Toplam Ürün Maliyeti")
product_unit_cost_store = fields.Float(
string='Maliyet', digits=dp.get_precision('Product Price'),
compute='_compute_total_price', store=True, readonly=True,
help="Bom yapısındaki seçili ürünün otomatik hesaplanacak olan birim maliyeti")
@api.one
@api.depends('product_id', 'product_qty', 'product_unit_cost')
def _compute_total_price(self):
if self.product_id and self.product_qty and self.product_unit_cost:
self.product_total_cost = self.product_qty * self.product_unit_cost
self.product_unit_cost_store = self.product_unit_cost
My Pivot View:
<record id="bom_line_customization_inherited_pivot_table" model="ir.ui.view">
<field name="name">bom.line.inherited.pivot.table</field>
<field name="model">mrp.bom.line</field>
<field name="arch" type="xml">
<pivot string="Bom Components">
<field name="bom_id" type="row"/>
<field name="product_qty" type="measure"/>
<field name="product_unit_cost" type="measure"/>
<field name="product_total_cost" type="measure"/>
</pivot>
</field>
</record>
Does anyone solve this problem?