On safari with apple device in belgium timezone, this code:
```
x = new Date(2020, 2, 28, 2)
x.setDate(29)
```
returns:
> Sat Mar 28 2020 02:00:00 GMT+0100 (CET)
> Sun Mar 29 2020 01:00:00 GMT+0100 (CET)
This is not consistent with any other combination of OS and browser
tested, where this code would return eg. for chrome on macOS:
> Sat Mar 28 2020 02:00:00 GMT+0100 (Central European Standard Time)
> Sun Mar 29 2020 03:00:00 GMT+0200 (Central European Summer Time)
In most instance, this is not an issue, but for country with midnight as
Daylight Saving Time (DST) change, this is an issue, because the Tempus
Dominus calendar widget will have a duplicated day which might eg. make
a month totally not usable.
This issue can eg. be reproduced in Lebanon timezone at this address:
https://tempusdominus.github.io/bootstrap-4/Usage/
Going to the month of April 2020, an error happen because to get the
first day of the week of 1st April, we do:
```
this._viewDate.clone().startOf('M').startOf('w').startOf('d');
// .startOf('M') => Apr 01 00:00:00
// .startOf('w') => Mar 28 23:00:00 (safari bug)
// .startOf('d') => Mar 28 00:00:00
```
which gives us the wrong day (28 instead of 29) which causes an error.
Other report of the issue:
- https://www.donedone.com/timezone-specific-browser-specific-datetime-bug-2014/
- https://github.com/date-fns/date-fns : issue 571
- https://forum.mobiscroll.com/t/issue-with-invalid-dates-range-script/108
opw-2271482
closes#59786closesodoo/odoo#59908
X-original-commit: 112267d62544c56acfdcef96727c32c314c15f16
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit fix the fw port https://github.com/odoo/odoo/pull/58149
which does not work in all scenario
Create a sale order
Put an optional product with long description (no line break)
Save and confirm
Log in the portal with the receiving user, add the optional product to
the order.
The customer can't see the quantity of the optional product.
The number is not showing in the quantity adjustment widet.
opw-2350879
closesodoo/odoo#59801
X-original-commit: 9a91fe7d6064475bc949a5c2aee883ea2f419930
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Commit e10fd34682 introduced batched reference fields name_gets
across groups but was also buggy as follows:
Have a grouped list view showing at least 2 groups
Have a reference field with different values showed in the list for each record
Before this commit, the name_get of those reference fiels were fetched only for the last group
After this commit, the name_get are fetched in a batched fashion (by model) for each group
and display correctly
closesodoo/odoo#59910
X-original-commit: bbb608a1eff638040f0fc7b951fedf1579cc15b2
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Issue
- Install "Elearning" module
- Activate "Drive" credidentials in settings
- Go to any course and edit it.
- In "Content" tab, click on "Add Content"
- Select `Video` as 'Type'
- Copy/Paste the Google Drive video link in "Document URL" field
- Wait for other field to be computed then "Save & Close"
- Save the course
- Go to the website to watch this new content
Youtube error message
Cause
'mime_type' field is readonly. When saving the course (slide.channel),
the slide is not saved yet, and therefore drop the 'mime_type' value.
When generating the `embed url`, it verify if a mime_type is set: if not,
it will generate an iframe with youtube.com as domain, else,
a drive.google.com domain.
Solution
Add `force_save="1"` on `mime_type` field.
opw-2294344
closesodoo/odoo#59917
X-original-commit: 987b9bf408cf5ba2deded7e2015caa6faeb65a87
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
The goal of this commit is to prevent the theme install/update
loader from inheriting the opacity property from container by
setting a background-color with level of transparency.
task-2312878
closesodoo/odoo#59887
X-original-commit: 1e7424579ba7b59c9bc7a4972b10403610f720cb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The problem here is before this changes, the fiscal position only take into account if them has "auto_apply" True, and for the cases that the partner has their property fiscal position configurate for a company this is not taking into account.
After this changes we evaluate for the property fiscal position for the partner and then if non result we seek a fiscal position with the auto apply and the responsability of afip.
So this the same as the original method do.
closesodoo/odoo#59875
X-original-commit: 5ddcad3cb1d6063b7be89e4f0bd35b89885f746b
Signed-off-by: Josse Colpaert <jco@openerp.com>
Make sure to assign a value to the computed fields
`mobile_blacklisted` and `phone_blacklisted`
in their compute method for all record included in `self`
Otherwise, not assigning a value for one record included
in `self` can result in a cache missing error.
```
Traceback (most recent call last):
File "/tmp/tmp3l14ain7/migrations/base/tests/test_mock_crawl.py", line 143, in crawl_menu
self.mock_action(action_vals)
File "/tmp/tmp3l14ain7/migrations/base/tests/test_mock_crawl.py", line 212, in mock_action
mock_method(model, view, fields_list, domain, group_by)
File "/tmp/tmp3l14ain7/migrations/base/tests/test_mock_crawl.py", line 238, in mock_view_form
[data] = record.read(fields_list)
File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3001, in read
return self._read_format(fnames=fields, load=load)
File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3021, in _read_format
vals[name] = convert(record[name], record, use_name_get)
File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5620, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 980, in __get__
raise ValueError("Compute method failed to assign %s.%s" % (record, self.name))
ValueError: Compute method failed to assign crm.lead(974,).phone_blacklisted
```
closesodoo/odoo#59870
X-original-commit: 55d7b9d3304f75aa2089c32c4a907066da4dc4b8
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
To investigate a bit. Sometimes a few extra queries are generated.
Task ID-2359847
closesodoo/odoo#59869
X-original-commit: 36bb56a5e9704c76e84960ec84588524b52406f8
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
To reproduce the issue before this fix:
1. Create accounts ACC TAX A, ACC TAX B, with reconcile = True, internal_type = other
2. Create Tax B, with tax_exigibilty = on_payment and account_id = ACC TAX B and cash_basic_account_id = ACC TAX A, 20%
3. Create invoice B, account_id = Tax B, unit_price = 1000, Valide invoice,
4. Register a payment of 600 for invoice B (so, that's half the invoice, when including the taxes). The cash basis tax creates a miscellaneous operation MISC A, containing a line on ACC TAX A.
5. Create a mis operation MISC TVA, like this:
line 1 : account_id = ACC TAX A, credit = 100
line 2 : account_id = 401100, debit = 100
6. Reconcile the following move lines:
line of MISC A with account ACC TAX A (100)
line of MISC TVA with account ACC TAX A (100)
==> The lines should be fully reconciled
To solve that without breaking the fix made here https://github.com/odoo/odoo/commit/c43acc34b873dc70cf792675fe1d58d8b0e116b1 , we rely on the tax_exigible field of account move lines. When all the reconcile lines are exigible, it means we're not reconciling the transition line of a cash basis entry, and so we can directly full reconcile.
Fixes https://github.com/odoo/odoo/issues/58996
OPW 2350494
X-original-commit: b8ab3c78ff9354091f5154bb03a716c32a609de2
Issue
- Install "Point of Sale"
- Enable "Qr Code" in Invoicing
- Open new POS session
- Set random customer
- Try to send the invoice by email
Cause
The 'qr_code_urls' doesnt exist in the dictionary.
Solution
Add 'qr_code_urls' with all generated qr code urls to the dictionary in report.point_of_sale.report_invoice
EDIT:
use `_get_report_values` function of report.account.report_invoice instead of generate all qr code urls
opw-2357088
closesodoo/odoo#59847
X-original-commit: 4bc17f78f46ac2c9bc0bc97bc1a29b3da3f26563
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, the menu direction of header dropdowns was
related to the window width but it was wrong because of the right
panel. We also enable it in editor mode.
task-2312878
closesodoo/odoo#59846
X-original-commit: ced500e9bcbb5c84033463689d135ad4c7dc4f39
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
PURPOSE
We want to send the digest tips 2 hours after the database creation.
It can not be done directly on the digest itself because its field
is a date and not a datetime.
So we change the "Next Run Date" of the digest to now, and we run
the digest CRON 2 hours after its creation.
LINKS
Task 2351561
Internal odoo/internal/pull/1051
closesodoo/odoo#59844
X-original-commit: d2e3c03f89c6c62dc06e05f5fe06104205245e20
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Issue
- Install `Manufacture` and `Purchase`
- Go to `Manufacture`
- Enable Studio
- Create new rules
- Select `Purchase Order` model
- Try to select autocomplete proposition with `Deliver to` field
Traceback raised.
Cause
The _search function does not return indexable value.
Solution
Cast _search to a list.
PS: search can be used (instead of _search) to get iterable value.
opw-2357391
closesodoo/odoo#59832
X-original-commit: 8af2dbb06723213163ee3ad617e5c9309099b4bc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Steps to reproduce the bug:
- Enable Multi-Currencies and Multi-Companies
- Create a vendor bill
- Remove the default journal
- Set an other currencies
Bug:
A traceback was raised
opw:2350490
closesodoo/odoo#59546
X-original-commit: d9f8efcc330bc7454411aad3546de663424724f7
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
When a product is set on a line and we change product with the product
configurator wizard, we will use the attributes values of the previous
product.
But then since the attributes are the ones of wrong product, not
attribute is selected and if eg. we have radio button with one option
and custom value, it will never be selectable (because the radio button
is hidden and unselected).
In this commit, we do not use the current variant values when we change
product in the product configurator wizard.
note: this commit also increases the limit of (custom values) inside the
product configurator wizard, for an arbitrary 10000 limit. Without this
change, each opening of the wizard would only keep 40 customs values and
discard the other ones.
opw-2333091
closes#59016closesodoo/odoo#59803
X-original-commit: e9c54f6b3d5c36b658308e1900ab68dcc9de0357
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
While individual addons paths are normalised, module and resource
paths are not.
As a result, when symlinking modules into directories on the
addons path, the path of test modules is only half-normalized: it's
normalised up to the addon path (which likely did not need it in that
setup) but not above that.
This is an issue when using `--test-file`, because that path is fully
normalised, and so the path of the provided test file and that of the
corresponding test module will not match, leading to the tests
unexpectedly not getting run.
Normalize the test module's path before the comparison, using the same
routing used for --test-file.
closesodoo/odoo#59822
X-original-commit: 536809662e542994451be793cd09e87adbf31776
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Because the barcode app bypasses the detailed operations for receipts
(with default settings set), an error was being thrown when doing "put
in pack" when a carrier is set (saving during the delivery package
wizard) because the picking move lines are incorrectly selected. This
commit adds in a check for when the wizard is accessed via the barcode
app so that the error does not occur and the same behavior as when no
carrier is assigned is followed.
Related Enterprise PR: odoo/enterprise#9808closesodoo/odoo#59792
Task: 2039720
X-original-commit: 945b5f6791ae890498ef9a34828eaf91dc1457e2
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Before this commit
- If Google Calendar and Outlook Calendar are installed, there are two
'Calendar' tabs displayed on the user form view which is confusing
and they both share very similar fields.
- Also, in calendar the 'Sync with Google' and 'Sync with Microsoft'
buttons were not having the same size.
After Commit :
- Now only one 'Calendar tab is there which contains two groups, one
for 'Google Calendar' and one for 'Office 365 Calendar'.
- Top margin is added on 'Reset Account' button for both Google and
Microsoft groups for better UI.
- In calendar, 'Sync with Google' and 'Sync with Microsoft' buttons are
having the same size.
Note - The scss files are not much needed anymore and thus were removed.
Also to avoid a bridge module just for the sake of empty container,
we add it in calendar itself.
Task Id-2323205
PR #56551
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Current ordering is Access Rights - Oauth - Preferences. However we think
that preferences has an higher priority than Oauth. We therefore switch
both tabs so that Preferences is displayed before Oauth.
Task Id-2323205
PR #56551
Previously, editing a ribbon in the options panel had no preview inside
of the page until the change was validated. This commit fixes that issue
by making the real ribbon invisible, and making the ribbon dummy
visible. The preview still only affects the current ribbon being edited
until it is validated. Unvalidated changes are discarded when clicking
elsewhere in the page.
task-2339986
closesodoo/odoo#59806
X-original-commit: 922f3b67523e24204f15f38517c3dd207884ba66
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: portal
The dividers were removed with the new header templates but we still
needed them to know which items do not need to be folded in the
auto-hide menu. Instead of adding these dividers again, we added a new
class for these elements.
part-of: #59640
task-2312878
closesodoo/odoo#59804
X-original-commit: 59584974aa891b1182164adac3d3563d882bcfd7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, autohide menu was disabled in editor mode. This was
thus not really wysiwyg for users anymore.
part-of: #59640
task-2312878
X-original-commit: 969aa3dc11061254c52cf06f0b96d36192d61d40
Enable discounts on sales order lines
Create a service type product with invoicing based on timesheet and
task in sales order's project
Create so for 6 hours and deliver 8 hours.
Create 2 invoices: One for 6 hours with the regular price and 2 hours
h 100% discount.
Invoice status of the order will be Fully Invoiced
Go to Sales>Reporting>Sales Analysis report will show the untaxed amount
associated with 2nd invoice as still to invoice which is incorrect
This occur because when saving the invoice the untaxed amount is
calculated on the amount invoice after discount
opw-2338564
closesodoo/odoo#59638
X-original-commit: be5ec58d0a1a71fc84ca790555cac02a6be5b67a
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
In this commit, we restore the following behavior from v13: when search
resulted to a single product and 'Enter' key is pressed, the product is
added to the order and the search field is cleared. This works for both
manual keyboard input and barcode input.
closesodoo/odoo#59770
X-original-commit: 225e3898f25ddac061be99c43501c99d4bd3226b
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
The date depends on the user's locale, and needs to be consistent with
the `date` field.
closesodoo/odoo#59580
X-original-commit: ed06aab626cb51b86b4178705b45bbcbfbf2c0f2
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
TLDR: fix a mess in journal fields check
Steps:
* Create expense "paid by Company"
* Click Post
Before:
* AttributeError: 'account.journal' object has no attribute
'default_credit_account_id'
After:
* Either posted or shows user error about journal misconfiguration
Notes:
* Field ``default_credit_account_id`` is replaced in https://github.com/odoo/odoo/commit/41f119d5325dfbbf916d1d34e63946646ed4d44c
* The error is introduced during incorrect forward-port #58852
---
task-2355177
closesodoo/odoo#59780
X-original-commit: 5c0fca662279702115b5e61c8227f82086693e38
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Issue
To do on Community:
- Install website_sale (eCommerce)
- Go into Website app
- Navigate through Product/Products
- Edit 'Customizable Desk (CONFIG)' and add '&' and/or '<' and/or '>'
characters into the name
- Save
- Go to the Website app Dashboard and click on 'Go to Website'
- Click on 'Edit' button
- Drag and drop the 'Dynamic Product' snippet into the website
- Click on the block 'Your Dynamic Snippet wil be ...'
- In the right panel, in the 'Dynamic Product' snippet options,
chose a 'Template' and a 'Product Category'
A traceback is shown
Cause
the '&' character crashes lxml.etree.fromstring
Solution
ensure no '&' is sent to lxmx.etree.fromstring by using
odoo.tools.html_escape (in order to ensure no other problematic
characters are sent to the front) on the field values except when
not applicable (widget rendering with record_to_html should not be
escaped).
It is important to note here that this is applicable
to action servers that are used by the dynamic filter.
opw-2357027
closesodoo/odoo#59805
X-original-commit: f91422115c09be484f2868347566b6392ed0effd
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, the graph y scale in the survey manager screen was based on
the attendees count. But is some attendees do not answer the question, the bars
never reach the maximum height of the graph, and bars can stay really small.
Example: 10 attendees - 4 answers - A: 1 / B: 1 / C: 2
10 |
|
|
| |
0 |_|__|__|_
A B C
After this commit, the max height of the graph is not set on the graph. So the
chart lib will handle itself the height and will adapt automatically the bars
height in function of the data given to the graph. Bars will always take full
height space, relatively to the count of the most voted answer.
Example: 10 attendees - 4 answers - A: 1 / B: 1 / C: 2
2 | |
| |
| | | |
0 |_|__|__|_
A B C
Task ID: 2351455
closesodoo/odoo#59777
X-original-commit: ac64af033f0bbaa698aee424a5cab85fd9b967d2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Fix the design of he notification which is sometimes broken
(if there are lists or buttons display in it for example)
task-2346462
closesodoo/odoo#59776
X-original-commit: 238654ae53582d791154388c827f725c8d136612
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This patch speeds up the performance of method `onchange`. Our use-case
is an invoice with 300 lines, where we modify the unit price or quantity
on several lines. Each modification triggers a call to `onchange` on
the invoice itself. The latter call went from 1.3 to 0.8 seconds, which
represents a speedup of 30% to 40%.
In the implementation of `onchange`, the first snapshot is preceded by a
"prefetching" phase, where the lines of x2many fields are read, so that
the fields of unmodified lines are in cache. This is useful because the
fields of those lines are not sent by the client, which only sends ids.
This prefetching represents more than 40% of the duration of `onchange`,
in our use-case.
The prefetching is inefficient for several reasons. First, it uses
`mapped`, which formats data that is actually never used. Second, it
accesses new records that have the actual lines as origin. And on those
records, computed stored fields are not taken from the origin record,
but are (uselessly) computed instead.
We have optimized the prefetching in the following way. It now reads
stored fields on the actual lines (using `_read` to avoid formatting),
then copies the cache of those fields on the corresponding new lines (to
avoid useless computations). This makes the prefetching about 10 times
faster!
closesodoo/odoo#59781
X-original-commit: ec50c426d7c2a17c7b72e64adab65eda6328e163
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Previously, background-images were not properly optimized when inserted,
whereas they should be just like regular images. This commit fixes that.
It also changes the default quality (used for automatic optimization) to
75 as the difference is not usually very noticeable but can bring a big
decrease in image size.
task-2357332
closesodoo/odoo#59779
X-original-commit: 5d8c0aa0f7678f51e0a0931b0410a0273c7c7d1f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The response we get after updating data contains the new KYC status,
we then update it on the adyen account so that we don't have to wait
for the cron.
X-original-commit: 59fdb24527e6073cb3c4de5662d25d4d0cea08eb
with background-sizing option, user drags background image to adjust its
position using an overlay with the same content from snippet (cloned element).
Some CSS child selector rules will not be applied since the clone element has
a different container from the snippet content.
The CSS "background-attachment" property should be the same in
both parallax snippet & its copy, this will keep the preview more "wysiwyg"
instead of getting different result when bg position saved.
This can be improved by copying all style from snippet content and
override it with overlay related style (copying all css into overlay will
not work since it will change the style of its content too)
task-2327025
closesodoo/odoo#59775
X-original-commit: aaa3e63985789ea07464a5957eb18481e70a383f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit there would be crash on Removing `Unit` field from Sale order lines list view due to missing `product_uom`, Which is necessary for `QtyAtDateWidget` widget.
Now we hide the Widget if `product_uom` is not selected.
Fixes#59492closesodoo/odoo#59724
X-original-commit: ea798c07d31fd186af4bf851966f791a96cb13fd
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
- Prior to this commit, slide content of type document or presentation is
having src as '/slides/embed' and that controller tries to set slide as
viewed. Along with this, for few slide types (including document and
presentation) and for logged in user, it will try to set slide as completed
once slide rendering is done with help of method `_setCompleted`, without
waiting for the iframe to be loaded. This means, the controller called from
the src of iFrame and the above method both tries to update same 'slide_slide'
table at the same time, resulting into concurrency error.
- This commit fixes the issue by marking the slide as completed (with help
of method `_setCompleted`) only after the iFrame is loaded, avoiding the
concurrent updation of 'slide.slide' table.
TaskID 2265863
Closes https://github.com/odoo/odoo/pull/52918closesodoo/odoo#59391
X-original-commit: c5f406c8cbf43c56939cee054f9b911fe3933b3b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit allows user to edit other menus by clicking on them
the same way the global menu is edited.
task-2272226
closesodoo/odoo#55881
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The main purpose of this PR is to convert the GraphRenderer widget into an OWL component.
Along the main changes brought to the module "web", some other changes have been brought:
- the modules "board" and "stock" have been adapted accordingly;
- the function "utils.sortBy" has been given an extra optional parameter "order" (with value 'asc' or 'desc');
- a helper "owlCompatibilityExtraNextTick" has been added. It has the same effect as the "nextTick" helper but should
be used in a specific situation (see the corresponding documentation for more information).
Task ID: 2090967
closesodoo/odoo#54009
Related: odoo/enterprise#12710
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Florimond Husquinet <fhu@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Determines whether user should be warned of all problems and also causes some correctable problems to be fatal. Since we just want the widest compatibility when reading PDF, strict=False seems acceptable.
TASK ID: 2358822
closesodoo/odoo#59736
X-original-commit: 9fb637577e0c13778e253b4f1329f59459ab0824
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
- Create a new Project with 'Portal user and all employees' as
visibility;
- Add a portal user as customer;
- Create a new task in the Project, without assigning the task to
anybody;
- Connect to the portal as the portal user;
- Send a message on the task.
Before this commit, an Error 403 forbidden was raised, this error occurs
because the task don't have an access token created, this token will be
created when an internal user send a message on the task.
Now, the access token is created if the project has a 'Portal user and
all employees' visibility, and the portal user can post a message on
the task.
opw-2345070
closesodoo/odoo#59733
X-original-commit: 64e93794efb4193b3dfa7aa43360a1ef274e623d
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
When PO not saved, no mail can be send. Sending a reminder preview will
get traceback. In this commit, we check if the PO is saved before
sending the mail.
Also clean some useless code in the send_reminder_preview() and fix the
issue when no json object is return to the widget because of on mail
send.
Task 2339431
PR #57961closesodoo/odoo#59399
X-original-commit: 83f2cac4b8ba101d6a7736a8ff408a3fdb5422fe
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
As explained in issues-59664, the commit
f18bdc4fcf2b6b0bdb7699c3b2aa38d332301a84 add
readonly attribute in the `purchase.order.line` state field
to avoid to save bad `state` in the server (then the state of the
PO line != PO line).
But it breaks the feature to add product
when the PO is already confirm (the state will be 'purchase' and the
`product_id` is readonly when state == 'purchase').
To fix both issues, add a `default_state` in the context.
It will "bypass" the attrs of `product_id` and the state of PO
('draft') line won't be save because it is readonly.
resolve#59664closesodoo/odoo#59729
X-original-commit: 74780e95a2a3db9d9875aea7e644bf064ecf6b46
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
When a user sends a plaintext email to a mail-enabled channel, the
rendering of this message in Discuss have present a horizontal scroll
when the text contains long sentences.
This commit fixes it by enabling wrapping of the line's word to fit its
container size and prevent horizontal scrolling.
Note: the required CSS rules were already present since odoo/odoo@0e7e18ff71
but a wrapper element (with the class `.o_thread_message_content`) was
introduced in odoo/odoo@4685e4bc7f and
merged between the testing of the fix above and its actual merging in the
Odoo codebase, making it ineffective. We only have to properly re-enable
it.
opw-2341485
Related task ID: 34931
closesodoo/odoo#59719
X-original-commit: 5e66ca8d2c970eed999782bdd59e9082f3967833
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Starting this commit: 8f57863707
regular pos User now don't have a read access to ir.property model.
Because of this, if a user opens a session, he won't be able to close
it. We sudo the search to stock.move (because the query parameters
requires reading from ir.property) to make sure that closing a session
will succeed.
closesodoo/odoo#59712
X-original-commit: 5e2763fdc94b63eee637f9679f8ea3a07beb74ce
Related: odoo/enterprise#13981
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>