The mail-safe font is applied to a style in <head> for emails. But the
way it was applied, <div>s were forgotten. Since most of those are
converted to tables when converting body_arch to body_html, it resulted
in visible font differences between body_arch and body_html.
Part-of: odoo/odoo#83233
When fonts with a round border were converted to images, the dimensions
often ended up slightly off, and most visibly a little bit cropped by
the border.
Note that this also removes the "alpha" argument of the font_to_img
route since it wasn't used anywhere and transparency is not supported in
emails anyway.
Part-of: odoo/odoo#83233
When converting from grid to tables, we need to convert values from x/12
to x/100. The rounding error was a little too big, making it too visible
at times. With this commit we now round to 2 decimal places instead of
rounding to the nearest integer.
Part-of: odoo/odoo#83233
The conversion from rem to px was rounding the value to 1 decimal place
but the browser handles up to 2 decimal places. As a result there were
visible inconsistencies in the conversion (12.25px in the original
becoming 12.3px in the converted email).
Part-of: odoo/odoo#83233
The align-self and justify-content styles don't work on cells so when
converting a Bootstrap column to a table cell, we should also apply a
vertical alignment. The same applies to align-items on rows.
Part-of: odoo/odoo#83233
When the user-select is none in firefox, it is impossible to select the
text even if the content is editable.
Task-2716365
closesodoo/odoo#83255
X-original-commit: 88a5269b2130bc82c48bc587a042c24062bc4e96
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The colorpicker failed in cases like:
```xml
<font>a<span>b</span>c</font>
```
where we select the letter "b".
This was because `applyColor` only considered direct children of the
`font` element. This extends it to deal with further descendants of it.
task-2623347
closesodoo/odoo#83254
X-original-commit: 5d8d98812a4f351abd27389c4992bf9e753833b7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The editor toolbar button to trigger the colorpicker is supposed to show
the color of the currently selected text. This was failing in iframes
because the code was called on the wrong document.
task-2623347
X-original-commit: 7ad6536dd98f9749d63bfc7292e490f6ac629b9c
Part-of: odoo/odoo#83254
In some undetermined circumstance in chrome, the selection rect is
wrongly defined.
Task-2728792
closesodoo/odoo#83248
X-original-commit: e9ee8175538e1201acb2ae108b2283f55217ca5f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Steps :
- Upload logo of company
- Attendance > Kiosk mode
Issue :
- Logo is distorded
Cause :
- width is set, but not height
Fix :
- height : auto to adjust height to width.
opw-2739471
closesodoo/odoo#83243
X-original-commit: 38ecea374328dfb1601287ce446bfb996095b197
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Current behavior:
When using a Tax that has no account linked to it, you were not able to close the PoS
Steps to reproduce:
- Create: tax computation: FIXED
- Create product with this new tax, set price, set available in POS (invoice policy: ordered quantity)
- Create sales order, add product: tax is added. Create invoice: tax is added
- Open POS, sell product, select payment.
- When closing the POS session an error message is generated
opw-2725106
closesodoo/odoo#83236
X-original-commit: c364b810b2ea0c17ed4dc88afcc8d2a8ec61cda5
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Database manager may easily be broken since it wasn't tested and is a
special case (can be rendered without databases). This commit adds a
basic test to check that the database manager is rendered as expected.
Testing database rendering is not enough, in some cases the database
operations may be broken. Another test will be executed on runbot to
test basic create/duplicate/delete operations. The test is tagged as
"-standard" since it can be a risk to execute such operation
automatically with other tests.
closesodoo/odoo#82874
Signed-off-by: Raphael Collet <rco@odoo.com>
When setting the password in the database manager the config is saved
automatically in a odoorc file.
This can be problematic, especially when testing locally, with
specific options.
Going in the database manager and creating a new database or changing
admin pasword will save all those options.
This commit proposes to only save the admin_passwd when modified.
Part-of: odoo/odoo#82874
Create a new Interviewer access rights.
This right is automatically given to users that are added as
Interviewers on a Job Position or on an Application.
An interviewer can only access applications they are interviewer of the
job or the application itself, the chatter is disabled for them as it might
contain some sensitive information (salary details, contract link, etc.)
closesodoo/odoo#78622
Taskid: 2669730
Related: odoo/enterprise#21778
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Steps to follow:
- Go to the Accounting Dashboard
- Click on Bank > Import statements
- Follow the flow to import a file
- Once redirected to the reconciliation, go back to the import from
the breadcrumbs
- Load a new file
Cause of the issue
The state machine used to handle events didn't allow going from
imported to filed_loaded
opw-2706505
closesodoo/odoo#83219
X-original-commit: a19a0bdca369c9038a7a34363a1d9b7ee06f899d
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Step to reproduce:
- Install website_sale module
- Go to the shop
- Add a product to the cart and proceed to checkout
- Click on Customize and activate `Accept Terms & Conditions`
- Deactivate the `Accept Terms & Conditions` or click on a
payment method.
Issue:
UI freeze.
Solution:
Freeze ui only when clicking on pay button.
Unfreeze only if payment process fails (or when displaying an error).
Revert of https://github.com/odoo/odoo/commit/41b91e12eb80cee08e3a25bcc6546ef34937d8cf and adapt it correctly
opw-2702798
closesodoo/odoo#83155
X-original-commit: b6ae8a0a91c58ce503c98ca2a66a4d125907dac1
Related: odoo/enterprise#23639
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
Avoid to base64 encode, then decode to process assets and images for a ~25% speed improvement.
Change image processing tool to work on images, rather than base64 encoded strings.
Performance is ~25% faster on assets & images:
/web/assets/...frontend.min.css: 13ms to 7ms, base64 enc/dec: 2 -> 0
/web/image/XML_ID: 10ms to 8ms, base64 enc/dec: 3 -> 0
/web/image/res.users/2/avatar_128: 40ms to 20ms, base64 enc/dec: 6 -> 2
closesodoo/odoo#82851
Related: odoo/enterprise#23537
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
Steps to reproduce the bug:
- Log in as Admin
- Go to POS and open a session
- Select a customer for the order and complete the order
- Close the POS session
- Go to the associated customer to view their contact record
- Click the smart button for "Orders" > Admin can see POS orders for customer
- Log out, then log in as Demo
- Go to the contact and click the smart button for "Orders”
Problem:
An access error was raised:
`You are not allowed to access 'Action Window' (ir.actions.act_window) records.`
Only people in group Administration/Settings could read `action_pos_pos_form`
Solution:
To avoid this error, we should use `_for_xml_id`.
Opw-2734462
closesodoo/odoo#83214
X-original-commit: 05d17c9734249ed5a34ae84124bf14fd1b5f3b7c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Commit [1] moved the scrollbar from the document body to the top element
(#wrapwrap). This works for website builder but fails for iframes which
don't have that element. This is apparent in Marketing Automation mail
templates where it's become impossible to scroll down.
This fixes that issue by unsetting the overflow in the iframe.
task-2734825
[1] https://github.com/odoo/odoo/commit/9f048625e11dacda9fd49694e89ae65bc112374fclosesodoo/odoo#83203
X-original-commit: ec14cc47c1ab7bd414af3b8ab99f859370f0a265
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit, the implementation of Buckaroo's method for
computing the signature of a dataset was upper-casing data keys before
sorting them, in order for the sort to be done in a case-insensitive
manner. The issue is that, as `ord('A') < ord('_') < ord('a')`, two keys
could be incorrectly swapped if they shared the same prefix and one of
the two contained an underscore. For example, `brq_transactions` would
be appended to the signing string before `brq_transaction_type` whereas,
if the sort was based on the upper-case keys, the second would be
appended before the first.
This commit changes the computation of the signature to rely on the
lower-case keys rather than upper-case keys in order to use the same
method as Buckaroo when they compute the signature on their end.
closesodoo/odoo#83202
X-original-commit: 0112d69252a8a8396f9509e240c741fa2e261fb3
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
User testing showed that removing social links could confuse the user.
task-2733132
closesodoo/odoo#83201
X-original-commit: fb6998fad08b3f1cb23a4cc0baed2609a141f538
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Attachments of the chatter didn't update when a log with an attachment was deleted
Steps to reproduce:
1. Install Sales app
2. Open any sale
3. Create a log note with an image attached
4. Delete the log note
5. The image is still in the sale's chatter attachments
Solution:
When deleting an attachment, send the info on the current partner's bus
OPW-2732793
closesodoo/odoo#83199
X-original-commit: f5f09b7c73bc7a5243a3b6edcfa5d047de33d95e
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The text_block snippet has the option to add columns in website but not
in mass_mailing. This is a clear oversight that is hereby addressed.
task-2737896
closesodoo/odoo#83174
X-original-commit: 2738b45deeb6eec7209ece72b9c9dabf8dda0871
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
On opening field html with the inline styles option we were parsing all
the css in the page. This should only be needed when we save. This
commit moves the call to `getCSSRules`back to `commitChanges`.
closesodoo/odoo#83131
X-original-commit: 0d4342317d456ed37f0bf24f00538ef54f847e60
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Both of the native `magic` libraries can trigger an allocation error
if the buffer being sniffed is large. This results in nothing useful
for the user and just triggers and exception when trying to create
large attachments (in the hundreds of MBs).
Fix by implementing the workaround suggested in
ahupp/python-magic#82, under the assumption that it should also work
fine for Debian's python-magic.
The pure-python trivial version of odoo should not have this issue, as
it does not normally copy the source buffer in full, it just seeks and
slices the buffer, and occasionally parses it as a zip (but does not
normally load everything in memory).
Task-2722110
closesodoo/odoo#83190
X-original-commit: 94fc66452f28a8c64b4077d6cc2dd17ea1f00aa6
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
It was not possible to set a different value via the field datas
Add tests
closesodoo/odoo#83175
X-original-commit: b1f047430c97ad4c0da028c1654ce640378e2f51
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
The random ids of checklists and stars are preserved in the dom, which
is needed for their readonly check features to work. However, it
complicates testing. This systematically removes these ids in tests.
It also removes the ids when they are not needed anymore (the node is
not a checklist anymore for instance).
closesodoo/odoo#83137
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This reverts bfed1edd26312488dc0f45e8982b51ea4d98db76.
That commit had issues which were hidden by the fact that tests had an
only in them due to a prior mistaken commit. Therefore, it must be
reverted as a proper fix needs to be found.
X-original-commit: 22c2a9dca29adcad84072e3f053ab78b7834f4f3
Part-of: odoo/odoo#83137
The purpose of this task is to use the notification which we currently
have for partner autocomplete and to generalize it to our other IAP
services.
So in this commit, we improve the iap notification for the below views
-> we display a toast in green when the request was successfully completed
(and the user has enough credits).
- when a letter is sent in batch from the list view
- when leads are enriched in batch from the list view
-> we display a toast in orange when the user doesn't have enough
credits with a corresponding 'buy credits' link to the service.
- when a letter is sent in batch from the list view
- when leads are enriched in batch from the list view or when
clicking on 'enrich' from the form view
- when creating a new lead mining request
task-2185306
closesodoo/odoo#66977
Related: odoo/enterprise#16736
Signed-off-by: Arnaud Joset <arj@odoo.com>
Co-authored-by: Nisha Patel <nit@odoo.com>
As there are currently no menu for the implementation
of Sweden localisation Balance sheet and Profit and Loss reports.
Links for those forms are added here.
Are also added a K2 complete COA implementation and
a complete child COA that is BAS compliant.
Tags for more account controls on reports were also added.
closesodoo/odoo#83150
Task: task-2674123
X-original-commit: ebdee5efde067c3bb3abbe0c1c382cca768100a7
Related: odoo/enterprise#23636
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
When user tries to print a receipt from a small device, sometimes receipt
is cropped on the right side. This happens because unlike height, receipt
width is not calculated, instead it is equal to the width of the receipt div.
The width of the receipt is equal to the outer width of the receipt instead of div
and the receipts are not cropped anymore.
OPW-2721030
closesodoo/odoo#83142
X-original-commit: c327670e9830506f29c9778bd428ee65964ec622
Signed-off-by: Masereel Pierre <pim@odoo.com>
With this commit, when you perform a search in the command palette,
the part of the commandItem's name that matches the searchValue will
be highlighted.
closesodoo/odoo#82407
Task-id: 2741837
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
There were some discrepencies when adding to/removing from WO Real
Duration:
- When adding time that is brings the total Duration over the expected
duration, the time should be split between the "productive" and
"performance" (i.e. reduced speed) times. This is already happening
when using start/pause buttons, so now it is consistent.
- Use 'id' instead of "Start Date" to determine which time_ids
to reduce/remove since adding a large enough "real duration" value
compared to previous time_id(s) could result in an earlier "Start
Date" for a newer time_id (i.e. results in which one is adjusted/
deleted = confusing). Using "End Date" was considered, but same
non-sequential issue can occur during time split from point above.
- Correctly determine if the "productivity" should be 'productive' or
not (i.e. 'performance') based on total WO duration (not duration
of newly added time_id)
Refinement of Part 4 of Task: 2667151
closesodoo/odoo#80319
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Due to many move values being set only during an onchange, there were
inconsistencies with the values of the products to manufacture and the
MO's components in the following cases:
- when a MO has manually added components/byproducts (i.e. not from a
BoM or a MO with no BoM) = missing values
- a MO is copied = incorrect values copied
- a backorder is made = backorders' moves contained new "-00#" name, but
original "-001" MO did not update all corresponding values to new name
There were also a couple of default values for manually added moves that
were either incorrect or not correctly saving.
Most of these inconsistencies are not visible to the user unless they do
a data export or are playing close attention (e.g. copying an MTO
triggered MO will copy the date_deadline, and this value cannot be
edited by the user.)
Part 6 of Task: 2667151
Part-of: odoo/odoo#80319
Several UX improvements:
1 - Add "Unbuild" filter to MOs (1 or more 'Done' unbuilds) + added
Unbuilds smart button to MO form view
2 - When copying an operation across BoMs, it is annoying that it adds
"Copy" to the end of the name, so we remove that.
3 - Display a warning when using an expired Lot/SN in detailed operations
view (burger window + tab).
4 - Allow adding/removing WO Real Duration + add/remove/edit specific time
time tracking (time_ids) for Done, Unlocked MOs.
5 - Allow search WOs by product to manufacture
7 - Fix validation error message typo
Parts 1-5 and 7 of Task: 2667151
Part-of: odoo/odoo#80319
When trying to identify the user sending an email, do not match anyone
without email.
Sometimes we get an email without a valid From address (spammers or
bugs), the previous code was trying to find users with this email.
In historical databases, we often have many users without an email
address, they should not match the search.
This commit fixes two bugs:
_mail_find_user_for_gateway:
No longer match on the first res.users with no email when identifying
the user using the gateway. This was not problematic (as we have a
fallback on self._uid anyway) but it is more accurate for tracebality
of emails.
_find_members
This method is called from _alias_get_error_message to verify that the
sender is indeed in the group with the followers restriction. On large
mailing list, it is not uncommon to have members with empty emails
(migration, historical reasons,...). Sending an email without any From
was matching on these subscribers without email and the email was
accepted.
These emails are invalid and should not be accepted.
closesodoo/odoo#83122
X-original-commit: 8ec7b92467da2856a496210af1f2232eba6bafb4
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
E documents cannot be selected for invoices and bills which is a problem for companies in Tierra del Fuego, a fiscal exception of Argentina
Steps to reproduce:
1. Install the l10n_ar module
2. Switch to the company '(AR) Responsable Inscripto'
3. Open the Invoicing app and go to Vendors->Bills
4. Create a new Bill and select '(AR) Responsable Inscripto' as vendor
5. The document type '(19) Facturas de exportacion' is not available
Solution:
Add 'E' as journal letter for AFIP responsibility type 'IVA Responsable Inscripto'
OPW-2713805
closesodoo/odoo#83119
X-original-commit: 27edc28a2c19fad80053e668a8c72e7a629e4c1a
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Steps:
- Go into a view and filter on date/datetime
- Select between
- change the input max date manually
- click outside the calendar while remaining in the filter dropdown to "validate" the input
- infinite loop/crash
Same problem/fix as https://github.com/odoo/odoo/pull/78394 in 14.0
opw-2722797
closesodoo/odoo#83107
X-original-commit: 32e2d88ca0a864c91992b2c522ef21dbcb9787a5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
The "Attachments" column was removed in odoo/odoo#76550, but it seems that it
is still needed after all.
closesodoo/odoo#83106
Taskid: 2741777
X-original-commit: 60e4057bc51f9879c756b6efdeb90368ca64b4cd
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>