Before this commit M2Mtags widget did not translate.
This was because no context was given to the rpc that fetched the fields
Hence, the lang was not passed.
After this commit, M2Mtags translate well
OPW 784396
`str.format()` is only safe with byte-strings arguments, not unicode.
Unicode parameters would be automatically encoded using 'ascii'
encoding, resulting in a UnicideEncoreError in case any non-ascii
characters are present, which is quite likely.
Using '%' formatting on a str format string works the other way around,
and will cause the format string to be decoded into unicode if any
unicode params are present. This is typically safer because we never
use non-ascii characters in our format strings.
It also feels more natural than having to coerce the format string to
unicode using a u'' prefix.
This issue does not occur in Python 3, where either syntax will work.
Depending on the payment flow, the `email` field may not always be
present in the token data coming from Stripe.
Currently, it is missing in s2s mode, because we do not send it.
To avoid a KeyError during creation of the customer, we can use
token["card"]["name"] instead, which is always provided (it contains
either email or cardholder name), or the explicit ` description`,
when provided.
As the field digit doesn't exist on currency, we use decimal_places
instead which is the field containing the number of digits of the
corresponding rounding field
When fetching batched namegets (typically after a default_get), we need
to evaluate the context that we send to the server. This may be
important for models with a custom name_get method. (note: overriding
namegets should be avoided if possible)
With the new views refactoring, this was not done properly and the
'view' context was sent instead. This is not really critical, the proof
is that it took a few months before getting some complaints, but this is
definitely a bug.
To reproduce, simply add a context attribute to a m2o field in a form
view, with a non empty value in a default get, and look at the context
sent to the server.
Unlinking such a record causes a cache invalidation, that drops the values of
other company-dependent fields to set. This may cause other company-dependent
fields to be set to their former value.
OPW 782080
As there's a check for unique supplier reference numbers, you can't duplicate them as the field is copied on the duplicated record. This patch removes the copy for emptying the error.
@Tecnativa
Before this commit, when a localization defined default payable or receivable
accounts on partners (like l10n_do does)
The reconciliation tests that involve an invoice on the one hand and a payment on the other hand
broke just because the accounts of the payment and the one of the invoice did not match
After this commit, we force the receivable or payable account to be the partner's (if available)
and the tests do not break
If an user (or a developer) wants to install this module twice, she
could not before this patch. Because those demo data call a function
that crashes if the state of the demo data has been modified... and
modifies it!
We avoid this issue by resetting the states of the demo data
explicitely (before a deeper refactoring)
Before this commit, when printing all orders from the POS interface,
the ticket sometimes showed weird amounts (like 128.25000000001).
This was due to the usual problem of representing a float and has nothing to do with Odoo.
After this commit, the templates correctly display the amounts, rounded according to the currency
We do this by applying the relevant qweb widget (or calling the right format function in JS)
OPW 784626
Related fields that are not readonly are rewritten each time you save the
associated record, provoking performance problems.
Moreover, we don't want to allow an employee to change its department through
an attendance record.
Closes#21441
This commit improves and cleans the project rating page;
- statistics of top 5 rated in last 15 days in right column of the page
- move progress bar for tasks on right side of the page
- show the detail of a rating when mouse hovering on the smiley
Since the page is refreshed, the statistics computation is done
with a single SQL request to extract all raw data to calculate
period and partner stats to display.
Thanks to @ror-odoo for the first implementation and to @jem-odoo for its review
Suppose we convert a x2many field `foo_ids` with a many2one sub-field `bar_id`.
The conversion of the values of `bar_id` generates pairs `(id, name)`. Before
this patch, the method `name_get` is invoked on every value, one by one.
Rewrite the code to ensure that `name_get()` is invoked on all values at once.
In Pick - Ship:
- validate a sale order which scheduled date is an hour in the future.
- validate the WH/PICK picking
Before this commit the WH/OUT picking 's scheduled date was set a day in the **past**
This was due to the implementation of datetime substraction and timedelta, which,
in case of a negative value, would take -1 day and some complementary values (hours, minutes etc...)
(the difference is complementary)
After this commit, the WH/OUT picking 's scheduled date stays what it was in that particular use case.
OPW 784452
Purpose
=======
Users often log an activity and want to schedule another one immediatly.
We should limit the number of clicks
Specification
=============
- Mark as done should be a secondary button
- Add a new secondary button : DONE AND SCHEDULE NEXT
- It should mark the activity as done and close the modal
- It should open a new activity modal
Behavior and available options are now the same in the Chatter modal and
the wizard itself. It implies correcting the crm_tour flow
When an error happen (which may have been intended as such and ignored
down the error pipeline) in google_account/google_calendar there was
some typos that tracebacked.
opw-783271
closes#21263
Containing
* fix self._round not always existing;
* fix counter for activity creation;
* use self.str() in order to have some variation in test_mail;
* separate base performance to mail feature specific performance tests;
This commit add an icon for each people that worked on the Wo
and also
a play icon if the WO is in progress
a pause icon if the WO's workcenter is blocked.