Commit Graph

1307 Commits

Author SHA1 Message Date
Goffin Simon 503820acb6 [FIX] account, purchase, sale: included taxes
-account:_fix_tax_included_price
If a fiscal position mapped an included tax on a SO or on a PO line
then the price unit of the product must be recomputed.

-purchase: onchange_product_id test
Test that when an included tax is mapped by a fiscal position, the included tax must be
subtracted to the price of the product.

-sale:product_id_change test
Test that when an included tax is mapped by a fiscal position, the included tax must be
subtracted to the price of the product.

opw:647321
2015-08-26 09:02:39 +02:00
Nicolas Martinelli 95f49eadc1 [FIX] account: consistency on the allowed precision
This fixes 2 issues.
First, it keeps consistent the precision required for posted entries and the
precision for the balance assertion. This could be an issue if the account
precision is larger than 4.
Then, it makes sure to round the amount with the appropriate precision to avoid
numerical errors. For example 1.2344 - 1.2345 = -9.999999999998899e-05, which
is indeed smaller than the required precision 10 ** -4.

A minimum precision of 10 ** -5 is kept for historical reason.

Fixes #7276
opw-643305
2015-06-30 12:46:30 +02:00
Olivier Dony 8d745f9f50 [FIX] account, mail, etc.: uniformize evaluated expressions
opw-626694
2015-05-21 15:26:35 +02:00
Denis Ledoux 41f4b11ef4 [MERGE] forward port of branch saas-3 up to e552e09 2015-04-30 15:45:03 +02:00
Denis Ledoux 2c3c2b57db [MERGE] forward port of branch 7.0 up to f2f4391 2015-04-30 10:50:51 +02:00
Mohammad Alhashash a6a3db3188 [FIX] account: custom '_where_calc' method instead of 'search'
The domain on account.account was preprocessed in search method but it had no
effect on read_group. This lead to inconsistency or errors when using 'goup by'
filter.

Move domain processing in '_where_calc' method instead as this is used by both
'search' and 'read_group'.
2015-04-29 11:17:47 +02:00
Goffin Simon 37bf219643 [FIX] account: Display Taxes
The function _unite_compute and _unit_compute_inv did not give the same display result.
Regardless the way the tax is computed, the display must be the same. The display must
only shows the name of the tax.

opw:633828
2015-04-28 11:25:44 +02:00
Denis Ledoux cf4d14ce39 [MERGE] forward port of branch saas-3 up to 09b277c 2015-04-27 14:02:52 +02:00
Denis Ledoux d6ae7fb7db [MERGE] forward port of branch 7.0 up to 3e7d3c7 2015-04-27 12:19:43 +02:00
Denis Ledoux 3e7d3c7ee4 [FIX] account: tax_amount can be null in database
The `tax_amount` of move lines is by default set to `0.0`.
Nevertheless, this default value is set by Odoo,
not by postgresql.

This is therefore likely that the `tax_amount` is set as
null instead of 0.0, in database.

Therefore, when getting this value directly with a SQL
request, this is possible that `null` will be returned.

Therefore, in this specific case, `res.get(record.id, 0.0`
could return `False`, if the sum of `tax_amount` is `null`,
and try to multiply a boolean with an integer is not possible:
`_rec_get(rec) * rec.sign`

opw-633903
2015-04-27 12:01:21 +02:00
Goffin Simon 6f679678f6 [FIX] account: duplicate tax
the duplication of a tax must duplicate the child_ids.

