Commit Graph
102529 Commits
Author SHA1 Message Date
Nicolas Martinelli 3164ca8962 [FIX] account: define tax base
Make sure tax.base is always defined to avoid traceback.
2016-10-24 09:01:21 +02:00
Odoo Translation Bot f74ea276cd [I18N] Update translation terms from Transifex 2016-10-23 00:35:59 +02:00
Raphael Collet bde400ca3e [FIX] account: account tax base computation
In the earlier fix 327f88df, the computation of the amount crashes when the
field `tax_id` is not set.  Simply add an 'if' statement to avoid that case.
2016-10-21 09:46:59 +02:00
Aristobulo Meneses d31bd1feb0 [IMP] account: display totals on float fields
On the Customer invoice, Vendor Bills and Payments list views.
The feature exists for Journal Items and entries, but not on invoices and
payments.

Closes #13915
Fixes #13914
2016-10-20 17:21:12 +02:00
dut-odoo 9c77467f07 [FIX] l10n_in: taxes tags
There are inconsistencies between the tax tags as defined in the module
and what the reporting expects.

opw-689188
2016-10-20 15:36:36 +02:00
Nicolas Martinelli d30dc96750 [FIX] account: aml linked to statement
When fetching the journal items linked to a bank statement, the
counterpart items are not retrievd since they are not directly linked to
the bank statement. It makes the entries look unbalanced.

Closes #13673
opw-690231
2016-10-20 13:50:09 +02:00
Denis Ledoux afc2497a48 [FIX] account: invoice report, advances counted twice
The below revision force the use of `ABS` on the
`price_subtotal_signed` because of a migration issue:
649b289fa1

This leads to issues regarding the advances, in
`out_invoice` invoices, where this amount
`price_subtotal_signed` is negative, and should
remain negative in this report, otherwise
the advance is counted twice: Once with
the advance invoice, and a second in the actual
invoice where the advance is removed with a line
with a negative `price_subtotal`

e.g.
 - A sale order of 500€ without taxes
 - Create an advance invoice for an advance payment of 10%: 50€ without taxes
 - A second invoice with the remaining: 450€ without taxes

In the invoices report, the total without taxes for this customer was
displayed as 600€ (50 + 500 + 50)
instead of   500€ (50 + 500 - 50)

opw-682390
2016-10-20 13:48:01 +02:00
Goffin Simon e69b0d9876 [FIX] account: Currency rate in account.invoice.report
It's more usefull to display the average than the sum for the currency
rate in account.invoice.report

opw:690899
2016-10-20 13:10:28 +02:00
Nicolas Martinelli 65878a5b85 [FIX] account_asset: posted depreciation line
When the account move line linked to a depreciation line is deleted, the
depreciation is still considered as 'Posted'.

opw-691084
Fixes #13801
2016-10-20 12:38:05 +02:00
Nicolas Martinelli ebf3b3d7a8 [FIX] account: potential traceback
The method `get_by_record` expects a singleton.

opw-691198
2016-10-20 10:46:19 +02:00
Jeremy Kersten 62c0a161ef [FIX] web_planner, account: add support for enterprise module + fix link 'Revenue Recognition'
Now, when the module is not found, instead to display a traceback, we open a popup to upgrade to Enterprise.

That will be wrong in case of outdated / wrong link, but in most cases, it is because it is an enterprise module.

This commit closes #13882

TODO: Remove zindex 1051 on planner in master/saas-14
2016-10-19 18:31:37 +02:00
Christophe Simonis 28560a34da [MERGE] forward port branch saas-6 up to 8e094bb 2016-10-19 17:23:45 +02:00
qsm-odoo 01186fef58 [FIX] website_blog: prevent blog title to overflow the cover
Note: in 10.0, the layout has changed and it is not a problem anymore.
2016-10-19 14:52:39 +02:00
Jeremy Kersten ce7f7a5687 [FIX] account: change link in planner for Contract and subscriptions
account_analytic_analysis doesn't exists anymore.

This commit closes #13867
2016-10-19 14:38:21 +02:00
Goffin Simon d3c84ed42c [FIX] account, account_cancel: visibility of the button_cancel_reconciliation
When a account statement is validated, it's not possible to cancel a statement line.
To cancel a line from a validated statement, you must first reset to new the statement.
In this way, it's not possible to have a validated statement with unreconciled lines.

