Odoo Help


How to transfer data from move_lines in stock.picking to invoice_line when clicking on 'Create Invoice'?

Sayed Anisul Hoque
on 9/13/15, 1:04 PM 1,056 views


I want to move the field date_expected from stock.picking -> move_lines to account.invoice.line -> delivery_date (custom). I have created the delivery_date field in invoice_line. Now while generating invoice from stock.picking then along with all the other data date_expected will be also copied into the delivery_date.

Please help in this regards

A bit unclear. Could you pls feed us with how do you generate the invoice, I prefer posting the code you've written along with the supposed result, and the currently unexpected result so one can help

Tarek Mohamed Ibrahim
on 9/13/15, 11:59 PM
Sayed Anisul Hoque
On 9/14/15, 12:39 AM

********************** EDIT ****************************

 Please check the link for the way I solved



1. I have declared my custom date in invoice for each invoice line. Code is as below.

class invoice_line(osv.osv):

_name = 'account.invoice.line'

_inherit = 'account.invoice.line'

_columns = {

'x_delivery_date' : fields.datetime(string="Delivery Date")


2. in Warehouse for each move_lines of the id there is a variable - date_expected (Expected Date). Suppose for a particular move I want to generate invoice by clicking Create Invoice so, when user clicks on create invoice then some of the move data transfers from stock.picking to account.invoice. I want the date_expected field data to be transferred as well into the x_delivery_date field.

I am stuck up in point 2.

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 9/13/15, 1:04 PM
Seen: 1056 times
Last updated: 9/14/15, 11:35 AM