Commit Graph
10619 Commits
Author SHA1 Message Date
qdp-odoo e69affec98 [FIX] account: removed readonly=1 on fields tax_ids and tax_line_id of account.move.line object (moved to the views, so that men can import the accounting items and provide those fields) 2015-12-03 17:46:19 +01:00
qdp-odoo debb541148 [FIX] account, customer statement report: filter out the lines with debit=credit=0 (were valid in previous versions) and the lines belonging to another company than the one of the current user 2015-12-03 17:46:18 +01:00
Denis Ledoux f07e0c1af2 [FIX] account: force amount_residual recomputation on post
The `amount_residual` computation depends on the fact
the `acccount_id` of the move line does allow reconciliation
or not. If it doesn't, the amount residual will always be 0.0.

So, if you check the "allow reconciliation" on the account
after creating the journal items or after changing the
debit/credit amount, the amount residual is not recomputed.

We do not set the `depends` directly on `account_id.reconcile`,
as, if we do, and a user checks/unchecks this box on an account
having a lot of records, this will recompute this residual
amount on all lines, and this is something we do not want
to happen.

The work-around when this case happens,
that the amount residual is not correct due to the fact
the `allow reconciliation` on the account
was checked after having posted the entry,
is to cancel the entry and repost it. This
will recompute the residual amount.

opw-656972
2015-12-03 10:54:24 +01:00
Cedric Snauwaert 120f6a7ea5 [FIX] account: fix incorrect value for company_residual_signed on invoice + set invoice in the journal currency and not in euro 2015-12-02 17:24:50 +01:00
Cedric Snauwaert ee97028fa0 [FIX] account: account that has been deprecated should not be choosen on a new invoice 2015-12-01 11:47:02 +01:00
Nicolas Martinelli 5790475e25 [IMP] account: currency of outstanding payments
Following commit 8a05e585, display outstanding payments in their own
currency.