opw:690766
2016-10-19 14:09:22 +02:00
Nils Hamerlinck 8e094bb8fd [FIX] point_of_sale: return raises an irrelevant warning
When returning an item by entering an orderline with a negative quantity
you got a warning message asking you to confirm a large payment
amount. Introduced by 5a3d9ce9ce.

Closes #13777
2016-10-18 17:53:02 -07:00
Joren Van Onder 8e720a9319 [FIX] point_of_sale: delete validated orders immediately from db
If you validate an order it will be sent to the backend. If you then
close the POS frontend somehow before clicking 'Next order' this order
will be reloaded from localStorage when reopening it. This is
problematic because it allows the user to then modify this order and
validate it again. Everything will appear fine but in the backend this
new, modified order will be ignored as it has the same pos_reference as
the one that was sent initially.

The deeper underlying issue is that there exists a brief timeframe where
the same order can exist twice in the db: both as 'order' and
'unpaid_order'. To ensure this does not happen this fix removes the
order from the unpaid orders after it is saved as a validated order.

Fixes #13538
2016-10-18 16:56:46 -07:00
Wolfgang Taferner 327f88dfce [FIX] account: tax base computation
Before the fix, the tax base amount is computed only for a complete
invoice line. However, depending on the tax sequence and their inclusion
in the base amount, the tax base amount might be different for the
various taxes of an invoice line.

We keep track of the base amount for every single tax, and refactor the
`_compute_base_amount` to take these values into account.

opw-691177
Closes #13819
2016-10-18 13:58:14 +02:00
Goffin Simon dca292b268 [FIX] base_action_rule: Add followers in automated actions
When registering a payment on an account invoice with an automated
action which adds a follower "On Creation & Update", the function
recompute was triggered(due to the field residual_company_signed)
and the same followers was added two times for the invoice.

The fix avoid to unlink and create the same followers several
times(because it was the case with the function "_add_follower_command")

opw:690939
2016-10-18 09:56:24 +02:00
Stéphane Bidoul 7e58821a9f [REF] account: prepare method for invoice tax lines
This is needed for example, to enhance the analytic dimension of these
lines.

Closes #12739
opw-691337
2016-10-17 15:21:47 +02:00
Nicolas Martinelli ea53259d27 [FIX] account_asset: inconsistencies deferred revenues and assets
The following configuration leads to different results:
- Deferred revenue: 12 entries, 1/month, prorata temporis, 1000€,
  date 15th of October
- Asset: 12 entries, 1/month, prorata temporis, 1000€, linear, date
  15th of October

Deferred revenues and assets should give identical results.

