Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3 Відповіді
6436 Переглядів

Is there a way to make future customer invoices account for a manual use of the "Down payment" product?

What works: Invoice (1) From a Sales Order, click "Create Invoice" and choose "Down payment (percentage)", enter 50%. Invoice (2) From the same Sales Order click "Create Invoice" and choose "Invoiceable lines (deduct down payments)" -- this correctly includes the prepayment made by the customer.

What doesn't work: Invoice (1) From a Sales Order, click "Create Invoice" and choose "Invoiceable lines", then add the "Down payment" product to the invoice for $1000. Invoice (2) From the same Sales Order click "Create Invoice" and choose "Invoiceable lines (deduct down payments)" -- this DOES NOT include the prepayment made by the customer.

Аватар
Відмінити
Найкраща відповідь

In my case it was another module that introduced a bug :

def action_invoice_create(self, grouped=False, final=False):
# Wrong line
# res = super(SaleOrder, self).action_invoice_create()

# Correct line
res = super(SaleOrder, self).action_invoice_create(grouped, final)
for inv in res :
invoice = self.env['account.invoice'].browse(inv)
invoice._onchange_payment_term_date_invoice()
invoice._get_affaccturage()

return res

You have to pass final = True for this to work!!

Аватар
Відмінити
Найкраща відповідь


@api.multi
def action_invoice_create(self, grouped=False, final=False):
invoice_id = super(SaleOrder, self).action_invoice_create(grouped, final)
return invoice_id

Аватар
Відмінити
Найкраща відповідь

Hi, @Kent, 

Have the same problem and still haven't found the spected behaviour neither from a SO nor an invoice. 

Did you find the solution?

Thanks a lot, 

Pere

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
черв. 25
858
1
квіт. 25
136
0
лист. 24
1680
2
вер. 24
549
0
бер. 23
2249