Commit Graph
103218 Commits
Author SHA1 Message Date
Goffin Simon 0366ae16a9 [FIX] warning: onchange_partner_id
The function _onchange_partner_id must be triggered when the field 'company_id'
is modified like with function _onchange_partner_id in addons/account/models/account_invoice.py
In this way, the account_id is set in 'account.invoice when the 'company_id' is changed.

opw:652918
2015-10-29 15:58:44 +01:00
Joren Van Onder 87a3fe92de [FIX] point_of_sale: forward port of 35e9fa5c41
Non-trivial port because 9.0 has rescue sessions that kind of try to
solve the same problems, however:

- they do not automatically put orders into a compatible, newly opened
  session because it explicitly searches for rescue sessions. So if
  you open a new session and create a new order in a POS associated to
  a closed session you will end up with two open sessions (one rescue,
  one regular).

- they throw exceptions with cash control enabled

- they're a bit more complicated because they introduce the idea of
  'rescue' sessions, which the 8.0 fix does not (it just uses regular
  sessions).

So this reverts bed409322d without
changing the database and while still ensuring that databases with
existing POS rescue sessions don't break.
2015-10-29 15:56:25 +01:00
Denis Ledoux 05381a8bed [FIX] res_company: parent company field mis-aligned
The `parent_id` field was mis-aligned in the `res.company`
form view, making the input away for its label.

We moved the field to the General information tab, to not
overcrowd the headers.

opw-653373
2015-10-29 15:42:47 +01:00
Christophe Matthieu 5b5f89e2be [FIX] web_editor: select default text of the snippet when click on the text 2015-10-29 15:31:42 +01:00
Christophe Matthieu 8ebe4b2d56 [FIX] web: can remove record in many2many kanban view
Wrong underscore method called.

Issue: go on customer form view, remove a contacts in the many2many kanban view and save. The record is not unlink.
2015-10-29 15:31:42 +01:00
Christophe Matthieu c8e7e1dc5b [FIX] web_editor: don't remove char after a selection when click on delete
Issue: click on an image or create a text selection and click on delete, the char after the selection is removed
2015-10-29 15:31:42 +01:00
Christophe Matthieu dbce114ba6 [FIX] web_editor: remove useless duplicated code 2015-10-29 15:31:42 +01:00
Goffin Simon 46266ee11e [FIX] website: _view_obj in multi websites
First 'key' and 'website_id' fields must be checked to retrieve
the right view.
Then if no view is found, it falls back on xml_id.

To choose the right ir_ui_view, _view_obj must take into account
the 'website_id' set in the context.

Inspired from function "get_view_id" in addons/website/models/ir_ui_view.py
2015-10-29 15:19:10 +01:00
Nicolas Lempereur 1da79c54a1 [FIX] web{site,_editor}: gallery upload image
* when getting the src of an uploaded attachment we have to use src which
  is by default url,

* in a MediaDialog the pager is shared between the document and image
  dialog, but when changing page, it was done for both (even if not
  displayed),

* select the image after uploading it in the ImageDialog.

closes #9284
opw-653061
opw-653167
2015-10-29 13:25:27 +01:00
Christophe Matthieu a71caede2d [FIX] web_editor: keep the javascript reference to globalSelector object for odoo javascript module
related to #9284
opw-653061
opw-653167
2015-10-29 13:25:26 +01:00
Nicolas Martinelli 1f43fa9dfe [FIX] web: do not write twice when updating value
The issue occurs for example in the Sale dashboard, when the user
changes the target amount. If the user changes the value, then directly
clicks outside of the field, the method on_change_input will be called
twice: the first time because of the event 'change input', the second
time because of the event 'blur input'. This makes an unnecessary write,
which can cause an error due to concurrent access.

This prevents the execution of the write related to the event 'change
input' in this case. If the user changes the value but clicks on
'Enter', the focus is still on the field so the update is done
correctly.

Courtesy of Quentin Smetz (qsm@odoo.com)

opw-653086
2015-10-29 12:44:07 +01:00
Christophe Simonis d7b0a56f34 [FIX] website: add /website/image compatibility routes 2015-10-29 12:39:10 +01:00
Nicolas Lempereur 7ffc2916ee [FIX] website: slide position gallery snippet
Changing position of a slide from the gallery snippet was not working.

saas-6 part of #9284
opw-653061
opw-653167
2015-10-29 11:55:53 +01:00
Olivier Dony 6aa27e644f [FIX] im_livechat: match_rule() expects an ID, not a record 2015-10-29 08:58:11 +01:00
Christophe Matthieu ee2b550f3c [FIX] web: radio button display empty value when change record
When a selection field with widget="radio" is False, the form view display the previews value for this field.

1 - Create a selection field (ex: [("1", "1"), ("2", "2")]), and display it on a form vue.
2 - Go to the form view (all the record have False value for this field).
3 - Change the value of this field for one record.
4 - In readonly mode, all other records now wrongly display this value (still False in DB or when "edit").

