Commit Graph
116584 Commits
Author SHA1 Message Date
Géry Debongnie 47cf31b539 [FIX] web: prevent web client from blocking some view
In some situations, it could happen that the action manager had a
rejected deferred representing the creation of a view, and was blocked
from doing any other interaction with that view.

For example, imagine that a read operation crashes for record 1 on the
model res.partner.  If the user is on the kanban view and click on
record 1, there will be an error dialog informing him of the error.
However, if the user clicks then on another record, nothing will happen
because the action manager is blocked (only the form view in this case).

With this commit, whenever the view creation process failed, we also
remove the rejected deferred so the action manager will be allowed to
try again.
2018-04-20 14:24:21 +02:00
Alexandre Kühn f2ba1cc843 [FIX] mail: no crash when clicking on systray inbox notification not linked to a document
Before this commit, when we have a notification in the messaging menu (systray)
that comes from a message in inbox which isn't linked to a document
(e.g. a task), clicking on it result in a crash.

This issue comes from a typo of a recent js mail refactoring [1]

Although this is only a 1-line fix, there are no tests on the messaging menu
widget in the systray. Therefore, this commit also introduces some basic tests
of this widget, in addition to the test related to the fixed issue.

[1] https://github.com/odoo/odoo/commit/02ec09cb1c3e2d7bc7968f40c18f2208d7f3f498
2018-04-20 12:13:51 +02:00
Alexandre Kühn df58ead943 [FIX] mail: fix composer css style
Revision of https://github.com/odoo/odoo/commit/c778de44c7cd9b7ef5a9a91738164ab0ebd0ca06

The commit above changed the composer in order to add colored text for mentions
(instead of textarea, it uses a div with contenteditable).

Some tweaks were made in order to preserve the css style of the composer, but
there were some leftovers:

    - placeholder "Write Something" should be more transparent
    - cursor hover on placeholder should be of type text
    - text is not vertically centered with the input container
    - there should be no focus border when the composer has the focus
    - "Send" button is vertically misaligned by 1 pixel off in discuss

This commit solves all of the above problems.

As a result, the css style of the composer should look almost similarly to the
one in v11.
2018-04-20 12:13:51 +02:00
Christophe Simonis 7084a5190c [MERGE] forward port branch 11.0 up to 841f3914cc 2018-04-19 15:04:26 +02:00
Christophe Simonis 841f3914cc [MERGE] forward port branch saas-15 up to 75853066a1 2018-04-19 13:12:55 +02:00
Christophe Simonis 75853066a1 [MERGE] forward port branch saas-14 up to c638cb4d56 2018-04-19 13:10:53 +02:00
Christophe Simonis c638cb4d56 [MERGE] forward port branch 10.0 up to 23431389c3 2018-04-19 13:10:12 +02:00
asa-odoo 1d1fd8219c [FIX] website: fix design of mobile preview close icon
The broken design prevented to click on the close button.

task-1817880
2018-04-19 13:00:21 +02:00
Nicolas Martinelli dccef8e41d [FIX] mail: auto-subscribe at user creation
Auto-subscribe to channels at user creation.

opw-1834031
2018-04-19 10:15:10 +02:00
Nicolas Martinelli 386c91b856 [FIX] account: missing widget
A Many2many field is unusable in a list view without the proper
widget...

opw-1837903
2018-04-19 10:14:13 +02:00
Raphael Collet c9caf55177 [FIX] models: bad setup of inherited custom fields
Assume a custom field F is defined on model 'res.partner'.  The setup of F may
silently fail because of missing stuff.  In that situation, setting up the
field inherited from F on model 'res.users' should also silently fail.

To reproduce the bug, install Invoicing, create a related custom field F on
'res.partner' with 'property_account_position_id.active', and install another
module.  Setting up F after loading module 'base' will fail because the field
'property_account_position_id' does not exist yet.  The error is not caught by
the inheritance of F on model 'res.users', and the installation crashes.
2018-04-19 10:00:49 +02:00
Christophe Simonis fed775bc0c [MERGE] forward port branch 11.0 up to 8c64159b88 2018-04-18 18:20:40 +02:00
Josse Colpaert 8c64159b88 [FIX] stock_account: valuation report needs company_owned in context
When calculating the stock_value of a product,
the system will take into account all the locations
that have this company as company.  (that way if owner_id
is not set, the company_id on the location is the owner (virtual: not set))

The Qty on Hand field takes into account however
the quantities that are in the warehouses.

This could lead to weird situations where the Quantity On Hand is 0
and so the record is not shown, while the stock value is positive.
(e.g. stock in Transit)

In order to use the same logic for both fields, we pass company_owned=True
in the context.
2018-04-18 17:42:22 +02:00
Aaron Bohy 05589db823 [FIX] web: don't ignore required attrs on image fields
Before this rev., falsy image fields could be saved even if they
were required.
2018-04-18 17:40:09 +02:00
Raphael Collet 23431389c3 [FIX] models: bad setup of inherited custom fields
Assume a custom field F is defined on model 'res.partner'.  The setup of F may
silently fail because of missing stuff.  In that situation, setting up the
field inherited from F on model 'res.users' should also silently fail.

