Commit Graph
117975 Commits
Author SHA1 Message Date
Alexandre Kühn b15e805b5a [FIX] board,web: edit custom views in place
Before this commit, whenever we do an operation on any of these custom views,
such as folding it, the custom view was saved by creating a new one.

This behaviour comes from a lost feature to undo operations on custom views.
Since we do not have this feature anymore, it makes no sense to create new
custom views on save, instead of applying the changes in place.

With this commit, custom views are edited in place.

Fixes #23712
2018-04-17 17:28:49 +02:00
Nicolas Lempereur 91ca846447 [FIX] account_check_printing: write payment not journal
When we make a payment, we need the write access on account.journal
because check_manual_sequencing on account.payment is a related field
of account.journal and was used to decide on numbering the check or not.

With this change, the write access is not required.

opw-1834343
opw-1835888
closes #24281
2018-04-17 17:26:19 +02:00
Vincent Schippefilt e7de4c0e5f [FIX] web: display shortcuts in community
before this fix, hitting the ALT key did not show the shortcuts on the
buttons

after this fix, the events of the web_client are extending those of
abstract_web_clients where the keyboard navigation is hooked up, so the
shortcuts are visible
2018-04-17 16:51:43 +02:00
Vincent Schippefilt ddecc5079f [FIX] web: focus the search box in kanban view
Before this fix, the focus was not set when opening a kanban view
After this fix, the focus is set on the search view (unless there is
a quick create, in which case the focus will be on the quick create)
2018-04-17 16:51:43 +02:00
Christophe Simonis 0cd2cff259 [MERGE] forward port branch saas-11.3 up to fdef30fc29 2018-04-17 16:24:27 +02:00
Aaron Bohy 74e208eabf [FIX] base: export translations for added terms
in commit f27e86b
2018-04-17 15:36:05 +02:00
Martin Geubelle cd934f307d [FIX] web: handle x2m commands with reference as default
Before this rev. it was not possible to define a value for a reference field
in x2m commands as default value.

Courtesy of @kaerdsar.

Closes #24070
2018-04-17 15:31:33 +02:00
Martin Geubelle 9e6c616130 [FIX] web: focus select in reference widget
In the reference widget, the focus was always on the input (many2one) even
though the first select (with the model) was not set.

Thanks to @kaerdsar for the original PR.

Partially closes #24070
2018-04-17 15:31:32 +02:00
Christophe Simonis fdef30fc29 [FIX] purchase: ignore quantity sign when computing move amount_currency
Since 348c371ee8, the quantity is negative
for out moves. Ignore the sign when computing the amount_currency value.
2018-04-17 15:30:02 +02:00
Romain Derie ab6c3f66a3 [FIX] website_sale_wishlist: correct tour for new checkout
The website sale wishlist tour checks if you are correctly redirected to the
cart.
To do so, it checks if the cart title 'Shopping Cart' appears on the screen.

But since there is a new checkout in saas-11.3 with 006ce9c88 that removed this
title, we need to trigger on something else.
2018-04-17 15:17:29 +02:00
tgroutars f27e86bdde [FIX] base: no crash when setting wrong relation to m2m
Before this rev., in the ir.model.fields form view, it crashed
when the user specified an invalid model name as a relation for
fields of type many2many (the onchange crashed). This rev. displays
a warning instead.

opw 1837401
2018-04-17 14:46:54 +02:00
Luis González 1328c0960d [IMP] tools: avoid concurrent creation of the session_dir
Instead of:
1. testing the existance
2. creating the directory if not exists

(which would not work if a concurrent creation is done between step 1 and 2)

do:
1. try to create the directory
2. skip if it fails

Ask forgiveness, not permission

Closes #24210
2018-04-17 14:09:34 +02:00
Yannick Tivisse 7a24df4889 [FIX] sale_margin: Fall back on the user company if not set on the SO line
As the company is not required on a sales order, this could lead to
errors when trying to compute the margin as _convert is expecting
a valid company.
2018-04-17 13:56:39 +02:00
Yannick Tivisse ceb5c2be57 [FIX] account: Pass correct company and date to _convert on dashboard rendering 2018-04-17 13:56:38 +02:00
Lucas Perais (lpe) df02dc37fd [FIX] web: pivot: correctly save and restore groupbys on rows and cols
On a pivot view expand a field in column
another one in row
Then put a domain in the search view
Save the whole thing (ir.filter) as favorite

