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.
I have this code:
_inherit = "res.company"
code_default = fields.Many2one(comodel_name='info.code', string='Default code', help="Default to the documents")
And in my invoice I want to have the default defined in the company:
_inherit = "account.invoice"
code = fields.Many2one('info.code', string='Code', default=default_code, help="Code to the documents",)
But when the code enter the function default_code the self.company_id is empty! I also done a onchange but I realy need a default funtion ...
Any help ?
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: 4/13/16, 1:29 PM|
|Seen: 692 times|
|Last updated: 4/13/16, 1:29 PM|