Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
The Question has been closedby
I tried to inherit account.invoice.line in the usual way taking a community module as template for that. After having installed my modification, I get the following error:
TypeError: The model "account.invoice.line" specifies an unexisting parent class "account.invoice.line" You may need to add a dependency on the parent class' module.
Any idea what this means?
This is my code:
from openerp.osv import orm class account_invoice_line(orm.Model): _inherit = "account.invoice.line" def product_id_change( self, cr, uid, ids, product_id, uom_id, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None ): res = super(account_invoice_line, self).product_id_change( cr, uid, ids, product_id, uom_id, qty=qty, name=name, type=type, partner_id=partner_id, fposition_id=fposition_id, price_unit=price_unit, currency_id=currency_id, context=context, company_id=company_id ) if product_id: product_obj = self.pool.get('product.product') product = product_obj.browse(cr, uid, product_id, context=context) if (product and product.description and 'value' in res): res['value']['name'] = product.description return res account_invoice_line()
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
|Asked: 3/9/14, 8:04 PM|
|Seen: 1370 times|
|Last updated: 3/16/15, 8:10 AM|