Commit Graph
110521 Commits
Author SHA1 Message Date
Elkasitu 72efb820c8 [FIX] web: Display translate icon properly in list view
In an editable list view, the translation icon would display incorrectly
(out of place) for translatable char fields. This can be traced back to
two reasons, compared to saas-15:

- We now use tables instead of divs for list views
- The translate icon would have inline css that would override its
positioning with top and left attributes

This is fixed by adding top and left attributes to translate buttons
inside a field inside a table cell using CSS classes
2017-07-19 13:45:20 +02:00
Khoi Nguyen f889d3af82 [FIX] web: prevent traceback when double-clicking links in modals
Before this revision, double-clicking links in a modal triggered a
traceback. This is because the second click attempts to change the
active view while it is still being changed by the first click (more
precisely, the controller of the active view is undefined on the second
click).

This commit ensures that on_attach_callback is called only if the
controller is defined.

Steps to reproduce the issue fixed by this commit:

1. Open a sales order;
2. Click on a product line;
3. Double-click on the product.
2017-07-19 11:00:39 +02:00
Jigar Patel b63e22f50e [FIX] web: Groupby not working on Pivot and Graph view
The groupby property was wrongly set in some cases: if a graph/pivot view is defined as a groupby on field F, but there is another groupby key G in the context, it will take F instead of G (at initial load).
2017-07-19 10:50:21 +02:00
David Monjoie efd1585234 [FIX] web: fix action context
Previously, we had to filter the context values to exclude some
erroneous values we propagated earlier.

This commit removes the earlier propagation of wrong values (the
current record context when executing an action) and thus also
removes the filtering of those values, which was actually removing
useful values from the action context.

The bug could be seen by following these steps:
- Install crm and sale
- Go to My Pipeline
- Open an opportunity which has a customer set
- Click on "New Quotation" action button
- See that the customer is not set on the new quotation, it should
  be set by the default_partner_id value in the action context
2017-07-18 15:59:48 +02:00
David Monjoie 1ceb201d5e [FIX] web: fix boolean fields display in calendar
Since formatBoolean returns a jQuery object, boolean fields were
displayed as [Object object] in calendar view.

This is a fix for stable version. The real fix would be to get rid
of the jQuery object returned by formatBoolean but the change is
not trivial.
2017-07-18 15:59:48 +02:00
David Monjoie bce3defc8c [FIX] web: fix calendar server values parsing
The record data given to fullCalendar to use in the renderEvent
function was not parsed like it is in basic model for example.

As a result, date(time) fields were string rather than moment
objects, which was triggering the crash that started this commit.
2017-07-18 15:51:49 +02:00
Elkasitu e83c3e2678 [FIX] web: Fix actions for widgets w/o controllers
Execution of actions is usually done with trigger_up, which delegates
the action execution to the widget's controller.

This is troublesome for actions done on widgets that have no
controllers, like widgets in Studio for example.

The commit fixes this by adding a standalone option for AbstractFields,
if the flag is true when instantiating a widget, the action will be
called directly from within the widget object and will not be propagated
upwards.

A test to verify that this works properly has been added as well
2017-07-18 15:12:55 +02:00
Géry Debongnie f7dd085e80 [FIX] web: mock name search actually evaluates the domain
Before this commit, the _mockNameSearch method of the mock server was
computing by hand the first element of the domain.  This was adhoc and
wrong (for example, the '==' operator).  Also, we actually have a method
designed to just return the records matching a given domain.
2017-07-18 14:45:22 +02:00
Géry Debongnie 5f8dea490a [FIX] web: properly display id in some cases
When a one2many is set through an onchange, the web client did not set
the id field properly.  Because of that, it could not be displayed in a
list. This is due to the fact that the id is given in the command like this:

[1, 53, {...}]

Here, the command is 1 (update), then 53 (id), then some values, which
do not have the id. So, in this specific case, we assumed that all the
new values were in the object, even though we properly set the res_id
property.

We fix this issue at the root: in the _makeDataPoint method, we make
sure that no datapoint can be created with a res_id and without the
corresponding id key.

