콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4759 화면

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

아바타
취소

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

작성자 베스트 답변

********************** 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.

아바타
취소