The specification of the task https://www.odoo.com/web#id=31984&view_type=form&model=project.task&action=333&active_id=131&menu_id=4720 is inconsistent with the way we propose to make refunds on a sales order. While waiting to propose a clean solution, we revert the related commits.
This commit is contained in:
@@ -585,7 +585,7 @@ class SaleOrderLine(models.Model):
|
||||
for line in self:
|
||||
if line.state not in ('sale', 'done'):
|
||||
line.invoice_status = 'no'
|
||||
elif float_compare(line.qty_to_invoice, 0.0, precision_digits=precision) == 1:
|
||||
elif not float_is_zero(line.qty_to_invoice, precision_digits=precision):
|
||||
line.invoice_status = 'to invoice'
|
||||
elif line.state == 'sale' and line.product_id.invoice_policy == 'order' and\
|
||||
float_compare(line.qty_delivered, line.product_uom_qty, precision_digits=precision) == 1:
|
||||
|
||||
@@ -172,7 +172,7 @@ class TestSaleStock(TestSale):
|
||||
return_pick.do_new_transfer()
|
||||
|
||||
# Check invoice
|
||||
self.assertEqual(self.so.invoice_status, 'invoiced', 'Sale Stock: so invoice_status should be "to invoice" instead of "%s" after picking return' % self.so.invoice_status)
|
||||
self.assertEqual(self.so.invoice_status, 'to invoice', 'Sale Stock: so invoice_status should be "to invoice" instead of "%s" after picking return' % self.so.invoice_status)
|
||||
self.assertEqual(self.so.order_line[0].qty_delivered, 3.0, 'Sale Stock: delivered quantity should be 3.0 instead of "%s" after picking return' % self.so.order_line[0].qty_delivered)
|
||||
# let's do an invoice with refunds
|
||||
adv_wiz = self.env['sale.advance.payment.inv'].with_context(active_ids=[self.so.id]).create({
|
||||
|
||||
Reference in New Issue
Block a user