i have a problem with adding the shipping/delivery address from the sale_order to the invoice report. I already saw this post (link below) and edited the files as descripted, but it doesn't worked for me. Can someone please help me? I use openERP version 7. Best regards
You can create a module that inherits invoice and add the shipping address field to the invoice this way. After, you can edit the print out from invoice with Open Office report editor to include the field you just added. That should do it
'deli_add': fields.many2one('res.partner.address', 'Delivery Address', select=True) add this to the columns of python code
and add to the form view of the module you want this field to show just after the invoice address field
<field name="deli_add" />
this will give you your field and you will be able to select the shipping address but it will not auto fill when you select a client name. This should give you an idea of what you need to do.
I skipped the step to create a module and edited for testing the file addons/account/account_invoice.py. There I added this piece of code:
'partner_shipping_id': fields.many2one('res.partner', 'Delivery Address'),
Then I added following line in the account_print_invoice.rml:
<para style="tableAngebotContent">[[ display_address(o.partner_shipping_id) or 'No delivery address' ]]</para>
Now it's funny. Neither the street of the shipping address nor the text 'No delivery address' are visible. Is the code wrong or did I forgot something? Best regards
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 9/3/13, 10:29 AM|
|Seen: 4056 times|
|Last updated: 3/16/15, 8:10 AM|