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
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.
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).
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
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.
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.
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
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.
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.
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.
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.
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.
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.
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
- 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
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
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
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
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
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
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;
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.
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
- 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
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
- 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
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).