opw:630510
2015-04-21 10:09:56 +02: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
Denis Ledoux d9e48bae42 [MERGE] forward port of branch saas-3 up to 7ab4137 2014-11-14 16:58:24 +01:00
Denis Ledoux 7ab413724a [MERGE] forward port of branch 7.0 up to da15c9d 2014-11-14 15:59:33 +01:00
qdp-odoo 3540484138 [FIX] account: allow to use quantity in taxes computated with python code 2014-11-14 15:45:13 +01:00
Samus CTO 1a826e07fe [IMP] Speedup test account_assert_test.xml in account 2014-11-13 17:00:42 +01:00
qdp-odoo 19da7b708c [FIX] account: fixed broken constraint (due to the passage to the new API) to ensure the same partner is present on journal items we try to reconcile partially. Fixes #2527 2014-10-01 16:05:53 +02:00
Denis Ledoux 96dd8bf507 [FIX] account: default product taxes on product.template
As product.template is now most commonly used than product.product
2014-09-29 17:56:39 +02:00
qdp-odoo f4e350ca36 [FIX] account: several fixes on the new bank statement reconciliation widget 2014-09-04 11:32:16 +02:00
Christophe Simonis 5dff035878 [MERGE] forward port of branch saas-5 up to 39bee35 2014-08-20 20:33:17 +02:00
Christophe Simonis c3131317d7 [MERGE] forward port of branch saas-4 up to ddef2dd 2014-08-20 17:57:22 +02:00
Christophe Simonis ddef2dd10a [MERGE] forward port of branch saas-3 up to 8f13e83 2014-08-20 17:51:20 +02:00
Christophe Simonis 8f13e8320e [MERGE] forward port of branch 7.0 up to d0a0b7d 2014-08-20 17:45:05 +02:00
Olivier Dony 971ffa3db1 [FIX] account: reconcile: no useless revalidation
Avoid revalidating the complete account moves
that contain the lines being reconciled.
The reconciliation does not change the validity
of those moves anyway.
This represents a very important speed up of
reconciliation when moves with several hundred
lines are involved.
2014-08-14 16:51:37 +02:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00
Stéphane Bidoul 5df99ce622 [FIX] account: add `sequence` on account.tax.code.template
Relying on the ordering by tax code is not sufficient,
as some tax declarations such as the Luxemburg one,
show tax case codes not ordered numerically

Original fix courtesy of Stefan Rijnhart (Therp)

Fixes: lp:1168948
Rebase of: PR #759
2014-07-14 11:33:05 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
ssh-odoo 6cc4bd4312 [Imp]:Improve configuration warning msg
[imp]:remove space

[rem]:remove code

[imp]:remove changes

[imp]:remove changes

