two class has same field name ('name')
when i inherit these two class into new class it show
if field_name and field_name not in self._fields:
TypeError: unhashable type: 'list'
is there any way to solve?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
two class has same field name ('name')
when i inherit these two class into new class it show
if field_name and field_name not in self._fields:
TypeError: unhashable type: 'list'
is there any way to solve?
Hello,
_name is used to define object like account.invoice, sale.order, purchase.order, res.users.
You have to define name field in your columns, If you don't define name field in column than need to define field in _rec_name.
For more info please refer the below link.
http://dirtyhandsphp.blogspot.in/2014/09/odooopenerp-recname-and-nameget.html
Thanks.
class StockMove(osv.osv):
_name = 'mrp.stockmove'
_inherit = ['stock.move', 'ir.attachment']
_columns = {
'production_id': fields.many2one('mrp.production', 'Production Order for Produced Products', select=True, copy=False),
'raw_material_production_id': fields.many2one('mrp.production', 'Production Order for Raw Materials', select=True),
'consumed_for': fields.many2one('mrp.stockmove', 'Consumed for', help='Technical field used to make the traceability of produced products'),
}
def check_tracking(self, cr, uid, move, lot_id, context=None):
.....................................
.............................
In these two inherited class has 'name' field
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
can you put your code here ? It is easy to resolve.
Why dont you change one of them