# Keep sale lines of type “Comment” in the associated invoice

**URL:** https://discuss.tryton.org/t/keep-sale-lines-of-type-comment-in-the-associated-invoice/7046
**Category:** User
**Tags:** accounting, sales
**Created:** [March 4, 2024, 11:52am UTC](https://discuss.tryton.org/t/keep-sale-lines-of-type-comment-in-the-associated-invoice/7046 "2024-03-04T11:52:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![syswft](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@syswft](https://discuss.tryton.org/u/syswft)
#### Post date: [March 4, 2024, 11:52am UTC](https://discuss.tryton.org/t/keep-sale-lines-of-type-comment-in-the-associated-invoice/7046/1 "2024-03-04T11:52:37Z")

</div>

Hi!

We often use lines of the type “comment” in sales. When we create an invoice for such a sale, it would be great if these comments were also included in the invoice.

How can this be achieved?

Thanks

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [March 4, 2024, 12:45pm UTC](https://discuss.tryton.org/t/keep-sale-lines-of-type-comment-in-the-associated-invoice/7046/2 "2024-03-04T12:45:37Z")

</div>

No because there is no guarantee that the order nor the number of sale lines will be conserved on the invoice because:

- partial invoice
- grouping invoice
- partial invoice

---

<div class="post-metadata">

### Author: ![syswft](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@syswft](https://discuss.tryton.org/u/syswft)
#### Post date: [March 4, 2024, 1:35pm UTC](https://discuss.tryton.org/t/keep-sale-lines-of-type-comment-in-the-associated-invoice/7046/3 "2024-03-04T13:35:24Z")

</div>

thanks for the quick reply! i hadn’t considered these cases …

---

<div class="post-metadata">

### Author: ![acaubet](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/acaubet/32/1493_2.png) [@acaubet](https://discuss.tryton.org/u/acaubet)
#### Post date: [March 4, 2024, 2:07pm UTC](https://discuss.tryton.org/t/keep-sale-lines-of-type-comment-in-the-associated-invoice/7046/4 "2024-03-04T14:07:16Z")

</div>

I have worked in similar question before, and I think it could be improved to handle this with :

- We have the sequence which we can be used to order using a some format like `{sale_id}_{line_sequence}` to be sure the order remains.
- We also have the invoice line origin which can point the sale line, which can be used to detect partials or groupings.

> [@ced](#):
>
> - partial invoice
> - grouping invoice
> - partial invoice

I see two duplicated. Is there any third case I’m not aware of?

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [April 3, 2024, 2:07pm UTC](https://discuss.tryton.org/t/keep-sale-lines-of-type-comment-in-the-associated-invoice/7046/5 "2024-04-03T14:07:57Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