#opw-652002
2015-10-29 07:21:36 +01:00
Nicolas Martinelli efbdac1efb [FIX] sale: do not crash if no value set
If the user does not set any value, the conversion of an empty string to
a float generates a traceback.
2015-10-28 17:07:01 +01:00
Ludovic Laffineur lla 3dafb19c96 [IMP] payment_adyen: add support HPP notifications from adyen
It is mandatory to switch to a production account
2015-10-28 16:36:18 +01:00
Denis Ledoux cdc795b200 [FIX] sale: Taxes mis-aligned with their column label
Regression introduced with 71c624163c.

If the discount column is not added in the `tbody`
when not part of the group `sale.group_discount_per_so_line`,
the head column should not be added either in the `thead`

opw-653242
2015-10-28 16:28:25 +01:00
Nicolas Lempereur 665bc1c935 [FIX] web{,_kanban}: too much and too little shortcuts
When several accesskey with the same key,  are defined on elements, the
last one (even if not displayed) is the one which will be actioned and
the key sequence is pressed.

This caused an issue since the "Pager" template is shared between all
elements, even the x2many relational widgets.

Also there was shortcut for Create/Save/Discard on the form view, but
those shortcuts should also be enabled in the list and kanban view.

closes #9267
opw-652888
2015-10-28 15:32:31 +01:00
Martin Trigaux 9593c08673 [FIX] im_livechat: typo 2015-10-28 14:33:56 +01:00
Nicolas Martinelli de8f3f70fd [FIX] website_quote: support of 2 routes to accept quote
Complement of commit d9c2d03. We should still support the old route, in
case users do not update the template.
2015-10-28 14:33:07 +01:00
Joren Van Onder 35e9fa5c41 [FIX] point_of_sale: handle POS clients with a closed session
People sometimes have an open POS client (/pos/web) which is associated
to a closed POS session. This causes multiple issues. The most important
problem occurs when a user closes the session and opens a new session
without refreshing the POS client. When doing this new POS orders will
become part of the old, already closed session and no new accounting
entries will be generated.

In order to fix this we make sure to check that the session that's
associated with the order that we get from the client is still open. If
it isn't we'll try to find a new, compatible session and add the order
there. If we cannot find a compatible session we'll create a new one
based on the old, closed one. When creating this new session we bypass
the opening_control phase which normally takes care of opening cash
control.

opw-652356
2015-10-28 14:04:25 +01:00
Denis Ledoux dcd8d65fd1 [MERGE] forward port of branch saas-6 up to 6a306a03be 2015-10-28 14:01:10 +01:00
Denis Ledoux c8d6b36632 [MERGE] forward port of branch saas-6 up to a0c64bebe6 2015-10-28 12:01:30 +01:00
Christophe Simonis c0066c600e [FIX] website_forum: tags should be unique per forum 2015-10-28 11:55:53 +01:00
Christophe Simonis b89bbf18c4 [FIX] crm: tags are globals
Do not show the related sales team as it is not used to filter tags.
2015-10-28 11:49:09 +01:00
Goffin Simon b3bf69f860 [FIX] account_asset: no_create in invoice_id field
It cannot be possible to create a new invoice from the asset.

opw:652774
2015-10-28 10:48:44 +01:00
Nicolas Martinelli d9c2d03532 [FIX] website_quote: fix Sign & Confirm
Commit 7636b51 modifies the route from JSON to HTTP by mistake. Indeed,
the route /quote/accept is called from an ajax.jsonRpc request, not from
the `method="POST" t-attf-action="/quote/accept` which can be found in
website_quotation.xml.

The t-attf-action is actually only used to recover the order_id and the
token in website_quotation.js.

opw-652874
Closes #9227
Fixes #9226
2015-10-28 08:02:24 +01:00
qsm-odoo 58be02b927 [IMP] website: theme customization assets recomputing
Assets are now split in multiple files and there is not a route which
always leads to the last version of an asset. This commit adapts theme
customization (without reloading) to these new features.
2015-10-27 16:32:35 +01:00
qsm-odoo 7329a7fc55 [FIX] website: theme customization modal overflow 2015-10-27 16:14:14 +01:00
qsm-odoo b3590c7104 [FIX] website, web_editor: missing returns in theme JS 2015-10-27 16:13:44 +01:00
qsm-odoo 652956d192 [FIX] web_editor: missing !important on mt,mb,ml,mr rules 2015-10-27 16:13:15 +01:00
Nicolas Lempereur 4513092733 [FIX] web: restoring action from breadcrumb nav
When clicking on a breadcrumb taking us to a previous view, we should
restore that view action and not keep the current one.

closes #9075
opw-652039