Before this commit, the ir.filter was not saved the right way when a domain was present
(Let alone its restoration)
This was because of
- the internal default groupbys of the pivot model was not updated, and what we got in the params was overwritten
by what existed before
- a slight typo in the code made the row updated with the col values

OPW 1835865
OPW 1829925

closes #24215
2018-04-17 13:43:46 +02:00
qsm-odoo c35e24aa8e [REF] web: remove useless oe_number rule
This was introduced as a fix for grouped list views' headers while we
should have added the 'o_list_number' class instead... which is the
case now. So the oe_number rule became useless.

See https://github.com/odoo/enterprise/commit/a2ce226a2a085b26174cdfd32922517dff39658c
See https://github.com/odoo/odoo/commit/5d13a2f431e1c96e075b04d0eb07d98b912a6547
See https://github.com/odoo/odoo/pull/23966
2018-04-17 13:38:16 +02:00
qsm-odoo 5d13a2f431 [FIX] web: properly right-align numbers in grouped list views' rows
The 'oe_number' class was replaced by 'o_list_number' but this was not
properly done for grouped list views. As a fix, the new class is added
on top of the old one to not break potential customizations.

Proper fix will be done in master.
See https://github.com/odoo/enterprise/commit/a2ce226a2a085b26174cdfd32922517dff39658c

Closes https://github.com/odoo/odoo/pull/23966
2018-04-17 13:37:24 +02:00
Yannick Tivisse b5d026be7f [FIX] l10n_be_hr_payroll_fleet: Don't display costs in model name
This is confusing for end users because on the fleet form/kanban view the
model is displayed. The information displayed in the name is the default
depreciated cost on the model. But in reality the depreciated cost of the
car could be different.
2018-04-17 13:29:04 +02:00
len-odoo 1777646d1e [FIX]mail: fix help command in livechat with unlogged user
When an unlogged user creates a livechat, typing the /help command in the
backend would result in the help command sending a traceback.
The function processing the command would assume the existence of a channel
partner name, which is not the case when the user starting the chat is unlogged.

opw:1835484
2018-04-17 13:23:50 +02:00
len-odoo ec02710b86 [FIX]mrp: Byproducts are produced twice
When producing a byproduct in a BoM, the quantity for the byproduct was
increased by twice its produced quantity.

This is essentially a revert of commit d7fdb636b8
which was erroneously forward-ported to 11.0,
where byproducts were already correctly counted.

opw:1834226
2018-04-17 11:40:19 +02:00
Nicolas Martinelli 8456f425bc [FIX] stock: company on Procurement Rules
Add the `company_id` field on the `procurement.rule` form view, and set
the default value to be the company of the `stock.location.route`.

opw-1824570
2018-04-17 11:05:27 +02:00
Christophe Simonis f02cafa014 [FIX] stock_account: define variable in right function 2018-04-17 10:01:31 +02:00
Géry Debongnie 6d04faf6c2 [FIX] board: adapt test broken after forward port
Forward ports sucks...
2018-04-17 09:33:22 +02:00
Christophe Matthieu b26ad79a8c [FIX] web_editor,mail: send email's attachments without write access
Before this fix, when a user don't have write access on a document, he
can't send an email with attachment because, the attachments is added on
the document.

The change improving security was introduced by the commit:
https://github.com/odoo/odoo/commit/6494f511718893eec3573c60c0a62e04d386359d

With this fix, for mail, the attachments is added on the
'mail.compose.message' and re-render the fields attachments displayed in
the current view. This change respect the access rules like all others
attachment of 'mail.compose.message' (can send an email when the user have
read access on the document).
The media dialog of the html widget display all documents attachments and
the added attachments Allowing users to use these in the body of their
message.
2018-04-17 09:26:06 +02:00
Wolfgang Taferner 3310d842f6 [FIX] sale: wrong key was communicating wrong references 2018-04-17 09:24:24 +02:00
Géry Debongnie 03d74531a3 [FIX] web: fix issue with initial action in web client
Here is a scenario that could happen before this commit:
1. web client is started
2. it binds a callback on hashchange
3. it performs some async work (read initial action for user)
4. the user (or more likely, a tour) changes the url
5. the hashchange handler is called, and it starts a new action
6. the async work for the web client is over, it then executes the
default action and/or clicks on the first menu
7. we are now in the default action state, instead of the desired action
state (the one from the new url)

