Hello,
I'm using openERP 7 and I'm having following process for processing new customer orders.
1) Open Sales Order
2) From the Sales Order, create Delivery Order
3) Back to the Sales Order and create Invoice
So far this process worked. Now I have new customer, who wants to have in his invoice(step 3), the Delivery Order no.(that was crated in step 2).
The problem is that in sale.order model(db table sale_order) and account.invoice model(db table account_invoice) there is no reference to the delivery order id(db field stock.picking.name). I can't find a option to refer to the stock.picking.name for my sales order from the invoice template, when I modify it with OpenOffice Writer. I can get the o.origin, which returns only the Sales Order No, but from there I can't refer to the Delivery Order no, because it's not in sale.order model. How can I add the Delivery Order number to the Invoice? Has someone done that?
Looking forward to your replays! Thanks!
Regards,
Pavel
Hi, Maybe in order to access the delivery order no, I have to add it to the account or sales order models... Maybe I should add to the account.invoice object new column with type related or many2one (https://doc.odoo.com/trunk/server/03_module_dev_02/) Someting like: class account_invoice(osv.osv): .... _columns = { 'delvery_order_name': fields.related( 'delvery_order_name': fields.related('origin', 'name', type="many2one", relation="sales.order" string="DeliveryOrder", store=False) } Has someone tried doing that somehow to mapp account invoice object to the stock.picking object via the sales.order object? Is there smarter way to do that? Regards. Pavel
Morning everyone! I still have not found solution for that. I'm now checking the features & code of v8, so in case this is already implemeted there I would have to migrate to v8. Has someone achieved that in v7 or v8 somehow? I'm still not sure I have the proper solution in mind... Thanks! Regards, Pavel