note: no forward-port needed
2015-10-27 15:29:29 +01:00
Denis Ledoux e6a3852c1f [FIX] website: child menus without url.
This is possible to have a child menu without URL.
The condition checking if the `active` class
must be added or not must take that into account.

opw-653132
2015-10-27 13:47:08 +01:00
Denis Ledoux 2ec9a9c992 [FIX] account: @api.v8 account.tax.compute_all expects a currency browse record
The method `compute_all` of `account.tax` in api.v8
expects a currency browse record, not a currency id.

It's the `compute_all` of api.v7
that expects a currency id.

opw-653106
2015-10-27 13:29:03 +01:00
Denis Ledoux e75314511d [FIX] account: resolve taxes ids triplet commands
`vals[tax_ids]` can be a command triplet,
see:
https://www.odoo.com/documentation/master/reference/orm.html#openerp.models.Model.write

Doing
`tax_ids = map(lambda tax: tax[1], vals['tax_ids'])`
to resolve the command doesn't work for all triplet types,
for instance it doesn't work for triplet `(6, 0, [...])`

To resolve properly a 2many commands, `resolve_2many_commands`
should be used.

opw-653106
2015-10-27 13:29:02 +01:00
Denis Ledoux 76ef3ee98a [FIX] account_cancel: forward port of 6f355623f0 & 79822ed30a
The two above revisions had to be adapted between 8.0 and 9.0:
 - There is no longer any `draft` state on `account.bank.statement`,
   it's now `open` or `confirm`.
 - There is no longer two views, for bank statement & cash regiters.
   There is only one. No need to duplicate the inherited views to add
   the cancelling buttons.

opw-653106
2015-10-27 13:29:02 +01:00
Nicolas Martinelli 9c77e29d4c [FIX] account: make currency visible
It is impossible to post a manual journal entry when an amount currency
is filled in since the currency must be specified.

opw-652890
2015-10-27 13:09:01 +01:00
Goffin Simon fa85b0f075 [FIX] sale_mrp: get_parent_move
The function get_parent_move is waiting a stock.move record not an id.

opw:653105
2015-10-27 12:34:48 +01:00
Olivier Dony 76593cd081 [FIX] base: ir.model.data: safer tests for index creation
Complements b99ef3b125.
The index definitions have changed, so we need distinct names
and existence tests to make sure they get properly created/altered
on older databases.
2015-10-27 11:06:58 +01:00
qdp-odoo ea12117f65 [IMP] account: auto-install 'l10n_uk' for country code 'GB'. Auto install 'l10n_generic_coa' if there is no dedicated localization found for the country code 2015-10-27 10:44:50 +01:00
Denis Ledoux 6c8a844585 [FIX] account: partner read access in multi-companies
The below revision:
275234c067

Makes the multi-companies record rule disabled by default,
meaning the user can see contacts from other company than
his current company.

Nevertheless, to read the computed field `currency_id` on
the `res.partner` model, the user need the read access
on the contact `company_id` field, that the user does not have
if the partner company is not a child of the user current company.

opw-653103
2015-10-27 10:42:39 +01:00
Nicolas Martinelli f2f3149838 [FIX] website_sale: promo code removal
It was impossible to remove a promo code. Some cleaning done as well.
2015-10-27 09:59:23 +01:00
Nicolas Martinelli 3371e65b08 [FIX] website_sale: taxes when creating SO line
The taxes were not computed when the SO line was created.
2015-10-27 09:59:23 +01:00
Nicolas Martinelli 7b41e39fa7 [FIX] website_sale: Price units corresponding to pricelist
The method _webiste_product_id_change now properly browses the product
as it is done in the method product_id_change of the sale module. Prices
are now updated according to the pricelist.
2015-10-27 09:59:23 +01:00
qdp-odoo 098fc9f1e8 [FIX] purchase: fixed wrong portage to new API. Fixes #9252 2015-10-27 09:50:16 +01:00
Christophe Matthieu 07ce3cd4d1 [FIX] web: error on change value in o2m after an other field onchange if the o2m contains o2m
o2m editable list open a form view and can put command as default value (record[this.name] for o2m in a o2m) for the editable fields.
When the onchange is triggered, get_value create a wrong command of command.

step to reproduce issue:
* edit a quotation with at least on sale order line
* change the pricelist
* change the quantity of the sale order line

todo : remove _on_load_record in version > 9.0 and use new dataset implementation with to_delete attribute
2015-10-26 19:27:34 +01:00
Denis Ledoux 34e90a44f8 [MERGE] forward port of branch saas-6 up to 20dba161d0 2015-10-26 19:17:21 +01:00
Raphael Collet 16bf2e9402 [FIX] res_lang: fix confusion between class variable and local variable 2015-10-26 17:28:21 +01:00
Raphael Collet 845c10fef2 [FIX] res_lang: fix confusion between class variable and local variable 2015-10-26 17:27:01 +01:00