With this fix, we simply do nothing when there was an hashchange before
the initial action was done.
2018-04-17 09:21:18 +02:00
Géry Debongnie 4d2e22bc39 [FIX] web: fix issue with initial action in web client
Here is a scenario that could happen before this commit:
1. web client is started
2. it binds a callback on hashchange
3. it performs some async work (read initial action for user)
4. the user (or more likely, a tour) changes the url
5. the hashchange handler is called, and it starts a new action
6. the async work for the web client is over, it then executes the
default action and/or clicks on the first menu
7. we are now in the default action state, instead of the desired action
state (the one from the new url)

With this fix, we simply do nothing when there was an hashchange before
the initial action was done.
2018-04-17 09:20:07 +02:00
Nicolas Martinelli 866b48a267 [FIX] mass_mailing: sanitize test email
When sending the test email of a mass mailing campaign, it might be
observed that the result is different from the final email sent to
customers.

This is because the `body` field of the final mail message is an `Html`
field with options `sanitize_style=True` and `strip_classes=True`. On
the other hand, the `body_html` field the test mail is a simple `Text`
field which is not sanitized.

We sanitize the `body_html` field with similar options.

opw-1820064
2018-04-17 09:16:26 +02:00
Géry Debongnie 48515d3c2e [FIX] web: fix issue with initial action in web client
Here is a scenario that could happen before this commit:
1. web client is started
2. it binds a callback on hashchange
3. it performs some async work (read initial action for user)
4. the user (or more likely, a tour) changes the url
5. the hashchange handler is called, and it starts a new action
6. the async work for the web client is over, it then executes the
default action and/or clicks on the first menu
7. we are now in the default action state, instead of the desired action
state (the one from the new url)

With this fix, we simply do nothing when there was an hashchange before
the initial action was done.
2018-04-17 09:05:42 +02:00
Edilianny Sanchez - https://www.vauxoo.com/ 57808c4482 [CLA] add edy1192 to Vauxoo's CCLA
Closes #24264
2018-04-17 08:56:19 +02:00
Olivier Dony 58c45bdf4d [IMP] doc: setup/deploy: add security recommendations
Extra recommendations about remote SSH access and demo data on
internet-facing servers, in light of issue #24120.
2018-04-17 02:40:18 +02:00
Christophe Simonis 5dca782100 Revert "[FIX] web: remove ­ when saving phone number"
This reverts commit b8b0f947bf.
2018-04-16 20:26:21 +02:00
Christophe Simonis 74033eb007 [MERGE] forward port branch saas-11.2 up to 90f8f17fb4 2018-04-16 19:50:50 +02:00
Christophe Simonis 90f8f17fb4 [FIX] google_calendar: correct xml declaration
Oversight of previous forward-port
2018-04-16 19:06:11 +02:00
Toufik Benjaa cb6e3b9b76 [FIX] account_payment: make partner_type required only when draft
As for commit 3f975f9769, the partner_type field is readonly and cannot be modified when not in draft.
It makes the form invalid, so form buttons cannot be used, e.g. to access the journal items, etc.
2018-04-16 18:52:31 +02:00
Christophe Simonis 5f2d080cf8 [MERGE] forward port branch 11.0 up to ad825b673b 2018-04-16 18:34:56 +02:00
Christophe Simonis ad825b673b [MERGE] forward port branch saas-15 up to bfa5af45df 2018-04-16 17:10:23 +02:00
Florent de Labarre b7e47be012 [FIX] stock: remove wrong decorator
Was probably introduced during a forward-port as was correctly changed at 8df0a2a98e

