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.
In our sales order we have a customer Purchase order number for reference, we need to customise the invoice to add this. As far as I know, this field exists only in the sales order table. So far, I can edit the RML of the invoice but the problem comes trying to pull this reference. I think* the logic should be: if origin = SO130025 (our sale order number) then char = sales_order.customer_ref (sales order table, customer_ref field) else remove node
But I'm having trouble with putting it into code.
Anyone come across this?
This should not be static. You should call a function (get_customer_ref(origin)) and the function returns the correct ref after searching for the correct sale order. So in your rml you should just have something like.
[[ o.get_customer_ref(origin) or RemoveParentNode(para) ]]
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/1/13, 11:38 PM|
|Seen: 2888 times|
|Last updated: 3/16/15, 8:10 AM|