[rem]:remove unused changes
2014-07-03 16:11:15 +05:30
qdp-odoo f2a2a8cca4 [FIX] account: default value for with_last_closing_balance field set to True 2014-07-01 14:46:38 +02:00
Jaydeep Barot 026e38b48f [REM] Unnecessary `size` parameters on char fields 2014-06-25 17:13:43 +02:00
Olivier Dony f15cbd6520 [MERGE] Forward-port saas-4 bugfixes up to ad4c6ca 2014-06-12 18:54:36 +02:00
Olivier Dony ad4c6caecf [MERGE] Forward-port of saas-3 bugfixes up to 9f0ecb3 2014-06-12 13:52:35 +02:00
Olivier Dony 9f0ecb3572 [MERGE] Forward-port of 7.0 bugfixes up to 4d3a5df 2014-06-12 13:49:32 +02:00
Jeremy Kersten 5a95d00f33 [FIX] Import - Use the right comparator to allow import with accounts_ids 2014-06-12 13:29:40 +02:00
Martin Trigaux b38a129d71 [FIX] account: move translatable tag
The field note on account.fiscal.position and account.fiscal.position.template should not be translatable in classic modules.
The l10n_multilang module is intendend to make chart of accounts multilang and is the place to set translate=True
2014-06-11 14:53:59 +02:00
qdp-odoo e3491ccb71 [IMP] account: bank statement reconciliation widget (part 2) 2014-05-30 18:47:50 +02:00
Denis Ledoux cab190b136 [MERGE] Forward-port of latest saas-3 bugfixes, up to rev. 9460 revid:dle@openerp.com-20140519103942-do7uem4in0jfqzo2 2014-05-19 12:46:33 +02:00
Denis Ledoux 3c033c76d4 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 10050 revid:dle@openerp.com-20140516110134-oadkw3xt5bhky781 2014-05-16 14:54:00 +02:00
Martin Trigaux 29565d96fe [MERGE] [FIX] account: when computing a tax with include_base_amount enabled, include the child tax amounts into the sum for the next tax 2014-05-14 13:02:01 +02:00
Christophe Simonis 7a7d7febf8 [MERGE] forward port of branch saas-3 up to revid 9429 chs@openerp.com-20140424123538-rxk9got9k2on1ki1
bzr revid: chs@openerp.com-20140424131824-4ksluvhnegp7kplb
bzr revid: chs@openerp.com-20140424134533-lhhcd32n3s0m9cqk
2014-04-24 15:45:33 +02:00
Denis Ledoux b6255eb55d [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 10005 revid:dle@openerp.com-20140422150710-mr9x3vyq0wcg31l5
bzr revid: dle@openerp.com-20140422162028-2icoebrb5q4tg3t3
2014-04-22 18:20:28 +02:00
Martin Trigaux 23268ad677 [FIX] account: avoid tax on name search to execute request with empty journal (if context == {'journal_id': False}) (opw 606875)
bzr revid: mat@openerp.com-20140422135012-6faelx7cf0p8cvab
2014-04-22 15:50:12 +02:00
Ravi Gohil (OpenERP) 70dc4456d7 [FIX] account: Advance search on 'Tax' from journal items leads to traceback if we do not select any journal. (Maintenance Case: 606875)
bzr revid: rgo@tinyerp.com-20140422111115-17e6juruftp3oj2r
2014-04-22 16:41:15 +05:30
Christophe Simonis 61da3f4aba [MERGE] forward port of branch saas-3 up to revid 9409 dle@openerp.com-20140415101427-a6r7lgy50x9bdah3
bzr revid: chs@openerp.com-20140415142934-rlka4vkxd34fkil8
2014-04-15 16:29:34 +02:00
Denis Ledoux 2429e04ec2 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9980 revid:dle@openerp.com-20140414121930-xbawuj93ddifhf4m
bzr revid: dle@openerp.com-20140414131146-1jz0isk58wgdsx2p
2014-04-14 15:11:46 +02:00
Denis Ledoux c3300dce7a [FIX] account: name_search methods used '=' or 'ilike' to search, instead of the actual operator
Therefore, for example, searching invoices for journals doesnt containing 'sales' actually returned invoices with journal containing 'sales'.

bzr revid: dle@openerp.com-20140414121930-xbawuj93ddifhf4m
2014-04-14 14:19:30 +02:00
Christophe Simonis 99a3c45976 [MERGE] forward port of branch saas-3 up to revid 9328 chs@openerp.com-20140318120024-mcxmkncn1xktjs7v
bzr revid: chs@openerp.com-20140318132741-aur3q1k7t9iympri
2014-03-18 14:27:41 +01:00
Christophe Simonis ee8174806e [MERGE] forward port of branch saas-2 up to revid 9149 chs@openerp.com-20140313163420-ifa4hyixj722d6jo
bzr revid: mat@openerp.com-20140313091920-bahej198pu339e28
bzr revid: chs@openerp.com-20140313170940-yoqg6izfw74s2i3a
2014-03-13 18:09:40 +01:00
Denis Ledoux 02459f8d4a [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9929 revid:dle@openerp.com-20140325104921-x8zjx5p71l1o3uif
bzr revid: dle@openerp.com-20140310133913-465x5t3n1bo7fu98
bzr revid: dle@openerp.com-20140311164146-2s599kogbqj8e94l
bzr revid: dle@openerp.com-20140312111149-u6y036aej3ywq7et
bzr revid: dle@openerp.com-20140312121145-06s1jvct9v4m7l6s
bzr revid: mat@openerp.com-20140313084409-c0kckxemy3in0mlo
bzr revid: chs@openerp.com-20140313163420-ifa4hyixj722d6jo
bzr revid: chs@openerp.com-20140314102034-g0nzryvwhrpzdas9
bzr revid: chs@openerp.com-20140314104803-19c5snl2fcuih91o
bzr revid: odo@openerp.com-20140314143519-x6rzcfkkqxwc0e1g
bzr revid: chs@openerp.com-20140318110229-y8098w3shdpmoig2
bzr revid: dle@openerp.com-20140318151824-sscl4m8p87emjl8s
bzr revid: dle@openerp.com-20140320112618-yfyihlwz66ryeqf5
bzr revid: dle@openerp.com-20140320161003-j01cc6sqves2wnp2
bzr revid: dle@openerp.com-20140320181252-4gqcog22p1ex0pz7
bzr revid: dle@openerp.com-20140321140450-8ulnhr76qybiadks
bzr revid: dle@openerp.com-20140324104743-ubvu8st7emq9pg1q
bzr revid: dle@openerp.com-20140325112413-xs5z7y81rhyjt0rd
2014-03-25 12:24:13 +01:00
Najlaâ 6ab74d0d8d [FIX] account: change decimal precision to avoid erasing tax and base values when updating a tax with coefficients on more than 2 decimals
bzr revid: nel@tinyerp.com-20140312130522-qr5e010onc7ejrz5
2014-03-12 14:05:22 +01:00