Commit Graph

404 Commits

Author SHA1 Message Date
Denis Ledoux f7723037d6 [MERGE] forward port of branch saas-3 up to 8c4a7cb 2014-11-04 12:30:01 +01:00
Denis Ledoux 8c4a7cb371 [MERGE] forward port of branch 7.0 up to 5035c76 2014-11-04 12:19:58 +01:00
Stéphane Bidoul 18b7b28bc1 [FIX] account: backport of 12a39db
[FIX] account: Preserve analytic account on tax lines which are on same general account as invoice line

After careful analysis, I'm now convinced it is a good thing to preserve
the analytic account on taxes line which have the same general account
as the invoice line.

This is the best default case and will save time for users,
while leaving the flexibility to adapt the analytic account on
taxes manually.
2014-11-04 11:29:00 +01:00
Stéphane Bidoul ab797f0cd8 [FIX] account: backport of 3470643
[FIX] account: Error when manually adding analytic account in the generated tax lines on an invoice

fixes #374
fixes https://bugs.launchpad.net/ocb-addons/+bug/1084822

The fix considers invoice tax lines with different analytic account
are equivalent for the purpose of checking if the list of tax line
is complete.

Caveat, this changes the structure of keys in the dictionary
returned by account.invoice.tax's compute method, I suppose this
is ok for the master branch.
2014-11-04 11:28:10 +01:00
Christophe Simonis 8e637bac92 [MERGE] forward port of branch saas-3 up to 21b1203 2014-10-29 19:33:02 +01:00
Denis Ledoux a6024a6376 [MERGE] forward port of branch 7.0 up to 00ec786 2014-10-28 13:40:17 +01:00
Denis Ledoux 96bcaadd46 [FIX] account: limit search for fields_view_get to one result
+ use ir.model.data get_object_reference method for better performance (cached result)

opw-616616
2014-10-27 13:24:47 +01:00
Christophe Simonis 2e3f59181d [MERGE] forward port of branch saas-3 up to db75994 2014-10-14 15:13:14 +02:00
Denis Ledoux d38adf3d92 [FIX] account_invoice: using has_group to determine if user has group group_supplier_inv_check_total
has_group do not care about the fact res.groups is access restricted
2014-10-09 18:57:37 +02:00
Denis Ledoux b13898c058 [MERGE] forward port of branch 7.0 up to 03df412f 2014-10-07 17:34:42 +02:00
Denis Ledoux 03df412faf [FIX] account: precision_get returns a number of digits
In other words, it returnes a precision digits, not a precision rounding
2014-10-07 17:26:49 +02:00
Denis Ledoux 39bb45a8ea [MERGE] forward port of branch 7.0 up to 333852e 2014-09-26 21:32:40 +02:00
Martin Trigaux ceff8ef899 [IMP] account: use float_compare for taxes
Avoiding some python float representation errors
2014-09-26 16:57:28 +02:00
Commandant Custo 7c70660404 [FIX] account: typo in conversion to new API 2014-09-23 14:26:47 +02:00
Arthur Maniet 9f481d6c64 [FIX] account: account_invoice's onchange_partner_id uses the first partner bank account if several are defined. Merge of #2280 2014-09-16 13:37:51 +02:00
Raphael Collet ecd8b5222b [FIX] account.invoice.line: move context to last position in onchange methods
The methods product_id_change() and uos_id_change() have been converted to the
new api, and now use the decorator @multi.  When invoked with the old api, by
convention the methods will take the last argument as the context.  But this
will not work properly for those methods, as the context is passed in another
position.  In order to avoid an argument swap in the api wrapper, we moved the
context to its expected position.