opw-690034
2016-10-17 14:20:19 +02:00
Christophe Simonis b14c8b361c [MERGE] forward port branch saas-6 up to fa50349 2016-10-17 13:14:22 +02:00
Christophe Simonis fa50349d7e [MERGE] forward port branch 8.0 up to 001610e 2016-10-17 13:01:20 +02:00
qdp-odoo 001610ece9 [FIX] anglo_saxon_dropshipping: fix accounting entries creating on anglo_saxon + real_time + dropship.
This revert the fix made on 7bdd4de and replace it with a proper one that do create an account entry from stock_input to stock_output on a dropship move. That way, we avoid the manual change of account on supplier invoice. See the whole discussion on odoo#12687
2016-10-17 09:39:53 +02:00
Odoo Translation Bot d1c81f136c [I18N] Update translation terms from Transifex 2016-10-16 02:57:56 +02:00
Odoo Translation Bot 2ce7679032 [I18N] Update translation terms from Transifex 2016-10-16 00:34:35 +02:00
Martin Geubelle 0d5bdaa5a0 [FIX] anonymization: remove unstored field
In 8.0, the field `base` was a stored Float (see https://github.com/odoo/odoo/blob/8.0/addons/account/account_invoice.py#L1516 )
In 9.0, the field `base` is a Monetary computed non-stored (see https://github.com/odoo/odoo/blob/9.0/addons/account/models/account_invoice.py#L1307 )

As it is not stored, there is no point of anonymise it, so it can be removed from the CSV file.
2016-10-14 18:18:31 +02:00
Martin Geubelle cbd3e8fcbd [FIX] anonymization: add monetary field 2016-10-14 18:14:24 +02:00
Jeremy Kersten 33978d7a7a [FIX] stock: adjustement inventory, check options activated in res config
Before this commit, the inventory by lot/pack/serial/... was only visible
if you switch quickly between res_config and adjustment inventory... once
the vaccumn clean the osv memory, the options was ignored.

Same issue with the _get_string_qty_information function.
2016-10-14 18:07:21 +02:00
Jairo Llopis 448521df64 [FIX] fields: setting a one2many field deletes all its lines (#13082)
Setting the value of a one2many field (`rec.line_ids = ...`) converts the new
recordset to a list of commands, and passes it to `write`.

Currently the list of commands is like: `[(5,), (0, 0, vals), (1, id, vals), (4, id), ...]`.
Notice that the command `(5,)` is inappropriate here: it deletes all the
existing lines of the record. Reintroducing the same lines with `(4, id)`
commands crashes, because the corresponding `id` is no longer in database.

The fix serializes the recordset as a list of commands like
`[(6, 0, ids), (0, 0, vals), (1, id, vals), ...]`.
Only the lines that are not kept will be deleted in this case.
2016-10-14 14:54:02 +02:00
Pierre Masereel 852e2c557e [FIX] barcodes: set_quantity traceback on mobile
When we are trying to set the quantity on a mobile device, we get
a traceback saying that we cannot call the 'find' function on the
elements returned by '_get_records'.

This '_get_records' function returns a 'Collection' when called on a tree
view and an 'Array' when called on a kanban view. When we are working
on a mobile device, most of the one2many are displayed as kanban.
The thing is when we work with the object returned by '_get_records' we
call a 'find' method on it, which is implemented by Odoo's Collection class.

So when we call 'find' on an 'Array' we actually call 'Array.prototype.find' which
is implemented on most desktop browser and on some mobile browser [1]. This is what
caused the traceback on Chrome in Android.

To fix this issue, we enforce '_get_records' to always return an 'Array' and we ensure
that, when working on this 'Array', we use '_.find'.

[1] https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find
2016-10-14 12:22:22 +02:00
Denis Ledoux 4a0a279472 [FIX] website_quote: correct company for the quote validation
In the frontend customer quote validation,
the company used in the sentence
```
I agree that by signing this proposal,
I accept it on the behalf of
```

was the quotation company, which is the company
which is selling, not the company/customer which is buying,
and this does not make any sense.

Instead, it should use the company of the customer
accepting the sales order, or simply the customer
if he does not have a company set.

The only case which make it a little weird is when
it's the customer himself, without parent company,
who is accepting the quote
"on the behalf of himself", but:
 - This isn't possible to correct this without
   breaking the translations, because the
   sentence "I accept it on the behalf on"
   is within the same sentence than
   "I agree that by signing this proposal"
 - This makes sense if another person than the
   customer himself is validating the order
   (the customer sent the quote link with the token
    to another person).

opw-690837
2016-10-14 11:38:36 +02:00
Thomas Binsfeld d0bfcfd41d [FIX] Inheritance of purchase_order_change by preparing data dictionary
Data dictionary filled inside the function purchase_order_change had no possibility
of inheritance.

opw:690733
2016-10-13 22:30:40 +02:00
Jairo Llopis a2f0dda366 [FIX] website_portal: redirect to login for '/my' controller
Current issue without this patch:
On a bare database, install `website_portal` and go to `/my/home` logged out.
You get to an empty page where you can see Public User's details.

Expected behavior with this patch:
User should be redirected to the login page.

Additional notes:
- Other submodules (`website_portal_sale` and `website_project_issue`) were
  actually implementing this, so that is removed BTW and relies in base
  module's now sensible behavior.

This commit closes #12775
2016-10-13 16:30:03 +02:00
Simon Lejeune 4450495e9e [REF] web_kanban: allow a custom limit defined in the arch
With this commit, it's now possible to set an arbitrary limit on any
kanban view by adding a limit attribut to the root kanban tag in a
kanban definition.

Do not forward-port.

Backport of rev 8a87c382ba
2016-10-13 16:20:30 +02:00
Nicolas Martinelli 1f0a778742 [FIX] stock: reverse picking in several steps
- Activate the receipt in two steps on the warehouse
- Create a PO for a stockable product
- Receive the product in Input zone
- Receive the product in Stock
- Reverse the move to Stock > products are back in Input
- Reverse the move to Input

You can't reserve quantities for this last move (from Input to Vendor).

This is because a picking has been automatically created from the Input
to Stock.

Original move which is reversed: Input -> Stock
When we reverse it, we don't want to send it back to Stock, so we need
to check the destination location of the original move, not its
location.

opw-689206
2016-10-13 16:12:05 +02:00
Devendra Kavthekar c63c225274 [FIX] web: is_false() for reference field widget. (#9335)
In the widget, the value of reference field is a pair `[val1, val2]`.
When the field is blank, its value is `[false,false]`, thus checking `[false,false] === false`
never succeeds, and this breaks the check for required fields.
2016-10-13 16:01:21 +02:00
Simon Lejeune 5abe76c2d2 [FIX] web: clear_uncommitted_changes on browser's back button
This is done by guarding the `on_hashchange` evant handler with the
`clear_uncommitted_changes` function.

Note that the url has already changed when we are in this handler, so we
make sure to restore the old url when the user chose to continue its
edition.
2016-10-13 15:51:09 +02:00
Yenthe V.G cfe0dc6d34 [FIX] website_sale: remove duplicated method
Added twice during a forward port

Closes #13796
Fixes ##13795
2016-10-13 14:31:18 +02:00
Adrien Peiffer (ACSONE) d81258ab8e [FIX] Consider currency rate to compute total amount in expense analysis
Like in Invoices Analysis, the expenses must be expressed in the currency
of the company. In this way, it makes sens to sum them to compute the total.

opw:689760
2016-10-13 11:24:06 +02:00
Richard Möhn cb581bc14f [FIX] api: in todo list, group records to recompute by environment (#11267)
The effect of this change is to trigger the recomputation of fields on larger
recordsets.  This takes advantage of batch computations within compute methods.
2016-10-13 10:13:33 +02:00
Nicolas Martinelli f4d7d04c1d [FIX] l10n_in: taxes tags
There are inconsistencies between the tax tags as defined in the module
and what the reporting expects.

opw-689188
2016-10-13 10:10:13 +02:00
Goffin Simon 7bcc197531 [FIX] sale: Making a downpayment with a fiscal position
When creating a SO line and an invoice line for a downpayment,
the fiscal position set on the SO must be taken into account
to map the right taxes.

opw:688611
2016-10-13 09:15:48 +02:00
Jeremy Kersten d3609f7f19 [FIX] web,crm: list view, don't fallback on group_operator declared in python
Partial revert of odoo/odoo@633780a
2016-10-12 18:03:51 +02:00
Jeremy Kersten 7fb1b6f30b [FIX] utm: dont try to set cookies if Response is Exception
Also prefetch tracking_fields before the call to super to avoid to use a closed cursor.
See odoo/odoo@6780597

this commit closes #13646
2016-10-12 17:57:24 +02:00
Christophe Simonis 6faf232b71 [MERGE] forward port branch saas-6 up to ef4efea 2016-10-12 15:33:01 +02:00
Christophe Simonis ef4efeac7c [MERGE] forward port branch 8.0 up to 16430be 2016-10-12 15:27:07 +02:00
vnsoft 16430be566 [FIX] models: in method read_group(), allow orderby='id desc'
When orderby argument is 'id desc', an error occurs: "read_group order by 'id'
ignored, cannot sort on empty..."
2016-10-12 13:19:37 +02:00
Alexandre Fayolle 65c685ad24 [FIX] context mutations (#10368)
when extending these methods with the new api, the context is a frozendict
so we need to copy before mutating.

this patch was made by searching for key addition to context and calls to the
update() method on the 8.0 addons, and checking if a copy was made before in
the method.
2016-10-12 12:30:42 +02:00
Cedric Snauwaert 77c64e3f05 [FIX] account: add a constraint to prevent the change of the reconciliation flag on account when there are already account_move_line existing 2016-10-12 10:35:29 +02:00