This introduces a doctype declaration in the initialization of html
fields iframes and wysiwyg iframes. That prevents the browser from
rendering in Quirks mode[1] which makes tables override the usual style
inheritance patterns. As a result, this fixes an issue with text colors
and alignments that were lost on converting divs to table structures.
[1] See https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode
X-original-commit: da5cf4bcac696a73c33d856ac889342fe8670e65
Part-of: odoo/odoo#81540
This covers minor refactors in convert_inline, and adds docstrings to
some of its functions that were missing them.
X-original-commit: 7c67a703ac5874cbd05ab5e82f566499b1e07849
Part-of: odoo/odoo#81540
There was a section of code in `getMatchedCSSRules` that didn't do
anything. Essentially its loop did `a === b ? a = b : break`. As for
what was done before the loop (a = b), it's what is done with the styles
returned by `getMatchedCSSRules` in `classToStyle`.
X-original-commit: 835dba6ec02f1eb4dc43c33fc3bd5eab08032707
Part-of: odoo/odoo#81540
There was dead code in `addTables` that would never get triggered. When
fixing that, the code crashed because of a reference to the wrong
variable. Those two problems are hereby fixed.
X-original-commit: 21dccd1521c654eb9723a93bceda8e3e3ec8cc6a
Part-of: odoo/odoo#81540
When converting an rem size to a pixel size, we sometimes ended up with
values with many decimal places. This rounds them to one decimal place.
X-original-commit: 8f8d5bf93f60560040a37695c3439600d5d88287
Part-of: odoo/odoo#81540
A percentage height will only be applied on an element whose parent has
a set pixel height. This is why convert_inline applies a pixel height to
the parent of each element with a percentage height when possible. But
it failed in the case where said parent also had a percentage height.
This keeps looking up the tree until we find an appropriate suitor for
that pixel height.
X-original-commit: a9b0184087bec08db523a02068cc3d04b5f1381e
Part-of: odoo/odoo#81540
For the purpose of good compatibility across email clients, we need
paddings to be applied to cells rather than to tables. The mechanism in
charge of that wrongly added up the paddings, and excessively rounded
them to integers. This commit fixes these issues.
X-original-commit: 6c6e0c18176b41bd1c6967973d0e774f8094c76f
Part-of: odoo/odoo#81540
When converting a list-group to a table, we sometimes ended up with <li>
in <td> element, which is non-sense and is hereby corrected.
X-original-commit: 41eda109d2fbc0eb6616fb03102a205b945ab9b2
Part-of: odoo/odoo#81540
When converting the last row of a grid to a table row, we may end up
having handled all of its columns, but there is still space in the row.
This ensures we properly insert the columns and fill the row.
X-original-commit: 52c35361a0cc86e87337ef321c1b198d4f8cc3c1
Part-of: odoo/odoo#81540
This fixes an issue with the conversion to table of rows that had such
long columns that they should span more than two rows.
X-original-commit: 4daf4378db023365415994296ea7bac53ecb907c
Part-of: odoo/odoo#81540
Prior to this commit, it was impossible to change the background color
of many columns (eg.: Big boxes). This was because the selector for the
option had likely not been adapted along with the snippet structure.
task-2711618
closesodoo/odoo#81538
X-original-commit: 9db006a6f2f5f1f8e6fd29ca0c0b5157988fb710
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit, `XmlHttpRequestError abort` could show up as client error
with an empty stack trace.
see task-2664831
closesodoo/odoo#81531
X-original-commit: 3bd542cef735512700431b32ad2ab93834769a99
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
And make configurable via an ICP. Provide a reasonable default value,
and use it as a lower bound so user error can't lead to an insecure /
unsustainable amount of hashing.
Aside from being somewhat overdue on account of age (passlib's current
default were last updated 6 years ago), this is also made much more
feasible by API keys, meaning non-interactive use (RPC) is less
strained by the (interactive) password hashing.
Also modernize passlib usage:
* Remove global `DEFAULT_CRYPT_CONTEXT`, create inline (as overhead
should not be too huge given what we're doing with it), and
`ormcache()` for safety, the caches should be invalidated on any ICP
addition, removal, or update, so user update to the rounds
configuration should get reflected immediately.
* Switch on `deprecated=["auto"]`, feature was added in 1.6 and we now
depend on 1.7.
* Remove mentions of `encrypt`, it is deprecated in 1.7.
closesodoo/odoo#81498
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
**Description of the issue/feature this PR addresses:**
Lunch App: not able to place lunch orders from the list view of Lunch App -> My Lunch -> New Order list
**Current behaviour before PR:**
Create button visible on the Lunch App -> My Lunch -> New Order list view. when we click on it nothing happens.
**Desired behaviour after PR is merged:**
Like v14 Create button will be invisible and able to add an order from Lunch App -> My Lunch -> New Order by clicking on any records from the list view
Fixes#78272
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#81514
X-original-commit: 7026dc8357c29451dbcff132dc19c60614e38b82
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Access /base/static/img/country_flags/fr.png, 404 file not found but it
exists.
The conditional was wrong. We should load static files when the addon is
installable OR that it contains assets.
Code before 2e29a93:
expr = not manifest or (
not manifest.get('installable', True)
and 'asset' not in manifest
)
if expr:
continue
...
Code after 2e29a93:
expr = manifest and (manifest['installable'] or manifest['assets']
if not expr:
...
Proof:
a is manifest
b is manifest.get('installable', True)
c is 'asset' in manifest
expr = ~a | (~b & ~c)
~expr = ~(~a | (~b & ~c)
= a & ~(~b & ~c)
= a & (b | c)
Fine-tuning of 2e29a93closesodoo/odoo#81509
Signed-off-by: Raphael Collet <rco@odoo.com>
Rename javascript model 'mail.attachment' to 'Attachment' in order to
distinguish javascript model from python model.
Part of task-2701674.
closesodoo/odoo#80601
Related: odoo/enterprise#22609
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
When you need to add certain details to the data in order to make a
maintenance request. I can't do it using the old code.
As a result, I've included a hook method to be more flexible with
customers.
closesodoo/odoo#81052
X-original-commit: a71a8fbc43cf0deee669869792b2ff2ac9ab9a8b
Signed-off-by: Arnold Moyaux <arm@odoo.com>
- Set up a POP account
- On the POP account, receive emails addressed to various recipients,
e.g. `my_alias_1` and `my_alias_2`. Receive more than 50 emails to
`my_alias_2`.
- In Odoo, create a mail alias for `my_alias_1`
- Run the fetchmail cron
The cron runs endlessly until it is killed. In the logs, inconsistent
messages are shown:
```
...
Fetched 3507 email(s) on pop server xxx; -16493 succeeded, 20000 failed.
Fetched 3507 email(s) on pop server xxx; -16543 succeeded, 20050 failed.
...
```
First the message count is incorrect in the log. We fetched at most 50
emails, not the total number of emails. Then, the endless loop is due
to the fact that
- we do not delete failed messages (= messages addressed to
`my_alias_2`)
- we always fetch messages from `num=1`
If the first 50 messages fail, we fetch them endlessly until the cron is
killed.
To avoid this, we compare the number of failed messages with the number
of messages retrieved. If all messages retrieved have failed, we stop
the loop.
After the fix, consistent messages are show in the logs and the process
stops after the first complete failure:
```
start checking for new emails on pop server xxx
Fetched 50 email(s) on pop server xxx; 0 succeeded, 50 failed.
```
Note that it doesn't solve the core of the issue; we just fail faster. A
proper way would probably be to use an offset so we don't always start
at `num=1`. On the other hand, it is just a matter of time before the
cron times out: if the mailbox is full of messages which canot be
treated, we will just spend more and more time trying to find the ones
which can be treated.
closesodoo/odoo#81493
X-original-commit: 72cd8d0769097b21bbf94a34496888617058cb1b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Rename javascript model mail.volume_setting to VolumeSetting
in order to distinguish javascript model from python model.
Task-2701674
closesodoo/odoo#81479
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Steps to reproduce:
- Install and launch sales
- In settings: activate price lists and discount; price list based on advanced rules
- Create a new price list; based on percentage (54%)*; applicable on all products; show discount
- Make sure the Public Price List has show discount activated
- Create a new quotation
- Select the Test pricelist
- Select a product (price 0.03 eur/$/other)*
- Change the price list to Public price list
- update the prices
- change the price list to Test price list
- update the prices
-> The Discount shown is not the one defined in the price list (66.67%)*
*(values for my example)
Solution:
Use the real price and not the a posteriori-rounded price for the computation of the discount in the `update_prices` method.
opw-2677884
closesodoo/odoo#81395
X-original-commit: 986dbc20952caae9d5a1b4b7ee34cfb994dea077
Signed-off-by: yosa-odoo <yosa@odoo.com>
In this commit, we add the 'rating' field to the list view of 'project.task'.
Also, make the field optional and hidden by default.
rating_text field will be used to search tasks and tickets by rating text.
closes#78973
task-2667754
Related: odoo/upgrade#3031
Related: odoo/enterprise#21880
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
-if an analytic tags are inserted on the project, it will be added to the timesheet /invoice
analytic tag.
-In this commit, analytic tags field is added on project in order to gain in
granularity.Those tags are passed to the invoice lines generated from the
project's SO lines.
-set the analytic account and analytic tag of the project by default on its tasks.
-added string 'Analytic Tags' analytic_tag_ids field on task.
closes#78973
task-2667754
The aim of this commit is to make the cogs generation multi-company
safe.
2 bugs are fixed in this forwardport commit:
- The product.valuation on the line wasn't evaluated in a company safe
way.
- cogs method weren't company safe either
Before this commit:
- When posting an invoice from company B with both company A and B
selected and A being selected as "main", the cost from company A could
be selected instead of cost from company A to create the anglosaxon
lines.
- If company B's product isn't in real time valuation, cogs aren't even
created.
After this commit:
Whatever the selected companies are, the cost selected will always be from
the company that created the invoice.
closes odoo/odoo#81492
Task: #2686104 and #2713607
X-original-commit: e34caf0ec33a3001bb6343e02d34a6edb5a9f609
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
Currently Bank Suspense Account has "Current Liabilities" type, while it should be "Current Assets"
Task ID: 2702804
closesodoo/odoo#81491
X-original-commit: c6d2a50499744a9ddbb09a9974d6ab52116ef542
Signed-off-by: Laurent Smet <las@odoo.com>
Go through all the x2many javascript models fields and make their name
plural when needed.
closesodoo/odoo#81467
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Rename javascript model mail.user_setting to UserSetting
in order to distinguish javascript model from python model.
Task-2701674
closesodoo/odoo#81478
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Rename javascript model mail.follower_subtype_list to FollowerSubtypeList
in order to distinguish javascript model from python model.
Task-2701674
closesodoo/odoo#81470
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Rename javascript model mail.thread_view to ThreadView
in order to distinguish javascript model from python model.
Task-2701674
closesodoo/odoo#81468
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Rename javascript model `mail.discuss_sidebar_category` to
`DiscussSidebarCategory` in order to distinguish javascript models from
python models.
Part of task-2701674.
closesodoo/odoo#81345
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.message` to `Message` in order to
distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81366
Related: odoo/enterprise#22883
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model mail.user to User in order to distinguish
javascript models from python models.
Task-2701674
closesodoo/odoo#81471
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Rename javascript model `mail.qunit_test` to `QUnitTest` in order to
distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81462
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit fixes the way is_internal_project is computed.
closesodoo/odoo#81463
X-original-commit: ea7d5451be3277b0a3ab779e05920ca5757a2a6e
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Slightly raise some undeterministic query counters, because another
unknown query appears on nightly runbot (around 10PM)
closesodoo/odoo#81458
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
In the `slide.channel`, description field was converted from Text type
to HTML(see commit[1]). This field is also used as a description of the
`hr.resume.line` model. However the later one expects plaintext value
but gets the HTML. This leads to displaying HTML tags to the users.
With this commit, we convert description of the `slide.channel` into
plaintext before adding it as a description of `hr.resume.line`.
commit[1] - https://github.com/odoo/odoo/commit/6d914c005183aa5ae69650e3002a5a85ca83b4a6
taskID-2711308
closesodoo/odoo#81457
X-original-commit: f8eaf7b69085a475a50c24bb732a95bf7ef0d7a9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Rename javascript model `mail.thread_view_topbar` to `ThreadViewTopbar`
in order to distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81442
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.welcome_view` to `WelcomeView` in order to
distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81441
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `website_livechat.visitor` to `Visitor` in order
to distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81440
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.thread_viewer` to `ThreadViewer` in order
to distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81437
Related: odoo/enterprise#22911
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.composer` to `Composer` in order to
distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81327
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.chatter` to `Chatter` in order to
distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81325
Related: odoo/enterprise#22863
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Rename javascript model `mail.canned_response` to `CannedResponse` in
order to distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81318
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.notification` to `Notification` in order
to distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81418
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.partner` to `Partner` in order to
distinguish javascript models from python models.
Part of task-2701674.
* = hr, hr_holidays, im_livechat, website_livechat
closesodoo/odoo#81406
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.notification_group` to `NotificationGroup`
in order to distinguish javascript models from python models.
Part of task-2701674.
closesodoo/odoo#81405
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Rename javascript model `mail.message_reaction_group` to
`MessageReactionGroup` in order to distinguish javascript models from
python models.
Part of task-2701674.
closesodoo/odoo#81383
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>