Odoo Help

0

0
2 Answers
0
Avatar

subbarao

--subbarao--

1269
| 5 2 8
Chennai, India
--subbarao--


subbarao
14-12-18 00:24

Hello Justin,

Instead of adding new fields to  product table, try to add product template table.

If you product template table automatically same field will create in product table.

So inherit product template form view and your fields.
 
from odoo import models, fields, api

class ProductTemplate(models.Model):
    _inherit = 'product.template'
    
    drawing = fields.Binary('Drawing')
    date_modify = fields.Datetime('Date Modified')

0
DHA Medic
13-12-18 22:02

Try it bro!

# -*- coding: utf-8 -*-
from odoo import models, fields, api

class product_product(models.Model):
    _description = "Product"
    _inherit = 'product.product'
   
    drawing = fields.Binary('Drawing')
    date_modify = fields.Datetime('Date Modified')

Stel een vraag
Writer
Keep Informed
1 volger(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now