Skip to Content
Menu
This question has been flagged
1 Reply
2697 Views

Hello all! I'm trying to automatically add a line on customer invoices, with some info of the sale order, but I don't find the way to do it. What I want to do in invoice lines, it's to add a line before the first line of all orders. This line will have only some info in the description field, so the result must be something like this:

description for first sale order (it will be composed with the order number, and a field I have added to sale orders)

lines of first sale order

description for second sale order

lines of second sale order


I need to know which object and wich definition are responsible for adding lines in the customers invoices. Thanks in advice.

Avatar
Discard
Best Answer

Hello Roberto,

Following are the methods in Sale module to create invoice:

action_invoice_create is the method in sale module (sale / sale.py) which creates invoice and invoice_line_create, _prepare_order_line_invoice_line creates invoice lines.

These all are the methods which you have to override and make changes according to your requirement.

Hope this will help you.

Avatar
Discard
Author

Thank you for your answer! This is just what I'm looking for.

Related Posts Replies Views Activity
0
Apr 24
399
4
Nov 23
4246
0
Oct 23
378
0
Jan 23
819
0
Dec 22
1334