Skip to Content
Menu
This question has been flagged
2 Replies
4324 Views

Hi

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

Avatar
Discard

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

Author Best Answer

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

 Please check the link for the way I solved

http://stackoverflow.com/questions/26715665/how-to-add-a-value-to-invoice-from-addons-stock-account-stock-py-in-odoo/32568579#32568579

**********************************************************


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.

Avatar
Discard