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 am building a function to generate a docx report when a sales order is created. So far, I have found an amazing python module to achieve this (docx). To achieve this, I am hooking to the create() function. However, I cant find a way to access the sales order lines inside the create function. Here is my code:
def create(self, cr, uid, vals, context=None):
if vals.get('name', '/') == '/':
vals['name'] = self.pool.get('ir.sequence').next_by_code(
cr, uid, 'sale.offer') or '/'
order_lines = vals.get('order_line')# How do I get things like order item names and quantities
return super(sale_offer, self).create(cr, uid, vals, context=context)
Any ideas will be highly appreciated.
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: 2/1/16, 6:59 PM|
|Seen: 840 times|
|Last updated: 2/2/16, 1:41 AM|