opw-657151
2015-11-27 12:48:39 +01:00
Nicolas Martinelli e700badfa5 [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
2015-11-27 12:48:38 +01:00
Goffin Simon e9dadadd07 [FIX] account: Bank statement reconciliation
The partial reconciliation can just be proposed on the last selected line when:
self.get("balance") * (last_line.debit - last_line.credit)<0
2015-11-26 16:53:12 +01:00
Nicolas Martinelli bef0da3a7a [FIX] account: Total Receivable and Payable
The fields Total Receivable and Payable are calculated as debit-credit.
However, this leads to a wrong computation if, for example, a payment is
used to pay several invoices. For example:
- Create a customer invoice of 2500 USD
- Register a payment of 3000 USD
The Total Receivable will be 3000 USD instead of 500 USD.

At the same time, this commits changes the sign of the field. The help
depicts the Total Receivable field as "Total amount this customer owes
you". Therefore, one would expect that if the customer owes 250 USD, the
Total Receivable is 250 USD, not -250 USD.

The same logic applies to Total Payable.

opw-657053
2015-11-26 12:19:41 +01:00
Martin Trigaux e8e5405d0c [I18N] Update French translation terms from Transifex
Fixes #9712
2015-11-25 17:22:26 +01:00
Cedric Snauwaert d31b1ab2a7 [FIX] account: amount_residual_signed should be negative for refunds only 2015-11-25 11:02:32 +01:00
Martin Trigaux 4250f7beee [FIX] account: error message
The error message on the journal entry for currency was wrong.
The multi-currency view does not exists anymore in 9.0 so is no longer relevant.
To avoid breaking existing translations, create a en translation.
Rename the en_US.po to en.po to be used by _GB and _AU

Will be fixed in saas-7 by the mighty @csnauwaert 📯
2015-11-24 17:27:11 +01:00
Cedric Snauwaert cdb0dae247 [FIX] account: default value for journal_id not correctly working when clicking from dashboard
missing journal_id in search view and default value for journal_id when creating a new invoice should
first take value in context if any.
2015-11-24 09:43:42 +01:00
Denis Ledoux cbfc9c9e20 [FIX] account: process_reconciliations @api.v7
The method `process_reconciliations` is written in api.v7.
Therefore, any calls done on ORM models must be done
in the 7.0 API in this method.

To reproduce the issue:
 - Open a pos session, and sell something, select a partner
   and choose to create an invoice.
 - Come back to the back-end, and in the accounting dashboard,
   in Customer Invoices > More > Matching payment,
   hit ctrl-enter to reconcile all the balanced items in the sheet.

opw-654410
2015-11-23 12:16:07 +01:00
Cedric Snauwaert 2015c6ceab [FIX] account: missing access-right for billing group (account.bank.statement.line) 2015-11-23 11:22:26 +01:00
Odoo Translation Bot 3180f80bf9 [I18N] Update translation terms from Transifex 2015-11-22 01:30:36 +01:00
pvy 17b131b404 [REF] account: get_followup_lines_domain now may be given ids to exclude 2015-11-19 10:52:50 +01:00
Goffin Simon 3783289ece [FIX] account: _default_line_ids for a account.payment.term record
The sequence of the first account.payment.term.line must be 9 because
the default sequence for a new line is 10.

Before the fix:
When changing the value of the default line by "percent" and adding a
new line with value equal to "balance". An exception was raised because
the sequence of the default line was 500 and then this default line was
always considered as the last one.

opw:656704
2015-11-18 16:15:58 +01:00
Goffin Simon 11f8e8db4c [FIX] account: get_reconciliation_proposition
The bank statement reconciliation widget should look for the name
of the account.move if the ref is not found.

opw:652656
2015-11-18 13:36:33 +01:00
Martin Trigaux 6fcf6b5c09 [I18N] export accounting source terms
To reflect changes in previous commit and due to few previous changes
2015-11-18 09:24:38 +01:00
Martin Trigaux a6515d7c56 [FIX] account: typo
Ok to do it in stable as the string 'Technical field used for usability purposes'
is already present in the module
2015-11-18 09:24:38 +01:00
Olivier Dony a7e8ab363e [FIX] account, crm: avoid exceptions when processing parameters 2015-11-03 21:38:53 +01:00
Denis Ledoux 9c5961bc8a [FIX] account: improve performances for reconciliations
This rev. is related to 3dd79b3d65.

Both `journal_id` and `date` on `account.move.line` are
related from the `move_id` of the line.

Besides, the move associated to these move lines is
created with the same values, in
`_prepare_reconciliation_move`:
 - The move `date` is set with `self.date`,
   exactly the same than what was set in the `aml_dict`
 - The move `journal_id` is set with `self.statement_id.journal_id.id`,
   which is the origin field of the related field `self.journal_id.id`
   used in the `aml_dict`

opw-656463
2015-11-16 17:58:15 +01:00
Denis Ledoux 3dd79b3d65 [FIX] account: improve performances for reconciliations
The field `company_id` on `account.move.line`
is a related to the `company_id` field of the
`account_id` field on this move line.

Therefore:
 - Forcing the company of the `account.move.line` to the
   company of the `account.bank.statement.line` is pointless,
   as this field is supposed to be a related from the `account_id`
   of the move line. It's the `account_id` that must be set correctly,
   to an `account.account` of the right company. This is the case, btw.
 - Forcing the company of the `account.move.line` triggers the
   write of the `company_id` on the related `account.account`, which
   triggers the write of the `company_id` on all `account.move.line`
   records having as `account_id` this `account.account`.

Therefore, the more you had move lines on an `account.account`,
the more the reconciliation was slow for move lines with this `account_id`.

opw-656463
2015-11-16 15:17:07 +01:00
Odoo Translation Bot 3d7ae73305 [I18N] Update translation terms from Transifex 2015-11-15 01:35:06 +01:00
Odoo Translation Bot 14799a9006 [I18N] Update translation terms from Transifex 2015-11-08 01:32:40 +01:00
Nicolas Martinelli 8a05e585d8 [IMP] account: display payment amount in its own currency
The payment widget now displays the payment in its currency, not in the
currency of the invoice.

opw-652747
2015-11-06 14:53:53 +01:00
Thibault Delavallée f376d7495b [FIX] account: billing cannot validate an invoice
Issue: without access on account.partial.reconcile model, a billing user can create
an invoice, but not validate it.
2015-11-04 18:02:59 +01:00
Thibault Delavallée 3e78938aa6 [FIX] account: billing cannot access Invoicing
Issue: account.bank.statement read right is required for the dashboard; added read access
forbilling users
2015-11-04 17:39:13 +01:00
Nicolas Martinelli affce2c49c [FIX] account, website_sale: do not set fpos on res.partner automatically
When a partner is created, the fiscal position is set automatically if
possible. This is not correct, the fiscal position should only be set
automatically on a SO, based on the delivery address.

Here is a scenario explaining the reason:
- Create 2 fiscal positions, one in US and one in Canada. Both fiscal
  positions apply automatically depending on the country.
- As an non-logged user, go in the web shop
- Buy a product
- At the checkout phase, the Billing Information are in US, but the
  Shipping Information in Canada.
- The fiscal position which will apply will be US, while you expect it
  to be Canada

The reason is that the fical position which applies is the one on the
parent partner (US in this case), since all children partners must have
the same accounting data.

With this fix, we simply remove the automatic setting of the fiscal
position on the partner.

opw-653072
2015-11-04 15:08:35 +01:00
Nicolas Martinelli 7173b0efb1 [FIX] account: make currency visible
In a multi-currency environment, the currency should be selectable when
registering a payment.

opw-653332
2015-11-03 12:25:08 +01:00
Goffin Simon 4709818222 [FIX] account: Register payment with several bills
When a payment is created for a bill, this is always the 'commercial_partner_id'
which is used as 'partner_id'.
Then:
-When registering a payment with several bills, the 'commercial_partner_id'
field of these bills must be the same.

-When grouping bills by partner, the groups must contain all the bills from
the same 'commercial_partner_id'.

opw:653005
2015-11-03 11:47:24 +01:00
Goffin Simon f3e7679710 [FIX] account: date on account.move.line
When an account.move.line(aml) is created for a reconciliation, the date
used in the aml must be the date of the bank.statement.line used to
create the aml.

opw:653335
2015-11-02 09:27:39 +01:00
Odoo Translation Bot e3287faee6 [I18N] Update translation terms from Transifex 2015-11-01 01:32:05 +01:00
Fabien Pinckaers 93d54b1025 [IMP] bank account creation 2015-10-31 18:44:28 +01:00
Géry Debongnie 329552b78e [FIX] web,account,website_links: update nvd3 to last version
This commit was necessary to fix weird problems in 9.0-nightly.
Phantomjs and the old nvd3 implementations did not play well together.

* transitionDuration() replaced by duration()
* tooltips() & tooltipContent replaced by tooltip.enable and tooltip.contentGenerator
* remove useless less for tooltip

Thanks to mge for his help
2015-10-29 22:15:44 +01:00
Denis Ledoux 2ec9a9c992 [FIX] account: @api.v8 account.tax.compute_all expects a currency browse record
The method `compute_all` of `account.tax` in api.v8
expects a currency browse record, not a currency id.

It's the `compute_all` of api.v7
that expects a currency id.

opw-653106
2015-10-27 13:29:03 +01:00
Denis Ledoux e75314511d [FIX] account: resolve taxes ids triplet commands
`vals[tax_ids]` can be a command triplet,
see:
https://www.odoo.com/documentation/master/reference/orm.html#openerp.models.Model.write

Doing
`tax_ids = map(lambda tax: tax[1], vals['tax_ids'])`
to resolve the command doesn't work for all triplet types,
for instance it doesn't work for triplet `(6, 0, [...])`

To resolve properly a 2many commands, `resolve_2many_commands`
should be used.

opw-653106
2015-10-27 13:29:02 +01:00
Nicolas Martinelli 9c77e29d4c [FIX] account: make currency visible
It is impossible to post a manual journal entry when an amount currency
is filled in since the currency must be specified.

opw-652890
2015-10-27 13:09:01 +01:00
qdp-odoo ea12117f65 [IMP] account: auto-install 'l10n_uk' for country code 'GB'. Auto install 'l10n_generic_coa' if there is no dedicated localization found for the country code 2015-10-27 10:44:50 +01:00
Denis Ledoux 6c8a844585 [FIX] account: partner read access in multi-companies
The below revision:
275234c067

Makes the multi-companies record rule disabled by default,
meaning the user can see contacts from other company than
his current company.

Nevertheless, to read the computed field `currency_id` on
the `res.partner` model, the user need the read access
on the contact `company_id` field, that the user does not have
if the partner company is not a child of the user current company.

opw-653103
2015-10-27 10:42:39 +01:00
Goffin Simon ac53e2451d [FIX] account: reverse_moves
When reversing entries in Journal Entry, each entry(account.move.line)
must be copied with its own 'tax_line_id'. In this way, the action window
"act_account_tax_tax" can find all the entries linked to a specific tax
(active_id) to compute the Tax Report.

opw:652598
2015-10-26 15:35:21 +01:00
Odoo Translation Bot 265b789e38 [I18N] Update translation terms from Transifex 2015-10-25 01:34:24 +02:00
Denis Ledoux 56ef99d050 [MERGE] forward port of branch saas-6 up to 105b1c0014 2015-10-23 18:31:55 +02:00
Goffin Simon a9ce4ffb22 [FIX] account, purchase, sale: included taxes
Forward port of 503820acb6 from 8.0

opw:652310
2015-10-23 10:39:12 +02:00
Goffin Simon f8b65541f9 [FIX] account: currency rate for payments_widget
The currency rate used to compute the amount to show must be the currency rate
matching with the date of the payment.

opw:652478
2015-10-22 11:37:59 +02:00
Goffin Simon 01d121a90a [FIX] account: amount in payments_widget
The amount to show in payments_widget must be the opposite of amount_currency like
in the else condition:
    amount_to_show = payment.company_id.currency_id.compute(-amount, self.currency_id)

opw:652478
2015-10-21 13:27:08 +02:00
Xavier Morel a43b220b33 [FIX] make AccountingTestCase extend HttpCase
Fixes/hides a deadlock when running test_sale_order with either a single
database or a db_filter making a single database visible: the test
causes a report to be printed, which invokes wkhtmltopdf, which tries to
fetch assets using the registry which is being loaded. The asset request
thus waits on a lock which is held by the test which waits on the asset,
deadlocking the whole thing.

Using HttpCase means we're using the test_cr or something and bypassing
the deadlock, instead the asset requests just 404 as they do when using
the nodb routing.
2015-10-20 17:38:53 +02:00
Martin Trigaux eca1983aef [FIX] account: analytic entries onchange
Broken on_change, comparing id and recordset

Fixes #9144
2015-10-20 08:53:40 +02:00
Denis Ledoux 4315779e55 [FIX] account: invoice in foreign currency
When creating an invoice in a foreign currency,
and adding a line with a product,
the `onchange` failed,
due to the fact the field `date_invoice`
is not on the invoice line, but on the invoice.
2015-10-19 15:45:40 +02:00