Skip to content

Commit

Permalink
Stock picking quantity name refactor
Browse files Browse the repository at this point in the history
Test quantity name refactor
  • Loading branch information
TheLegendaryJedi authored and dreispt committed Dec 17, 2024
1 parent e2a004b commit 74ca692
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions l10n_pt_stock_invoicexpress/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _get_invoicexpress_prefix(self, doctype):
}.get(doctype)

def _prepare_invoicexpress_lines(self):
lines = self.move_ids_without_package.filtered("quantity_done")
lines = self.move_ids_without_package.filtered("quantity")
# Ensure Taxes are created on InvoiceXpress
lines.mapped("sale_line_id.tax_id").action_invoicexpress_tax_create()
items = []
Expand All @@ -130,7 +130,7 @@ def _prepare_invoicexpress_lines(self):
"description": line.product_id.name or "", # line.name for SO desc
# TODO: add an option to allow having the prices set?
"unit_price": 0.0, # line.sale_line_id.price_unit,
"quantity": line.quantity_done,
"quantity": line.quantity,
"discount": line.sale_line_id.discount,
"tax": tax_detail,
}
Expand Down
2 changes: 1 addition & 1 deletion l10n_pt_stock_invoicexpress/tests/test_invoicexpress.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_102_create_invoicexpress_picking(self, mock_request):
self.delivery_order.action_assign()
self.delivery_order.move_line_ids.filtered(
lambda ml: ml.product_id == self.productA
).qty_done = 2.0
).quantity = 2.0
self.assertEqual(
self.delivery_order.state, "assigned", "Delivery Order assigned"
)
Expand Down

0 comments on commit 74ca692

Please sign in to comment.