The following Code is :---
class prakrutiTemplate(models.Model):
_inherit = 'product.template'
pm_name = fields.One2many('packing.material.line','name',string= 'PName', store=True)
ps_name = fields.One2many('product.specification.line','name',string= 'PSName', store=True)
def _get_product_template_type(self, cr, uid, context=None):
res = super(prakrutiTemplate, self)._get_product_template_type(cr, uid, context=context)
if 'packing' not in [item[0] for item in res]:
res.append(('packing', _('Packing Materials')))
return res
class packingMaterialline(models.Model):
_name= 'packing.material.line'
name = fields.Many2one('packing.material.line', string= 'Package name')
pname = fields.Many2one('packing.material',string='Name')
desc = fields.Char(related='pname.desc',string='Package Description')
class productSpecificationline(models.Model):
_name = 'product.specification.line'
name = fields.Many2one('product.specification.line',string= 'Name')
pname = fields.Many2one('product.specification', string= 'Name')
parameter = fields.Char(related='pname.desc',string='Product Specification')
class packingMaterial(models.Model):
_name= 'packing.material'
name = fields.Char(string= 'Package name')
desc = fields.Char('Package Description')
class productSpecification(models.Model):
_name= 'product.specification'
name = fields.Char(string= 'Product name')
desc = fields.Char('Specification')
Please use short and concise titles and place your message in the message body. This is very annoying.