To reproduce the bug, install Invoicing, create a related custom field F on
'res.partner' with 'property_account_position_id.active', and install another
module.  Setting up F after loading module 'base' will fail because the field
'property_account_position_id' does not exist yet.  The error is not caught by
the inheritance of F on model 'res.users', and the installation crashes.

OPW 1835872
2018-04-18 17:26:05 +02:00
Toufik Benjaa 0e49ccc419 [FIX] payment: Save payment token only if user is connected
- Fix an issue where the transaction were always set a 'form_save' thus always creating payment tokens.
- Fix an issue where when the customer paying while not being logged in was crashing.
  The issue is due to the fact that we are creating payment transactions linked to no partners, doing so it crashing the code when creating the payment token with no partner set.
2018-04-18 16:49:53 +02:00
Martin Trigaux 8550cf28e8 [IMP] doc: add link to qweb variable syntax
To mention you can use the {{ var }} syntax too

Closes #12035
2018-04-18 16:25:42 +02:00
Martin Trigaux c74f975994 [FIX] base: correct Arabic iso_code
The Arabic we use on Transifex is "simple" Arabic, not the one from Syria.
The .po files we synchronise are named 'ar.po', not 'ar_SY.po'

Change the iso_code to match the one we actually use.
transifex module relies on the iso_code to make its URL
2018-04-18 15:51:30 +02:00
Raphael Collet 87b42ad9a8 [FIX] models: make group by date and order by date work together
The issue occurs when `read_group` is called with a date/datetime field to
group and order on, and the group_by is qualified, such as:

    model.read_group(..., groupby=['date:week'], orderby='date')

The ORDER BY clause in the query should use the same term as the GROUP BY
clause for the corresponding field.

OPW 1834148
2018-04-18 15:47:30 +02:00
len-odoo 7671e0c30d [FIX] calendar: fix event sorting function with relational fields
When working with relational fields, the sorting function would
compare empty recordsets with Strings (the field value),
crashing in the process.

This is essentially an addendum to previous commit
b6c962e62a
which fixed the sorting for non-relational fields.

opw 1831457
2018-04-18 15:15:47 +02:00
Christophe Simonis 2c1c9c21f1 [MERGE] forward port branch saas-15 up to 16ec176620 2018-04-18 14:43:35 +02:00
Martin Trigaux 41e7df7880 [FIX] transifex: adapt the URL scheme
The search patterns have changed on Transifex
While the URL is still backward compatible, it may change in the future
2018-04-18 13:59:56 +02:00
Christophe Simonis 16ec176620 [MERGE] forward port branch saas-14 up to 67054b6dcb 2018-04-18 13:49:24 +02:00
Christophe Simonis 67054b6dcb [MERGE] forward port branch 10.0 up to 2f037a13ca 2018-04-18 12:14:53 +02:00
Florent de Labarre e155244007 [FIX] sale_stock: access rights when updating delivered quantities
If a user only has the stock user access rights, he's not able to
validate or write on a move that has to update the delivered quantities.

Closes #23782
opw-1835138
2018-04-18 11:56:36 +02:00
Yannick Tivisse a78442194a [FIX] fleet: Track driver modifications on vehicles 2018-04-18 11:53:32 +02:00
Arnold Moyaux a6e2830631 [FIX] barcode: do not trigger barcode on pending views
The check on the event target and the barcode target is done outside
the check on barcode found. That result in a warning for each modal/form
view that is pending.

This commit do the check before doing any operations in order
to directly stop if the event target is not similiar to listening
barcode target
2018-04-18 11:50:48 +02:00
Arnold Moyaux e5305ca8b7 [FIX] barcode: use the same process for quantity listener
The barcode scanner and the quantity listener do not use
the same proccess although they act for the same operation.
(For example the quantity listener trigger onchange server side
while the barcode scanner not if 'notifychange' key on the
active_barcode is set to False)

Since quantity listener is based on candidate we could directly
call the _barcodeSelectedCandidate method in order to have a common
behavior and code.
2018-04-18 11:50:48 +02:00
Christophe Simonis 2f037a13ca [MERGE] forward port branch 9.0 up to cf163d19ee 2018-04-18 11:32:27 +02:00
Lucas Perais (lpe) 20f5f625f4 [FIX] pad: prevent concat bool and string
Before installing pads, create a second company
On the first company, create a task and initialize its pad

Switch companies and try to edit the task

Before this commit:
There is a traceback because since the pad credentials of the second company are not set,
the url cannot be computed

After this commit, we prevent the Null field to concat with a string
hence there is no traceback

OPW 1837059
closes #24263
2018-04-18 11:03:22 +02:00
Nicolas Martinelli ffdfbed42c [FIX] calendar: avoid memory overflow
On a DB with thousands of events including recurring ones, fetching the
complete list of events might lead to a memory overflow due to the
prefetching of all virtual events.

We reduce the memory footprint by handling no more than 50,000 records
at a time and clearing the cache at each step. This limit is purely
arbitrary, but seems to be a good compromise between performance and
memory usage.

opw-1832482
2018-04-18 08:17:50 +02:00
Alexandre Kühn cf163d19ee [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:32:27 +02:00
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
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
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
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 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 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 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