Closes #24238
2018-04-16 16:59:36 +02:00
Kinjal Mehta 026be48ccb [FIX] purchase: "product_type" related field on po line
Issue:
Currently, since "product_type" is not set readonly, it is triggering write() of product.product
model when saving a PO having PO line with product_id. And it is failing by throwing access error
for users belonging to purchase "User" group users due to the fact that write() is permissible to
purchase "Manager" group users only.

Solution:
Made the "product_type" related field readonly since it is used in purchase order views domain
with lone purpose to set "received_qty" field non-editable when order line product is of type
stockable/consumable.

task id 1818787
2018-04-16 16:00:46 +02:00
Toufik Benjaa 904c2e5112 [FIX] payment: Portal payment were not saving tokens
- Portal payement is not respecting the option to save tokens after payments.
2018-04-16 15:20:15 +02:00
jem-odoo 71cdefd9f4 [FIX] sale_timesheet: UoM conversion failing when mixed category
When converting UoM, source and destiantion should be in the
same category. For timesheet, the product can be expressed in
Units if uoM is not activated. We don't want crash, but
interprete the timesheet duration in hours (which is has a different
uoM category). To avoid the error, we used the 'raise_if_failure'
parameter.
2018-04-16 14:32:45 +02:00
jem-odoo fb323d0068 [FIX] uom: avoid context key, and rather use parameter
When converting UoM, the conversion can fail if the source and destination
uoM are not in the same category. By default, and error is raised, but using
a context key, we can receive the initial quantity.
To avoid the context key (which is not used anymore), we prefer use a dedicated
parameter to be more explicit.
2018-04-16 14:32:25 +02:00
Swapnesh Shah d1c873e754 [IMP] mass_mailing: Use odoo instead of openerp
Closes #24237
2018-04-16 14:24:29 +02:00
chirag 941ddaee74 [FIX] purchase: pickings stat button visibility
When you create a purchase order for a product of service type, the
picking stat button is displayed but there's no linked pickings. When
clicking on the stat button, all pickings were displayed, which is
wrong.

Issue:#9181
Task:#1817421
2018-04-16 14:23:49 +02:00
Nicolas Lempereur 7680635c54 [FIX] web: setDate mixing utc+tz and local date
In the calendar view there is some mixing of moment with:

- a local date with given timezone
- a UTC date with added timezone manually applied

The setDate function of calendar model sometimes received either of the
two types, and always transforms them to UTC date with added timezone.

This cause eg. the following issues:

- in the minicalendar, if we click on a day (eg. 12) the day highlighed
  will be the one of 12th at midnight with timezone applied. So with a
  negative timezone the 11th would be highlighted in the mini calendar
  (but the 12th would still be the day shown).

- if we change scale (week/day/month) or open calendar or use next or
  previous button: we call `setDate` with a UTC+timezone moment. So each
  time this is done, we get an additional timezone

  eg. when opening the calendar view on the 12th at 5:00 with GMT-0200:
      -> the target date is 12th at 1:00
      -> if we set the day mode: target date is 11th at 23:00
      -> if we set the week mode: target date is 11th at 21:00

With this change we keep target_date and highlight_date as local date so
setDate always receives a local date and jquery-ui DatePicker gets the
date in the expected format.

opw-1831368
closes #24188
2018-04-16 00:22:18 -12:00
Christophe Simonis bfa5af45df [MERGE] forward port branch saas-14 up to aab0908818 2018-04-16 14:21:00 +02:00
Nicolas Martinelli 620a6f4557 [FIX] stock: change product on S/N
Do not allow to change the product on a serial/lot number for a product
which has existing stock moves. Doing so would screw up the traceability
report.

opw-1832452
2018-04-16 14:20:44 +02:00
Martin Trigaux a87dc3111c [IMP] doc: specify the API examples are in python2
Odoo 11 is python 3 but the xmlrpc interface works with python 2 too.
The example should probably be migrated to use python 3.
In the meantime specify exactly these examples are python 2 to avoid the
confusion.

Fixes #24232
2018-04-17 13:59:50 +02:00
Christophe Simonis aab0908818 [MERGE] forward port branch 10.0 up to c92d43c04b 2018-04-16 12:33:49 +02:00
Christophe Simonis c92d43c04b [MERGE] forward port branch 9.0 up to 752dcc761c 2018-04-16 12:05:35 +02:00