Note that this issue was not found in a standard installation of Odoo
(but it may be present somewhere), but in some custom code.  It is rare
to actually use the id field in a view, but in this case, we had a
many2many in kanban view, and the id was used to format the url of an
image.
2017-07-18 14:45:22 +02:00
rar-odoo cb863ed0bb [FIX] gamification: email template for challenges (#18265)
* [IMP] Gamification: email template

- new template for challenges for both personal and ranking mode.
2017-07-17 18:07:48 +02:00
Khoi Nguyen 3dd1c0f87e [FIX] web: undefined group name for group by date:<interval>
Previously, grouping a list by a non-default time interval (e.g.
'creation date:week') yielded a grouped list of records with undefined
group names.
2017-07-17 15:40:44 +02:00
Nicolas Martinelli 779fc8e4fe [FIX] *: raw_value for id
Since the new views, `record.id.value` contains the formatted value of
the ID, meaning it can contain separators. For example, by default,
`1234 => 1,234`. Since this value is used in the image URL, using
`value` won't work anymore.
2017-07-17 09:48:24 +02:00
Martin Trigaux 19113a461d [FIX] point_of_sale: typo 2017-07-14 16:29:24 +02:00
Martin Trigaux d92685f99e [IMP] point_of_sale: clarify warning message
local storage is quite technical
2017-07-14 16:20:10 +02:00
Martin Trigaux 78c9d2838d [FIX] point_of_sale: correct filter label
Courtesy of Moshe Flam
2017-07-14 16:07:10 +02:00
Géry Debongnie 29e4394af9 [FIX] web: properly reload record data before doing another action
When a user edit a record, then click on a stat button, the web client was a
little too aggressive in avoiding to reload data.  It was assuming that
even if the server overrides the create method, the web client did not
need to know anything about the record before executing the action from
the stat button.

However, that assumption is incorrect: the display_name property is
needed to correctly display the breadcrumbs.  For example, here is a scenario
that was not correct: open a res.partner in a form view, edit its name, then
click on one of the stat button. You will see that the breadcrumb is not
properly updated.

To fix this issue, we have to reload the record, and to properly update
the title property.  In this commit, we also add a getName method in the
model.
2017-07-14 14:47:13 +02:00
Géry Debongnie 04c3b99cb7 [FIX] web: disable debounce functionality
With the new views, we introduced a system where some fields could
notify immediately the rest of the system that they have been changed.
It is really cool, it allows real time edition (with onchanges).

However, this was a little too much.  In some cases (an onchange that
returns a warning), it was counterproductive.  So, we decided to simply
remove the feature.  This commit only make sure that it does not happen,
and we will do a deeper pass later to make sure that no useless code is
left behind.

Note that this means that we can reintroduce the functionality really
easily later, eventually protected by an attribute.
2017-07-14 14:47:11 +02:00
Christophe Simonis 4ca3d9cadf [MERGE] forward port branch saas-15 up to aa19cb61f4 2017-07-14 14:27:38 +02:00
Christophe Simonis aa19cb61f4 [MERGE] forward port branch saas-14 up to f1a5e8214e 2017-07-14 13:54:01 +02:00
Christophe Simonis f1a5e8214e [MERGE] forward port branch 10.0 up to 9150d4c552 2017-07-14 13:18:22 +02:00
Christophe Simonis 9150d4c552 [MERGE] forward port branch saas-11 up to 8d1ad402a4 2017-07-14 12:13:33 +02:00
Christophe Simonis 8d1ad402a4 [MERGE] forward port branch 9.0 up to 3e8ba4905c 2017-07-14 12:10:25 +02:00
Moisés López 1dee64eda8 [FIX] doc: correct diff lines
to highlight the modified line

Closes #18230
2017-07-14 11:45:20 +02:00
Nicolas Martinelli ba5608a5af [FIX] resource: efficiency factor
Backport of 45e7389a1e

opw-752226
2017-07-14 11:14:47 +02:00
Moisés López bb7fef79a6 [IMP] doc: Add 'report' dependency
To be able to correctly use report features.
It is auto-install but a good idea to make sure it is present and to show the
report module

Closes #18220
2017-07-14 10:55:30 +02:00
Martin Trigaux 0323b7154b [FIX] doc: correct diff
The attendee_ids line was highlighted instead of the session_ids
2017-07-14 10:48:13 +02:00
Martin Trigaux 1d3d665f2c [FIX] doc: adapt to removal of workflows
Remove one excerice that was in the workflow section
Adapt the diff
2017-07-14 10:45:16 +02:00
Khoi Nguyen f2c7e44efe [FIX] web: no M2ODialog when pressing enter in a many2one
Before this revision, pressing ENTER when inside a many2one field
triggers a 'focus out' event. In particular, if one creates a many2one
record and uses the ENTER key to click "Create and Edit", two dialog
windows appear: one to actually create the associated record, and a
second to alert the user that they are creating an associated record.
The latter appears every time the many2one field loses focus.

This commit changes the 'key up' event for many2one fields to ensure
that the ENTER key does not trigger a 'focus out' event.
2017-07-14 10:35:35 +02:00
Nicolas Martinelli 2d155a35e1 [FIX] website_crm_partner_assign: # of Cases
The measure '# of Cases' gives a traceback when selected.

opw-752165
2017-07-14 09:01:28 +02:00
Richard Mathot 29c5165361 [FIX] website_quote: missing domain
Before this commit, users could select mail.template designed for other
models and lead to nasty crashes when validating a SO

opw-752264
2017-07-13 15:17:07 +02:00
Cedric Snauwaert a562f5ced1 [FIX] account: fix the broken reconciliation widget
Lot of features were not working and this commit fixes that
- Create entries upon reconciliation
- Add buttons at the end of the process to view/close bank statement
- Fix partial reconcile
- When changing partner, correctly fetch counterpart account and fix search domain
- Add ability to reconcile without choosing a line (will automatically create a line)
- some other small fixes
2017-07-13 14:17:58 +02:00
Nicolas Martinelli 69fa111e95 [FIX] stock_account: negative quant cost
- Set up a product with 'Real Price' costing method, in real time
  valuation
- Receive 1000 units at $0.10 each
- Create a landed cost of $456.70, validate => it creates a quants of
  999 units at cost $0.56 and 1 unit at cost $-2.74.
- Perform an inventory adjustment, and set the quantity to 0 instead of
  1000, post inventory.

An error arises due to the constrain debit + credit >= 0.

This is caused by the method `_prepare_account_move_line` from
`stock.move`, which cannot handle negative cost for quants.

opw-752063
Fixes #17707
2017-07-13 13:20:24 +02:00
Elkasitu 0c496136a9 [FIX] web: Discard from form view to form view
Clicking on the discard button in a form view whose previous view is
another form view wouldn't do anything.

This is fixed by making the view_manager trigger_up a history_back event
and then the history_back callback will handle cases in which there is
only one view and only one action, which used to be rejected
2017-07-13 13:10:30 +02:00
Géry Debongnie 60ee6bbda5 [FIX] mail: add test to proper module
Because of a rebase, I erroneously added the test in a new
FieldMany2ManyTagsEmail module.  It then failed, because the demo data
were not the same.
2017-07-13 12:37:07 +02:00
Goffin Simon 37ff69d45e [FIX] mrp: Post inventory button without finished product"
This fix 2332df6bc7  has been done in stable and some customers
wants to keep the button "Post Inventory" available all the time.
Now the button is just visible in developper mode.

opw:748347
2017-07-13 11:23:42 +02:00
Goffin Simon ec6459d42a [FIX] resource: Wrong default value for Time Efficiency
The time efficiency cannot be set to 0 otherwise it raised an error
when creating a workorder.

opw:752251
2017-07-13 11:12:33 +02:00
Nicolas Martinelli 3e8ba4905c [FIX] crm: expected closing
The "exp. closing" dashboard button takes into account the won
opportunities. It shouldn't.

Backport of 9d2f48dc7f

opw-751165
opw-744940
2017-07-13 08:35:40 +02:00
Nicolas Martinelli b1b8392591 [FIX] sales_team, crm: expected closing
On the CRM dashboard, the shortcut 'exp. closing' is the same than the
'overdue' shortcut. However, the number of opportunities in these
categories is computed differently (see method
`retrieve_sales_dashboard`).

We introduce a new filter "Overdue Opportunities" which reflects this
difference.

Backport of 9d2f48dc7f

opw-704173
opw-751165
2017-07-13 08:34:20 +02:00
Goffin Simon 2d54dec940 [FIX] website: Impossibe to open website admin with some languages
When clicking on the app website admin with the arabic language,
it raised an error because this.date_from.format('YYYY-MM-DD') in
function fetch_data returned an arabic date "٢٠١٧-٠٧-٠٥".

opw:751960
2017-07-12 16:12:43 +02:00
Nicolas Martinelli 68934c6b87 [FIX] mass_mailing: access error when 'Retry'
A user without 'Administration/Settings' access rights cannot use the
'Retry' button on a mass-mailing.

This is because only this level of power is allowed to unlink
`mail.mail` records. However, this button is supposed to be used by
regular mass mailing users.

opw-744616
2017-07-12 15:33:38 +02:00
Thibault Delavallée b9a9922b62 [FIX] web: execute action with null active_id instead of undefined
Indeed pyeval that evaluates the context explicitly handles null value
differently from undefined values. Let us therefore avoid crashes when
it manipulates the context.

Example of crash

 * click on forecast in project kanban view without having already created
   forecasts;
 * click on 'Assign' to create a new forecast;
 * selecting a task crashes because of the domain on task field that is
   evaluated using pyeval with an undefined active_id in context that
   pyeval cannot handle;
2017-07-12 14:47:09 +02:00
Cedric Snauwaert 999dc80e7c [FIX] base_import: when parsing date field, strip extra spaces 2017-07-12 13:48:22 +02:00
Géry Debongnie 9ee00dd265 [FIX] mail: prevent crash when chat system is not ready
When a chatter is created, appended, and destroyed before being ready,
bad things could happen.  This is because the code in start/other
deferred was executed regardless if the widget was still alive.  And,
some mechanisms, such as _getBus, depends on the event system.  If the
widget is destroyed, it will be remove from the component tree and such
functions will then return undefined.

To protect agains those issues, we simply make sure that the deferred
are only resolved when the widget is still alive.
2017-07-12 13:41:51 +02:00
Christophe Matthieu e6e17cc5d6 [FIX] product: Error message when adding an item to a quote
When a user tries to add a product on an opportunity, the date_order of the
order is added into the context. This value can be False.

When "_compute_price_rule" is called without "date" arguments
(some onchange, compute...) the method method use the context date (in this
case the value is False) or the today date.
The date value is used in an sql request and raise a value exception.

opw-751700
2017-07-12 13:39:29 +02:00
Goffin Simon 45e7389a1e [FIX] mrp, resource: Wrong default value for Time Efficiency
The time efficiency cannot be set to 0 otherwise it raised an error
when creating a workorder.

opw:751638, 752035
2017-07-12 13:32:51 +02:00
Nicolas Martinelli 058cc22d2c [FIX] website_form: send email with subject
- Use the form builder to send an email
- Customize the snippet to include the subject and the body
- Send a mail

=> The subject is not included in the email

This is because the subject is filtered out and considered as a
blacklisted field.

It happens because `mail.mail` inherits from `mail.message`. The field
property `website_form_blacklisted` is set to:
- `True` for `mail.mail`
- `False` for `mail.message`

Since we go through all inherited models, the property on `mail.mail` is
overriden by the property on `mail.message`.

It is actually not necessary to go through all inherited models, since
in the case of `inherits`, we copy the fields of the inherited model to
the target model. The check is simplified by only checking the fields of
the current model.

Based on work of @nla-odoo

opw-748926
2017-07-12 11:56:23 +02:00
Moisés López 566968bf99 [FIX] doc: use new URI wkhtmltopdf releases
The old release of wkhtmltopdf are no longer published on the download page.
The developer explicitely asks to use the github link

cf: wkhtmltopdf/wkhtmltopdf#3524
    wkhtmltopdf/wkhtmltopdf#3521
    wkhtmltopdf/wkhtmltopdf#3518
    wkhtmltopdf/wkhtmltopdf#3508

Closes #18146
2017-07-12 10:13:32 +02:00
Sylvain LE GAL 4001aaf2c4 [FIX] l10n_fr_certification : fix string_to_hash computation
- use datas of all lines, and not only the last lines.
- removed useless 'move_id' field from account.move.line

Was PR #18175. Courtesy of Sylvain Legal
2017-07-12 09:58:34 +02:00
Christophe Matthieu a6f2dc07e5 [FIX] sale: traceback when choosing a product with warning as order.line
If a user chooses a product that has a blocking error message, the product
is set to False. This is good, but we do not want the following to happen:

The other onchange triggers are called and "product_uom_change"
generates an error because there is no product. (In fact it is
"_compute_price_rule" on "product.pricelist" who raise)
The onchange update the values of the other fields related to the
product (eg for the "name" field where the name of the product that
is canceled by the warning is assigned).
2017-07-12 09:50:45 +02:00
Adrian Torres ed2a77e50e [FIX] web: Fix FieldRadio's o_horizontal/vertical (#18163) 2017-07-12 09:45:46 +02:00