Odoo Help

0

0
2 Answers
0
Avatar

subbarao

--subbarao--

1216
| 5 1 7
Chennai, الهند
--subbarao--


subbarao
14‏/12‏/2018 12: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‏/2018 10: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')

Ask a Question
Writer
Keep Informed
1 follower(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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now