Commit Graph
102493 Commits
Author SHA1 Message Date
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
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 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
Richard deMeester 32b0e9520d [FIX[ account: correct 'read' call
Using the read method should generally pass a single id as a list
due to the new API inheritance of the read method.  If an attempt
is made to use the new API, the result is inconsistent.
Following 4f0ca6d9

Closes #13678
2016-10-12 10:28:16 +02:00
Sebastián Ramírez d30f512128 [FIX] doc: use the correct dir structure
To respect the folders created by scaffold and the coding guidelines
Closes #13676
2016-10-12 10:23:45 +02:00
Sebastián Ramírez 9adcf51600 [CLA] signature for tiangolo
From #13676
2016-10-12 10:23:24 +02:00
开阖软件 Jeff Wang 007607030a [FIX] tools: keep keyword arguments in wrapper
The patched add_sheet method lacks from the keyword argument cell_overwrite_ok
that is present in original code.

Closes #13755
2016-10-12 09:57:35 +02:00
Martin Trigaux 69dfa67ac7 [FIX] pos: do not mix create and validation date
The validation_date was using the creation_date value in the follwing scenario:
1. create a new order with a few lines (creation_date=t1)
2. reload the page, `init_from_JSON` uses validation_date=t1
3. validate the order at t2, ignored due to already stored value

creation_date must be kept for tracablity reasons (e.g. pos_blackbox_be)

Fixes https://www.odoo.com/groups/59/20542134
2016-10-12 09:44:56 +02:00
Nicolas Lempereur 3cd80916f1 [FIX] purchase_requisition: typo in groups name
The field in stock configuration group_stock_adv_location is toggling
the group "stock.group_adv_location". There was a typo which was using
on the form view of purchase.requisition the group
"stock.group_stock_adv_location" instead.

opw-690804
2016-10-12 08:38:00 +02:00
Christophe Simonis 7bdb6f9c8d [MERGE] forward port branch saas-6 up to adead97 2016-10-11 18:00:27 +02:00
Christophe Simonis adead97e53 [MERGE] forward port branch 8.0 up to f4aae1c 2016-10-11 17:58:16 +02:00
Christophe Simonis 24a2217980 [MERGE] forward port branch saas-6 up to c4fb79f 2016-10-11 17:06:35 +02:00
Jeremy Kersten f4aae1c58b [FIX] email_template: encode date/datetime format
See more details here: odoo/odoo@6191e3f6d0

This commit closes #13704
2016-10-11 17:04:36 +02:00
Christophe Simonis c4fb79ff88 [MERGE] forward port branch 8.0 up to ecb6055 2016-10-11 16:56:13 +02:00
Jeremy Kersten 62116e758c [FIX] fields: add group_operator in get_description for Monetary Class.
See previous commit odoo/odoo@4ca06e0255
2016-10-11 16:47:21 +02:00
Christophe Simonis ecb6055b0f [FIX] tools/config: avoid sharing init/demo config
Theses config options should not share the same dict as `init` dict
may be modified by migration scripts to handle new module dependencies.
2016-10-11 16:46:32 +02:00
Olivier Dony 789566a0d0 [FIX] website_livechat: make it auto-install
Most people install the im_livechat module and expect it
to be enabled automatically on their website.
When it doesn't work they try to use the integration JS
code and add it to their website layout, which does not
work as expected.

Setting it as auto-installed solves the issue.
2016-10-11 16:36:39 +02:00
Jairo Llopis dd312e0da2 [FIX] fields: make [(5,)] with computed domain work (#13480)
* Failing test for one2many [(5,)] action, when domain is callable.

The problem is that `self` inside a callable domain becomes the comodel when at [(5,)].

* [FIX][fields] Make [(5,)] with computed domain work.

To reproduce this failure, declare a field like:

```
child_ids = fields.One2many(
    comodel_name="other.model",
    domain=lambda self: [("id", "in", self._ids_to_find())],
)
```

Now set some value to it.

Now unset them. Impossible because ``self`` becomes ``other.model`` in domain evaluation.
2016-10-11 15:14:05 +02:00
Aaron Bohy 8e113aebf1 [FIX] web: X2Many list views: don't display action buttons 2016-10-11 13:52:04 +02:00
Jeremy Kersten 633780a00c [FIX] web,crm: view_list respect group operator defined in the view.
Remove useless avg defined on crm view.

If you define avg='Average Values' in a view, now we see in the footer of list view the average.
2016-10-11 11:50:24 +02:00
Jeremy Kersten 4ca06e0255 [FIX] fields: add group_operator to be availble in get_description.
Web client use fields_get (which one call get_description) to know if
a group operator exists. But until now, group_operator are never returned.

Without it, the web client cannot display the sub-total except for sum
(the fallback in the web client).

This commit closes #13713

Todo: do the same on Class Monetary in next branch
2016-10-11 11:49:55 +02:00
Ravi Gadhia 0afe5d4af5 [FIX] web: hide "Create" button for editable tree views with create="false"
Make it such that the buttons "Save" and "Discard" are still visible.
2016-10-11 10:22:10 +02:00
Thibault Francois 46f3ca0f7b [FIX] res_partner: add index on commercial_partner_id
This commit closes #13716
2016-10-11 09:36:03 +02:00
Goffin Simon 1eb4bb5d74 [FIX] account: Fiscal position tax mapping to including tax
According to the documentation it makes sens to map an excluded tax
with an included tax. For example in Belgium, B2C taxes are generaly
included and B2B taxes are excluded. Then we can manage this situation
by creating a pricelist with prices for B2B and B2C.

opw:688085
2016-10-11 09:22:11 +02:00
Nicolas Martinelli d60354aaf7 [FIX] account: analytic account on write-off
When an analytic account is specified on a write-off move, it should be
written on the move line linked to the write-off account, as it was the
case in v8.

opw-688635
2016-10-10 17:01:21 +02:00
Nicolas Martinelli 2990060b7d [FIX] base_import, base_action_rule: fix traceback
When importing an action rule, an error occurs:
- The import is committed when the user clicks on "Validate"
- The import fails with a traceback when the user clicks on "Import"

This is because commit 7d648542 introduces a `cr.commit()` in the
`_update_registry`, while nothing should be committed upon import
validation.

opw-683874
2016-10-10 14:57:18 +02:00
Martin Trigaux 3f192abafb [FIX] base: correct the translation of auth_ldap module
Invalid rst made the description rendering to crash

Fixes #13695
2016-10-10 13:56:50 +02:00
Martin Trigaux a26b805f5e [FIX] point_of_sale: remove unvalid ACL
The field bank_statement_id was removed at c04065a
The rule is no longer working and we have no link between a cashbox and a bank
statement anymore.

Fixes #13550
2016-10-10 13:56:50 +02:00
qsm-odoo f242721eb0 [FIX] website: fix FAQ Roller opening on old apple devices
On old apple devices (IPad 2, IPhone 4, ...), the FAQ Roller could not
be opened on click. This is because the snippet does not use standard
bootstrap correctly and put the toggle on a <div/> element instead of
a <a/> element.

This fix forces an empty click handler on these <div/>, which allows
standard bootstrap to work.
2016-10-10 12:08:27 +02:00
Christophe Simonis 67d285b9bc [MERGE] forward port branch 8.0 up to d3c4ab2 2016-10-10 11:22:55 +02:00
Jeremy Kersten e2ede31238 [FIX] stock_dropshipping: Prevent dropshipping settings erasable by code update
These data should be in no update. Else at next update, it can change the configuration
of the production.

This commit closes #13404
Courtesy of @bealdav
2016-10-10 11:17:17 +02:00
Jeremy Kersten b770c3e5a3 [FIX] web: fix styling in many2many tag input
Since Chrome 53.0.2785, the input select is hover the existing tag.
With this fix, the existing tag are displayed at the right side of
the input to create a new one.

This commit closes #13655

Courtesy of @8cells
2016-10-10 11:17:17 +02:00
Nicolas Martinelli 9548fcb2e5 [FIX] event_sale: confirm registration
When a user registers for an event on the front-end, the confirmation of
the associated SO will also confirm the registration. However, if a SO
is created manually and a ticket event is added to it, the confirmation
of the SO will not trigger the confirmation of the registration.

In the second case, the registration simply doesn't exist yet at
confirmation and is created by the method `default_get` of
`registration.editor`.

We make sure to confirm these registration when we make the final
reservation.

opw-688665
2016-10-10 10:24:57 +02:00
Nicolas Martinelli a1d6c2d631 [FIX] account: check exchange rate
An issue occurs in the following situation:
- Define a currency exchange rate at day 1 and day 2
- Create an invoice at day 1, and calculate the taxes. Do not set an
  invoice date!
- Validate the invoice at day 2

The exchange rate for taxes is the rate at day 1, while the exchange
rate for other amounts is the rate at day 2.

There is actually no way to know what was the rate applied for the
taxes at invoice validation. There are two solutions:
- recompute the taxes at validation
- force the user to set an invoice date and recompute manually the
  taxes

The first solution might have unexpected effects, therefore the second
solution is applied.

Fixes #13473
opw-688517
2016-10-10 10:08:33 +02:00
Sébastien BEAU 1c2a7b8e3f [FIX] purchase: copy company in picking
In a multi-company environment, we need to make sure to copy the company
of the PO to the company of the picking. Otherwise, it might happen than
the PO as a different company than the picking.

Closes #13129
2016-10-10 09:57:14 +02:00
Odoo Translation Bot d3c4ab23e4 [I18N] Update translation terms from Transifex 2016-10-09 02:56:21 +02:00
Odoo Translation Bot 7185ae4f67 [I18N] Update translation terms from Transifex 2016-10-09 00:34:56 +02:00
Michael Brown d477dcc316 [FIX] models: fix behaviour of 'defer_parent_store_computation'
If a model uses nested sets to maintain a hierarchical record
ordering, then bulk inserts (e.g. via a CSV import) are likely to
suffer from an O(n^2) performance penalty, since there is a high
chance that each new record will require many of the existing records'
parent_left and parent_right fields to be updated.

The context parameter 'defer_parent_store_computation' may be passed
to the load() method, in order to defer updating the parent_left and
parent_right fields until after the bulk operation is complete.  This
appears to have last been fully supported in version 7 (via the old
import_data() method).

It is still possible to specify 'defer_parent_store_computation',
e.g. via an XML-RPC call such as

  m.execute_kw(dbname, uid, password, 'stock.location', 'load', [],
               {'fields': fields, 'data': data,
                'context': {'defer_parent_store_computation': True}})

This will currently defer the recalculation of parent_left and
parent_right, but does not correctly call _parent_store_compute()
after the bulk operation is complete.

Add the missing call to _parent_store_compute() to perform a one-time
update of the parent_left and parent_right fields if needed after the
import operation is complete.

Also fix the child_of_domain() and parent_of_domain() expression
methods, so that the 'child_of' and 'parent_of' operators give correct
answers when updates to parent_left and parent_right have been
deferred.

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>

Closes #13688 (part 2/2)
2016-10-06 17:52:03 +02:00
Michael Brown 22c4a0c1b0 [FIX] expression: pass context to hierarchical domain operators
The expression context is currently passed to to_ids() but is missing
from all calls to child_of_domain() or parent_of_domain().  These
methods are effectively always passed a context of None.

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>

Closes #13688 (part 1/2)
2016-10-06 17:51:28 +02:00