Commit Graph

9885 Commits

Author SHA1 Message Date
Denis Ledoux ee8919af84 [MERGE] forward port of branch saas-3 up to fe8845a 2015-02-12 11:05:00 +01:00
Denis Ledoux fe8845ade6 [MERGE] forward port of branch 7.0 up to 0b5271e9 2015-02-12 11:04:36 +01:00
Denis Ledoux 0b5271e90d [FIX] account: always use a copy when altering a context
To avoid wrong context propagation
2015-02-12 11:03:54 +01:00
Christophe Simonis 33a8989d77 [MERGE] forward port of branch saas-3 up to d73eeab 2015-02-11 16:40:01 +01:00
Christophe Simonis d73eeab5ba [MERGE] forward port of branch 7.0 up to 9fe040e 2015-02-11 16:39:11 +01:00
Denis Ledoux 9fe040e592 [FIX] account: invoice analysis residual amount
When having an invoice with multiple lines having the same
product_id and account_id, the residual amount was wrong.

This is due to the fact the residual amount of each line
was computed on the residual amount of the invoice divided
by the number of lines of the invoice, and the fact the main
select of the sql view was grouped by product_id, account_id.

So, for an invoice defined as
Product Account Total
A       1       10
A       1       10
B       1       10

The invoice analysis, grouped by product, account, computed
Product Account Total   Residual
A       1       20      10
B       1       10      10

The residual amount '10' of the first line being
30 (the residual amount of the invoice)
divided by 3 (the number of lines in the invoice)

The residual amount of the invoice should actually be divided by
the number of lines in the invoice * the count
of occurences in the group by clause
So, in this case, (30 / 3) * 2 = 20

Replacing the big jointure by
SELECT count(*) FROM account_invoice_line l where invoice_id = ai.id
to get the number of lines in the invoice
is just an optimization for performances

opw-621672
2015-02-11 13:10:54 +01:00
Martin Trigaux 3c3f54549a [FIX] account: typo in 45485fe
My bad, blame the heat
2015-02-10 14:11:08 +05:30
Alexis de Lattre 45485fe1d6 [FIX] account: multicompany with currency rates
A record rule exists on currencies but not on rates.
If creates multiple currencies with rate = 1, we could fetch the wrong one in
the search and get a security exception while trying to convert rates.
Fixes #3323, opw 626353
2015-02-10 14:06:29 +05:30
Goffin Simon d5a50fd346 [FIX] sale: fiscal position wrongly taken based on country group.
An automatic fiscal position with a country group can only match with a sale order from a customer who has a country defined.
opw:627087
2015-02-05 11:15:28 +01:00
Denis Ledoux c331e963cd [FIX] account: invoice analysis product quantity
This rev. is related to 6641c61ce6

During the above revision, a new jointure has been added
with product_uom, on product template uom_id
The join link was wrong, it was:
 - LEFT JOIN product_uom u2 ON u.id = pt.uom_id
and it must be:
 - LEFT JOIN product_uom u2 ON u2.id = pt.uom_id

 as the alias 'u' is the previous jointure, not this new one.

Besides, the uom_name is now the name
of the product uom of this second jointure
As the uom is now the product default uom
instead of the category reference uom

The groupby clause has been adapted, as the selection was slightly altered
Besides, grouping by u.uom_type, u.category_id was pointless
2015-02-04 20:28:48 +01:00
Martin Trigaux 16374dfa33 [FIX] account: error message not translated 2015-02-04 15:28:56 +01:00
Rifakat Haradwala a08b9c2c41 [FIX] account: forbid creating entries on closed period
Prevent creating/modifying accounting entries made on close periods.
The period_id and journal_id field on a account.move.line is a related so was
silently (without write call) updated so did not triggered the call to
_update_journal_check while modiying the linked account.move
Force the check in the validation of the move. As the move can not be balanced
without going through this method, this will prevent posted entries in closed
accounting period.
Fixes #1633, opw 615886
2015-02-04 15:28:55 +01:00
Goffin Simon 6641c61ce6 [FIX]report:wrong uom for "product_qty in invoices analysis
opw:626411
2015-02-03 08:52:42 +01:00
Denis Ledoux f043c41ac9 [FIX] account: report_vat with several periods
When fetching the VAT reports for several periods, only the last period was took into account
This is due to the fact that a browse record assignation no longer works in Odoo 8.0 API
at least not the same way.

