[FIX] account: invoice date of demo data

The invoice date of demo data is changed to match the current
month/year. The original issue is the following:
- install accounting, keep default configuration (company currency: USD)
- add a payment for Agrolait in USD (e.g. $10,000)
- go to customer invoice demo_invoice_2 (which is in EUR)
- the system proposes you to add a outstanding payment to pay the
  invoice -> do it

The invoice is not shown as fully paid, but on the other hand if you
click again to add an outstanding payment, nothing happens.

The reason of this bug is because for this specific bill, the currency
rate has changed between the invoice date and the payment date. The
amount used to pay the bill: this is the price in USD, at the rate
corresponding to the date of the invoice (i.e., what you were supposed
to pay at the time of invoicing). The fact that is does not mark your
bill as paid is also correct: the payment is written with the rate at
the date of the payment, and in this case, the invoice is not fully
paid. You should therefore reconcile the invoice and create a write-off
afterwards to register the exchange rate difference.

This unusual situation (pay an invoice in a different currency, and
moreover the rate has changed) has not been taken into account for v9,
and there is no clean solution which can be foreseen for a stable
version.

However, since this situation arises right away with the demo data, this
can be very misleading for a new user. The fix simply changes the date
of the invoices, so that there will be no rate change between the
invoice date and the payment date with the demo data.

opw-657151
This commit is contained in:
Nicolas Martinelli
2015-11-27 12:48:38 +01:00
parent 83181547f9
commit e700badfa5
+5 -5
View File
@@ -9,7 +9,7 @@
reference_type: none
payment_term_id: account.account_payment_term
type: 'out_invoice'
date_invoice: !eval time.strftime('%Y')+'-01-01'
date_invoice: !eval time.strftime('%Y-%m')+'-01'
invoice_line_ids:
- name: 'Dell Inspiron Laptop without OS'
product_id: product.product_product_49
@@ -27,7 +27,7 @@
partner_id: base.res_partner_2
currency_id: base.EUR
type: 'out_invoice'
date_invoice: !eval time.strftime('%Y')+'-01-08'
date_invoice: !eval time.strftime('%Y-%m')+'-08'
invoice_line_ids:
- name: '8-port Switch'
product_id: product.product_product_51
@@ -94,7 +94,7 @@
reference_type: none
payment_term_id: account.account_payment_term
type: 'in_invoice'
date_invoice: !eval time.strftime('%Y')+'-01-01'
date_invoice: !eval time.strftime('%Y-%m')+'-01'
invoice_line_ids:
- name: 'Toner Cartridge'
price_unit: 10.0
@@ -112,7 +112,7 @@
partner_id: base.res_partner_12
currency_id: base.EUR
type: 'in_invoice'
date_invoice: !eval time.strftime('%Y')+'-01-01'
date_invoice: !eval time.strftime('%Y-%m')+'-01'
-
!python {model: ir.model.data} : |
line_vals = {
@@ -133,7 +133,7 @@
partner_id: base.res_partner_1
currency_id: base.EUR
type: 'in_invoice'
date_invoice: !eval time.strftime('%Y')+'-01-15'
date_invoice: !eval time.strftime('%Y-%m')+'-15'
-
!python {model: ir.model.data} : |
line_vals = {