Fixes #1943
2014-09-09 11:50:10 +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 1d2fe3330c [MERGE] forward port of branch saas-5 up to 24c25f5 2014-08-29 11:36:35 +02:00
Christophe Simonis 010dd70894 [MERGE] forward port of branch saas-3 up to c914893 2014-08-28 19:25:08 +02:00
Christophe Simonis 4e9f9426c6 [FIX] account: use method has_group() instead of browsing the group directly. 2014-08-28 17:21:54 +02:00
Christophe Simonis 8046b7367d [MERGE] forward port of branch saas-5 up to 7e117b1 2014-08-28 16:51:11 +02:00
Christophe Simonis 7e117b18a0 [MERGE] forward port of branch saas-3 up to ada9724 2014-08-28 16:21:27 +02:00
Christophe Simonis ada9724655 [MERGE] forward port of branch 7.0 up to 3509e15 2014-08-28 16:12:55 +02:00
Ravi Gohil df5633dcab [FIX] account: avoid date and cache issues
Explicitely refresh invoice browse_record(...) in order to have correct 'date' in account.move.
Use context_today() date instead of time.strftime() for date_invoice. (opw 611210)
2014-08-27 15:03:47 +02:00
Christophe Simonis 819e3005c2 [FIX] account: _get_analytic_lines() must work in @mutli beside using only self[0]
(partially revert previous commit)
2014-08-21 21:22:12 +02:00
Christophe Simonis 2649d4ba28 [FIX] account: correct some v8 decorators 2014-08-21 18:54:44 +02:00
Olivier Dony e11eddf753 [MERGE] Forward-port of saas-5 up to 20cc18d 2014-08-13 20:46:47 +02:00
Olivier Dony 2a94d1d811 [MERGE] Forward-port saas-4 up to 2694ed1 2014-08-13 17:34:27 +02:00
Olivier Dony 2694ed1472 [MERGE] Forward-port saas-3 up to b9275da 2014-08-13 17:33:12 +02:00
Olivier Dony b9275da8a5 [MERGE] Forward-port 7.0 up to 23cffab 2014-08-13 17:30:06 +02:00
Olivier Dony 6b8af73179 [FIX] account.invoice: payments can never be shown to portal users, but residual might be needed
The residual amount is typically needed to render the
online payment forms (payment acquirers).

Payments on the other hand rely on account.move.line,
something that portal users should never be allowed to read.
Removing the field from the view by setting a model-level
group permission ensures they will not see an error.
2014-08-13 12:38:38 +02:00
Denis Ledoux fe83c11301 [MERGE] forward port of branch saas-4 up to b49755b
The forward port of the fix 3609ba10f2 will be done separately, as the mrp scheduler has been completely refactored from saas-5.

Conflicts:
	addons/l10n_be_coda/wizard/account_coda_import.py
	addons/point_of_sale/static/src/xml/pos.xml
	addons/procurement/schedulers.py
