[FIX] point_of_sale: Add sales description to pos invoice
Current behavior: If you add a sale description to a product, it will not be added to the invoice created from the PoS. Steps to reproduce: - Add a sale description to a product - Create a PoS order with this product - Create an invoice from the PoS order - The sale description is not added to the invoice opw-3221481 closes odoo/odoo#119516 X-original-commit: 37538c876f30fb1b3a9368f12a16edb1806777f8 Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com> Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com> Signed-off-by: Engels Robin (roen) <roen@odoo.com>
This commit is contained in:
@@ -196,12 +196,14 @@ class PosOrder(models.Model):
|
||||
order.add_payment(return_payment_vals)
|
||||
|
||||
def _prepare_invoice_line(self, order_line):
|
||||
display_name = order_line.product_id.get_product_multiline_description_sale()
|
||||
name = order_line.product_id.default_code + " " + display_name if order_line.product_id.default_code else display_name
|
||||
return {
|
||||
'product_id': order_line.product_id.id,
|
||||
'quantity': order_line.qty if self.amount_total >= 0 else -order_line.qty,
|
||||
'discount': order_line.discount,
|
||||
'price_unit': order_line.price_unit,
|
||||
'name': order_line.product_id.display_name or order_line.full_product_name,
|
||||
'name': name,
|
||||
'tax_ids': [(6, 0, order_line.tax_ids_after_fiscal_position.ids)],
|
||||
'product_uom_id': order_line.product_uom_id.id,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user