code.sum_period = sum_tax_add just do nothing in Odoo 8.0.
Besides, using the variable "code" outside its loop is kinda crappy.
2015-01-29 16:26:58 +01:00
Olivier Dony 8e03852fd4 [I18N] Update translations from Launchpad 8.0 branches 2015-01-26 16:36:51 +01:00
Olivier Dony 6ebdcbd2cd [FIX] account: misleading labels/tooltips on new fiscal position fields 2015-01-26 11:27:01 +01:00
Arthur Maniet eed09ba410 [FIX] account: reconciliation widget was not assigning an amount on writeoffs lines when a tax with amount == 0 was applied. This undefined amount was interpreted as 0, resulting in tragically unbalanced journal entries.
Fixes #4871
2015-01-23 22:46:46 +01:00
Denis Ledoux 0ec3c75c2d [FIX] account: default value for report_vat report
If the report was printed from the tax codes list
Accounting > Configuration > Taxes > Tax codes
There is no information concerning what should be displayed (periods, details, etc.)
as the user did not printed the report from the wizard
(from Accounting > Reporting > Generic Reporting > Taxes > Taxes report)
We therefore set default values, in order the report to not crash

Nevertheless, the user has obviously to go through the wizard
if he wants to set a configuration different than the default one
2015-01-23 14:13:13 +01:00
Aaron Bohy ef986fe9de [FIX] Account, portal_sale, sale, website_quote: local paypal gif
Add local copies of the paypal gif to the archive. This fix was required
for Debian packaging. It fixes the privacy-breach-donation lintian error.
2015-01-23 11:11:26 +01:00
Olivier Dony 495ec92251 [I18N] Update translations from Launchpad 8.0 branches 2015-01-21 15:36:54 +01:00
Olivier Dony 39f00b3637 [I18N] Update translation templates with latest terms
Total new terms: 270
Total deleted terms: 82
Total identical terms: 19653
Old total number of terms: 19735
New total number of terms: 19923
2015-01-21 15:31:22 +01:00
Denis Ledoux e07309d809 [FIX] account: bank statement line needaction domain
Before 8.0, the field journal_entry_id did not exist.

For database coming from older release, like 7.0, this field is not filled in during the migration, because this is not possible.
Set the needaction to depend only on the journal_entry_id will have as effect to have every bank statement line entered when the database was under 7.0 to match the domain, while the needaction is made to display the number of records that need an action.

Besides, even in 8.0, this is possible that a line has not the journal_entry_id set, while not needing any actions (see 2bb38ca89d)
2015-01-15 16:53:59 +01:00
Denis Ledoux 2bb38ca89d [FIX] account: closing of bank statement without reconciliation
For bank statement line having an account_id, but no journal_entry_id, it is not possible to reconcile the line in the bank statement reconciliation tool, as a filter is applied to only reconcile lines having journal_entry_id AND account_id not set.

As written in the help message of the account_id field:
This technical field can be used at the statement line creation/import time in order to avoid the reconciliation process on it later on. The statement line will simply create a counterpart on this account

Not allowing the reconciling should not prevent to close the statement in such a case. The button "close" was displayed only when all lines had journal_entry_id set.
2015-01-15 16:45:47 +01:00
Xavier Morel 65cd4a2a33 [FIX] remove deprecated checks/fast_suite test attributes from standard modules 2015-01-15 14:31:40 +01:00
Denis Ledoux b4094d0998 [FIX] account: bank statement reconciliation come back
Once the bank statement reconcilation done, the back button should not come back to Home when it does not found the bank statement list in the breadcrumb history, but simply perform a history_back action, which will come back to the previous action, the statement form for instance.

opw-625397
2015-01-13 15:13:46 +01:00
Denis Ledoux 220999037e [FIX] account: financial reports, report value visible when type account_report
Regression introduced with rev. f081a5e441