2014-08-13 10:45:36 +02:00
Denis Ledoux b49755b545 [MERGE] forward port of branch saas-3 up to 591326c 2014-08-13 10:29:14 +02:00
Denis Ledoux 8a7728790b [MERGE] forward port of branch 7.0 up to 60ab6f1 2014-08-12 17:49:12 +02:00
Ruchir Shukla b2f1c764cd [FIX] account_anglo_saxon: avoid duplication of price difference lines
When computing the price difference lines, in move_line_get of account_anglo_saxon, we loop on the result of super call for each lines (n * n times) to compute the price difference.
The product_id was used to match the returned line and the original invoice line. This was wrong as we could get several lines with the same product_id (and then get n * n price difference lines).
This patch adds the line id to the result of move_line_get (from account) so that account_anglo_saxon can filter more efficiently and only get one price difference per invoice line.
Fixes #704
2014-08-12 17:30:49 +02:00
Denis Ledoux ae65be2b2a [MERGE] forward port of branch saas-5 up to 0739bc4 2014-08-11 15:58:02 +02:00
Denis Ledoux 7c647ec876 [MERGE] forward port of branch saas-4 up to 0a1e4a0 2014-08-08 17:27:29 +02:00
Denis Ledoux 0a1e4a05b2 [MERGE] forward port of branch saas-3 up to 81a902a 2014-08-08 17:06:39 +02:00
Denis Ledoux 02bf0fd9c8 [MERGE] forward port of branch 7.0 up to a86dfb8 2014-08-07 18:20:13 +02:00
Denis Ledoux 5ca6b09375 [FIX] account: payment_ids should list payments of same account than the invoice account 2014-08-06 19:00:01 +02:00
cod-odoo 2d54afef9e [FIX] account: prevent crash onchange company_id
(rebase of #1534)
2014-08-05 15:09:32 +02:00
Raphael Collet c0997d332a [FIX] account: fix unexpected invalidation of field account_invoice.reconciled
Problem: the field account_invoice.reconciled was invalidated by a workflow
signal sent from the compute method of the field. The purpose of the signal was
to re-open the invoice when the account move lines were no longer reconciled,
for instance after cancelling a reconciliation.

Solution: modify the workflow such that it makes an automatic transition from
'paid' to 're-open' when the condition 'not reconciled' is met. This works
because the field 'reconciled' is stored, and each recomputation forces a
reevaluation the workflow. The signal to re-open the invoice is thus no longer
necessary.
2014-08-05 10:01:07 +02:00
Olivier Dony 494ecc620f [MERGE] Foward-port saas-5 up to ee4df1e 2014-08-01 14:24:07 +02:00
Olivier Dony ee4df1e397 [MERGE] Forward-port saas-4 up to 8b15482 2014-08-01 13:06:49 +02:00
Denis Ledoux a9bce700dc [FIX] account: avoid to propagate context in send by email button
There is no reason to propagate the context in those buttons.

Besides, it leads to issues concerning the email template, rendering the wrong res_id because the active_id was wrongly propagated
2014-08-01 10:05:56 +02:00
Denis Ledoux 60d038c350 [FIX] account: _get_analytic_lines needs the date_invoice
During the conversion of account_invoice.py to the new API, the date_invoice written on the invoice has been moved in the end of the action_move_create method.

But, the method _get_analytic_lines needs it sooner.
2014-07-31 14:16:52 +02:00
Martin Trigaux f138aa2608 [FIX] models: display_name and name_get mismatch
- display_name uses name_get and not the other way around:
name_get should not call _compute_display_name, _compute_display_name should call name_get.
The previous behaviour was not backward-compatible with the old api.
All the models redefining name_get would have 2 different behaviors between name_get and display_name.

- Do not set an inverse function to display_name:
In most cases, writing on display_name writes on _rec_name (if any, not mandatory).
If the display_name computation is redefined, we need to redefine as well the inverse method to avoid unexpected behaviour
This required to also modify tests in base_import as readonly fields are avoided.

- Remove search method on display_name:
For the same reason as for the first point, it could be good that searching on display_name use name_search (and not the other way around).
However doing this would be very inefficiant (need to do the search, without limit, extract the ids of the name_get result just to generate
a subdomain ('id', 'in', [...]). As in most cases it would anyway mean to search on the _rec_name it's better to directly do so.

- Changing label to avoid mismatch:
In view displaying the list of fields or when a match is made on the label of a field (e.g. when importing csv file,
matching is made on both label and technical name), the fact that display_name field has '
Calling it 'Display Name' will avoid most errors.

- remove display_name definition from website_forum_doc,ir_model:
These fields are doing the same thing as the display_name of the new api, we can remove them.
We need to keep the one for res.partner as it's a stored field.
2014-07-25 13:58:59 +02:00
Christophe Combelles 299246e2ae [FIX] account: using wizard methods instead of invoice methods
Typo during port of account.invoice to new API.

(Rebase of 02a36b6 for #1052)
2014-07-22 22:23:54 +02:00
Raphael Collet 33eb3dffb2 [REM] models: remove the magic methods signal_XXX() 2014-07-07 11:50:30 +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