We wish to accrue a running "tab" of everything a customer purchases during the month and we will manually invoice at month end. We follow the logic as such: We create a quotation for at least one item. We confirm it and it becomes a Sales Order. Over the period of a couple of days the customer may add things to the purchase and so we edit that sales order by adding more line items. But we don't invoice until end of month. Later in the month the customer may make another order and we repeat the process described above. So by the end of the month a customer can have multiple sales orders and each of them may have more than one order line item. When we finally invoice the customer at month end we see invoice lines for each order line of each order. Our problem is that the invoice lines don't contain the order dates for each for each line item. We want each line item to contain the purchase date for that line item.
We used Odoo developer mode and added a
new field "x_date_completed" to model sale.order.line and used "edit
form view" for sale.order.form and added our "x_date_completed" field in
tree string="Sales Order Lines" after "qty_delivered" field. It works
in that each order line gives us a field we can update when the line
item is added or edited, but we would like those dates for each sales
order line item to be carried over to the invoice line items. We would
like to be able to automate this for the sake of accuracy and
efficiency. Can anyone show us how to get the new field automatically
carried over to the invoice line items?
Since no one answered, here is more info: I probably was misleading when I said "purchase order". I'm talking about invoices for sales. I know the same template is used for purchases from vendors though.