Invalid View Definition - Odoo V9 Community
I manage to find a way to have the product price on stock.picking, but now I have a view error. This is my model: from openerp import models, fields, api import openerp.addons.dec
Solution 1:
You are adding price_unity field in view inside pack_operation_product_ids field.
pack_operation_product_ids is a One2many relation type with stock_pack_operation object.
So we need to add/register price_unity field in stock_pack_operation object.
Try with following code:
class StockPackOperation(models.Model):
_inherit = 'stock.pack.operation'
price_unity = fields.Float(string="Precio", store=True, readonly=True, related="product_id.lst_price")
#product_id is already in table so no need to add/register
Afterwards restart Odoo server and upgrade your custom module.
NOTE:
You are not getting error in tree of Stock Picking because you have added/registered price_unity.
Your view code is good.
Post a Comment for "Invalid View Definition - Odoo V9 Community"