opw-621989
2015-01-12 11:12:18 +01:00
Olivier Dony d0cd92bb9f [I18N] Sync updated 7.0 translations from Launchpad 2015-01-07 17:57:28 +01:00
Aaron Bohy ba37ae3cf3 [DEL] Cleaning: key 'images' removed from all __openerp__.py 2015-01-06 14:20:38 +01:00
Arthur Maniet a6f31ee8e8 [IMP] account: bank statement reconciliation widget: added a 'Show more' button to load further reconciliations. PR #4519 2015-01-06 11:50:49 +01:00
Arthur Maniet 239e1618f2 [FIX] account: do not restrict tax move lines creation from account_move_line.create() 2015-01-05 16:29:08 +01:00
Arthur Maniet 371e96767d [FIX] account: account.move.line creation with account_tax_id accepts taxes with both base code and tax code or neither. base code xor tax code raises a warning.
Fixes #4452
2015-01-05 16:00:58 +01:00
Arthur Maniet 2107896d22 [FIX] account: bank reconciliation widget: a currency amount was not rounded
Fixes #4450
2015-01-05 16:00:58 +01:00
Martin Trigaux fefc13a2db [IMP] account: better fix than edbd0df for reconciliation test
Revert edbd0df
Instead of removing the demo data (demo data is our friend), make the test more
specific, adding a date to match the rate of 1.5289 all year long.
2015-01-05 11:30:49 +01:00
Martin Trigaux edbd0df9a0 [FIX] account: test assuming specific currency rate
Old demo data hardcoded the currency rate of USD to 1.5289 at the half
of the year, introducting new year red runbot.
Using assertAlmostEquals to avoid values like 32.730000000000004
2015-01-02 14:24:56 +01:00
Guewen Baconnier 718c94cb48 [FIX] account: Discount is an amount and should be right aligned
The header already is but the value isn't.
Fixes #4372
2014-12-22 15:10:34 +01:00
Denis Ledoux 8d9473553a [MERGE] forward port of branch saas-3 up to 36bf774 2014-12-17 14:08:23 +01:00
Denis Ledoux 36bf774d20 [MERGE] forward port of branch 7.0 up to 43cf6d5 2014-12-17 14:05:44 +01:00
Denis Ledoux 43cf6d51d2 [FIX] account: aged partner balance, advance partial payment
Partners totals were not correct if the partner paid partially an invoice in advance
For an invoice of 20.000 in the future, with a payment made in advance of 5000
The column not due must contains 20.000, as the amount is not yet due
One of the column 1-30, 30-60, ... (accordingly on when the payment was made). must contains -5000
The total should be 15.000
2014-12-17 13:57:34 +01:00
Arthur Maniet 77a47a9bee [FIX] account: bank statement reconciliation: use the transaction communication in 'open balance' journal items name
Fixes #4227
2014-12-17 12:37:03 +01:00
Somesh Khare ba70393bc4 [FIX] account: prevent selecting company's contacts for manual account.move.line
Only the commercial partner (parent company) should be set in partner field of
an account.move.line.
Fixes #4261, opw 618763
2014-12-17 11:24:08 +01:00
Denis Ledoux 4e617069a3 [MERGE] forward port of branch saas-3 up to 82109d9 2014-12-12 19:29:45 +01:00
Denis Ledoux 82109d9ba8 [MERGE] forward port of branch 7.0 up to 5aa128c 2014-12-12 19:29:16 +01:00
Denis Ledoux 5aa128c13a [FIX] account: accurate amount total due with partial reconcile
This is related to rev. db98434e85

rev. abe5c803a0 forgot some partial reconciliations when the date domain was other than BETWEEN (for instance, <= stop date or >= start date, alone, not between)
Besides, the rev. abe5c803a0 did not care about account move being posted or not.

rev. db98434e85 took several times the same partially reconciled moves lines
2014-12-12 19:28:19 +01:00
Paulius Sladkevičius 2e083e88d8 [FIX] account: open Monthly Turnover partner in graph mode
Tree view gives no information
Fixes #4195
2014-12-12 12:16:56 +01:00
Arthur Maniet 562fc998bf [IMP/FIX] account: bank statement reconciliation widget: adopt a more logical approach to reconciliation balancing, as explained in https://github.com/odoo/odoo/issues/4017#issuecomment-66599534
Fixes #4017
2014-12-11 17:18:16 +01:00
Denis Ledoux a6212d2d20 [MERGE] forward port of branch saas-3 up to e11d1c2 2014-12-11 14:11:33 +01:00
Denis Ledoux e11d1c2b7a [MERGE] forward port of branch 7.0 up to db98434 2014-12-11 12:15:09 +01:00
Denis Ledoux db98434e85 [FIX] account_aged_partner_balance: accurate total
In some cases when the move was partially reconciled, the amount of the move wasn't added to the total
This is related to rev. abe5c803a0
2014-12-11 11:44:52 +01:00
sve-openerp 182adcdcd6 [FIX] account,sale: show payment term & fiscal position notes in reports
Complete commit 3d88a60
Display payment terms or fiscal position note instead of simple the name.
Fixes #3635
2014-12-10 14:28:20 +01:00
Arthur Maniet 8b6d72d8c8 [FIX] account: bank statement reconciliation widget: do not propose partial reconciliation if there are created lines 2014-12-10 14:00:42 +01:00