Port revision 70287d4 to 9.0
When creating missing translations on an object (e.g. using blue flag icon on a
field), the value of the module was not set.
This was problematic as could create a duplicated translation when the module
was updated or the translation reloaded (as the module is used in find_expr).
opw 654036
The onchange of the project field
removed the default partner loaded of the task
if there was no project set on the task, or if the
project was not associated to a specific partner.
There is no obvious reasons to do so,
and the revision 3fe06da634
introducing the regression doesn't explain why
it has been done. At first sight, there is no reason.
opw-657876
When selling a product with a dropshipping route, the available stock was
checked and a warning got raise if it was the case.
The _check_routing was not working properly as is called in a context of an
onchange and 'self' was the record in the database, not in the browser.
Just use check there is a dropshipping route on the product instead of checking
it on the routes of the sale order line (not reliable info anyway).
Add a todo for master to improve it to change the signature of the method.
opw 657760
When a translated term is modified (e.g. content of an email.template),
reloading the translations of the module (e.g. when updating the module) used to
recreate a new, duplicare translation for the modified term (instead of ignoring
the existing one).
This was due to the fact the matching expression (find_expr), when loading
translations, used the field 'src' (source term) as criteria for (almost) all
ir.translation records.
While this is true for type 'code' or 'selection', this is not true for 'model'
where the source content may have been changed.
In case of translation of type 'model', matching on the name and res_id should be
enough for the matching expression and then, avoid creating duplicated
translations.
Note: this patch must NOT be present in 9.0 due to the xml_translate
attribute that splits an xml content into small parts.
opw 654031
When creating missing translations on an object (e.g. using blue flag icon on a
field), the value of the module was not set.
This was problematic as could create a duplicated translation when the module
was updated or the translation reloaded (as the module is used in find_expr).
opw 654036
* blacklist all fields by default
* don't use blacklist in get_authorized_fields which is called to see if
a field can be added to a form, instead only use it afterwards to see
if the field can be written to by the formbuilder. That way
formbuilder can whitelist fields which are actually added to forms
on-demand resulting in a more secure interaction
In noupdate, the opt-in setting is ignored by migrations and breaks the
corresponding feature. If the feature is undesirable, don't install the
module.
This revision is related to 93d4db9d1e.
Usually, for models with an image, the original `image` is stored
in the field `image`, and then the resized value are in the fields
`image_medium` & `image_small`.
In the specific case of the product variant, this is not the case,
the original image is stored in the field `image_variant`,
and the `image` field uses as well the method `_get_image_variant`.
The `image_get_resized_images` must therefore return the "big image"
as well, which is returned with the key `image`, by default.
This is done using the method argument `return_big`.
res.users form contains virtual fields in_group_ID to be added in res.groups.
Groups with boolean share=True (added by share module) must not be displayed in
the form and should not be modifiable through the user interface.
However, if a module adding/modifying a res.group is earlier in the dependency
graph than 'share' (e.g. only depends from 'base'), the update of the user view
is done before share is loaded and the overrride of 'get_application_groups' is
never executed.
As we can not guarantee that the module is share loaded, put the logic of
hidding the module in base instead of share.
This workaround is quite hacky but is necessary in stable version.
Better fix in 9.0 at cf63d4dFixes#6324Fixes#5820
Add a related field to the partner_id of the picking. Note that
partner_id on stock.move is different from partner_id on stock.picking
in case of dropshipping, therefore we need to show both fields.
opw-656298
This is possible to set an image for a specific variant
When this was the case, the image displayed was always the
image within its original size, it wasn't resized
to small and medium sizes.
opw-657055
If a user was in multiple team,
and the salesman of a lead was changed to this user,
the team assigned to the lead might change even
if the user was part of the team already set.
opw-657814
Depending of the location where the "Copying" happened, only text/plain
content could be available from the clipboard component.
So if no text/html was retrieved, we should fall back to plain text
pasting.
closes#9787
opw-657137
The "edit" action is on the "website.TopBar", which will create a new
instance of the "editor" (web_editor.editor) widget.
So if we want to do something when the "editing" start, we have to
either override "edit" of the TopBar, or override "start" or "init" of
the editor.
opw-657662
This revision is related to 5a10903e9b.
The above revision makes so the decimal separator from the language
is used to display the prices.
This revision makes so this decimal separator is used as well
for quantities, to be coherent.
opw-657591
In the pos interface,
when adding a product to the order,
the quantity was set to `1`,
but, when adding the same product again,
the quantity was set to `2.000`.
We use `set_quantity` to not
copy/paste what is already done
in this method to display
correctly the quantity within
the product unit of measure rounding.
When accepting/declining a calendar event invitation received by mail,
we landed on an empty gray webclient. The confirmation page had been
dropped with passage to new JS API / new calendar / new webclient.
Previous mechanism had been reimplemented: custom web client with event
information/confirmation if the user is not connected or redirection to
the event form view if the user is connected.
+ FIX manyattendeetag : the status circle did not turn red when an
user declined the invitation.
In particular, when an automated action is defined on "create or update",
setting `old_values` to `None` allows to distinguish between a create and an
update. Note that not setting `old_values` at all may be confusing: on a
create, it may be present because of an outer update...
The base action rules manage a kind of checklist with the records already
processed for each action. This checklist may be populated by recursive calls
on other models (such as the update of relational fields), and guarantees that
a given action on a given record is executed at most once.
This revision is related to 1b8c9aed9f
As `manual` is now the default value of the `state`,
if `state` is not given in the values when passed to
`create` or `write` of `ir.model` and `ir.model.fields`,
we must assume the value is `manual`, so the columns and tables
are instanciated in database
opw-657750
The invoice date of demo data is changed to match the current
month/year. The original issue is the following:
- install accounting, keep default configuration (company currency: USD)
- add a payment for Agrolait in USD (e.g. $10,000)
- go to customer invoice demo_invoice_2 (which is in EUR)
- the system proposes you to add a outstanding payment to pay the
invoice -> do it
The invoice is not shown as fully paid, but on the other hand if you
click again to add an outstanding payment, nothing happens.
The reason of this bug is because for this specific bill, the currency
rate has changed between the invoice date and the payment date. The
amount used to pay the bill: this is the price in USD, at the rate
corresponding to the date of the invoice (i.e., what you were supposed
to pay at the time of invoicing). The fact that is does not mark your
bill as paid is also correct: the payment is written with the rate at
the date of the payment, and in this case, the invoice is not fully
paid. You should therefore reconcile the invoice and create a write-off
afterwards to register the exchange rate difference.
This unusual situation (pay an invoice in a different currency, and
moreover the rate has changed) has not been taken into account for v9,
and there is no clean solution which can be foreseen for a stable
version.
However, since this situation arises right away with the demo data, this
can be very misleading for a new user. The fix simply changes the date
of the invoices, so that there will be no rate change between the
invoice date and the payment date with the demo data.
opw-657151
In the base summernote library, each event modifying the editable area
DOM trigger an 'onChange' event which update the textarea associated
with the editor.
Some widget (ImageDialog) have been entirely rewritten for Odoo without
copying this behaviour. Hence for those components, if they were the
last to be used and only in the instance of inline backend editor
(FieldTextHtmlSimple widget), before saving updating the widget value by
the current editor value is required.
closes#9784
opw-654240
- display appropriate message when no results are found in a search
- don't display 'you have been invited' notif when creating private channel
- correctly join when a user was invited in a public channel
- display a message when a user join a channel through an invitation
- don't display subject for message of type notification (still a
mystery why it happens in test.odoo.com for channel of type mailing)
- better heuristic on when to display message subject
- tweak sidebar text color (slightly whiter)
- add ... to the placeholder of the text area in the composer
- invert send and icons for attach/smiley in composer
- don't display 'read less' on expanded messages
- exclude livechat channels from channel mention suggestions