Commit Graph
164380 Commits
Author SHA1 Message Date
momegahed fb00c98a72 [FIX] product: product name overflow is hidden
Steps to reproduce:

1 - activate "Print GS1 Barcodes for Lots & Serial Numbers"
2 - create a product P tracked by lot
3 - print the "Lot/Serial Number (PDF)" from the stock.lot form/list
view

Bug:
contrary to previous versions, the current template doesn't allow the
field to overflow into multiple lines

Fix:
change the css class `o_label_4x12` as it is only used in usecases
where overflow show be allowed

OPW-3336476

closes odoo/odoo#124557

X-original-commit: a5924bfe11cd9324e2ba056e0ac1d449aed730c8
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2023-06-13 11:27:54 +02:00
Ali Alfie (alal) 545ef195f2 [FIX] account dashboard graph data
closes odoo/odoo#124457

Before: in the accounting journal dashboard, for bank and cash graph data the date comparison was done with a date object and a formatted date object resulting in them never being equal and duplicating data.
Now: both dates are formatted in the same way
X-original-commit: 0e2594c88dadb91acb1470dbc55b8ab37f6166c1
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-06-13 11:27:48 +02:00
Ali Alfie (alal) 1794b2386c [FIX] account dashboard sample data
Before: in the accounting dashboard, the graph key was confusing for sample data in cash and bank journals

Now: if sample data is shown, the graph key is displayed as "Sample data"

Task-ID #327726333

X-original-commit: 7108277090fb7c7db788dfcc983ff021654c0876
Part-of: odoo/odoo#124457
2023-06-13 11:27:47 +02:00
Fabrice Henrion 3adf466c55 [IMP] sale: string consistency
closes odoo/odoo#124774

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-13 10:14:18 +02:00
Alexandre Kühn 8f38b5130c [FIX] bus, mail: message notif should not increment counter twice
Before this commit, a new unread message could contribute to unread
counter of conversation twice.

Steps to reproduce:

1. Log in as Demo and start a conversation with Mitchell Admin
2. Log in as Admin: if this is the first message in the conversation,
   counter is correct and shows (1)
3. Log out as Admin
4. Send another message to Admin
5. Log in as Admin and notice that the counter is doubled
6. If the conversation was still open, counter is correct!

This happens because some notification are pending dispatch before
fetching messaging state initially. The counter at init_messaging
fetch takes into account the notification. However, when handling
the message notifcation, it's wrongly considered as a new
notification, thus incrementing the counter when it shouldn't.

This commit fixes the issue by fetching the last bus notification
when fetching init_messaging. Doing so allow to determine whether
a notification is newer or older than init_messaging state.
This helps deciding whether the counter should be incremented or not.

Task-3357960

closes odoo/odoo#124767

X-original-commit: 081ab772dece86f1b5a5d4b3f6227b4b311d9206
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-06-13 10:14:06 +02:00
Alvaro Fuentes 30fd0071a2 [FIX] account: use more efficient method
Check accounting entries in a more effective way.

closes odoo/odoo#124755

X-original-commit: 316c1d9745af33d85bd94747b3d913d9c9db2342
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Alvaro Fuentes Suarez (afu) <afu@odoo.com>
2023-06-13 10:13:58 +02:00
Alvaro Fuentes 8bcca1a267 [FIX] account: do not change company's currency on CoA load
If the company already has some accounting entries we shouldn't override
its currency. This is useful to avoids errors related to existing
journal items for the current company's currency.

Issue observed during upgrades for MX localization.

X-original-commit: 752a20596cf132d1641abed7eacb5d53a695869a
Part-of: odoo/odoo#124755
2023-06-13 10:13:57 +02:00
tsm-odoo 6dae07e56d [FIX] mail: fix emoji picker xml
Before this commit, a `t` opening and closing tag mismatched.
This would lead to an error when exporting the discuss app
translations.

```
Traceback (most recent call last):
  File "/home/odoo/Desktop/odoo/odoo/odoo/tools/translate.py", line 1152, in _babel_extract_terms
    for extracted in extract.extract(extract_method, src_file, keywords=extract_keywords, options=options):
  File "/home/odoo/.local/lib/python3.8/site-packages/babel/messages/extract.py", line 322, in extract
    results = func(fileobj, keywords.keys(), comment_tags,
  File "/home/odoo/Desktop/odoo/odoo/odoo/tools/translate.py", line 905, in babel_extract_qweb
    tree = etree.parse(fileobj)
  File "src/lxml/etree.pyx", line 3521, in lxml.etree.parse
  File "src/lxml/parser.pxi", line 1880, in lxml.etree._parseDocument
  File "src/lxml/parser.pxi", line 1900, in lxml.etree._parseFilelikeDocument
  File "src/lxml/parser.pxi", line 1795, in lxml.etree._parseDocFromFilelike
  File "src/lxml/parser.pxi", line 1201, in lxml.etree._BaseParser._parseDocFromFilelike
  File "src/lxml/parser.pxi", line 615, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError
  File "/home/odoo/Desktop/odoo/odoo/addons/mail/static/src/emoji_picker/emoji_picker.xml", line 60
lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: t line 10 and div, line 60, column 15

```

closes odoo/odoo#124751

X-original-commit: eb59c0157cbe2d5d82356333b0e35a5f9513524d
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-06-13 10:13:51 +02:00
Alexandre Kühn cd803877ce [FIX] portal: no crash on adding file in chatter portal
In follow-up https://github.com/odoo/odoo/pull/120437

PR above replaces `underscore.js` `map` by native `.map()`.
The `map` of `underscore.js` accepts anything, even
mapping on `FileList`. However, native `map` needs to
apply on an array.

This commit fixes the issue by ensuring `.map()` is applied
on an array.

Task-3366632

closes odoo/odoo#124750

X-original-commit: fec9cc476134dcdde007ce6fb0c0bee63e38cca1
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-06-13 10:13:46 +02:00
Xavier Morel 074a91a300 [FIX] test_mail: mutlicompany systray test
odoo/odoo#122354 added this test but didn't handle that other models
might trigger systray activities.

On June 12th, the test started failing because calendar has a "Pricing
Discussion" demo calendar event on the 12th of every month. It
probably would have also failed on the 3rd and 22nd which both have
demo meetings for the admin.

Fix by looking up specifically activities of the test model we're
concerned with.

closes odoo/odoo#124684

X-original-commit: 54dce61ef8fa97e18f0cf53d1f098af55e1210e9
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-06-13 10:13:34 +02:00
Rahul Prajapati 54b1cb8bb9 [FIX] base: validation for studio fields compute dependencies
Before this commit:

`id` cannot be set as the dependency for a field's compute method.
So, when a user configures `id` as a dependency for a studio field's compute,
there is no error shown to the user and
the field is saved with `id` as a dependency.

After this commit:

It will throw a `UserError` to the user.

sentry-3979435039

closes odoo/odoo#124660

X-original-commit: 9eab433e09aafafd3015f731b9ec449965d97748
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-06-13 10:13:29 +02:00
Lucas Perais c77fd9285e [FIX] web: CodeEditor: restore scrollability
Before this commit, the CodeEditor made Ace display infinity lines in height.
This prevented Ace to be scrollable in some contexts.
Specifically, when Ace was in a flex context, the scroll did not work.

After this commit, the CodeEditor takes an optional maxLines props to pass to Ace.
If not set, Ace will just adapt the number of lines to the size it gets.

closes odoo/odoo#124656

X-original-commit: eb81a4c857a249e4cd2f28b455d87b64a8e93c9a
Related: odoo/enterprise#42367
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-06-13 10:13:22 +02:00
Eteil Djoumatchoua(etdj) 956db5fc0b [FIX] website_sale: disable wraping on product category label
Steps to reproduce:
- Activate Product category on /shop page to show on the left side
- Activate collapsible category
- Add or modify a Category to have a name with multiple words seperated by space

Issue:
The label of the category in eshop always returns to the line at the last word

opw-3321404

closes odoo/odoo#124765

X-original-commit: 8ac659c9bd86142085491609fea65572c3305dd6
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Djoumatchoua Eteil Junior (etdj) <etdj@odoo.com>
2023-06-13 08:44:30 +02:00
Guillaume (gdi) 864d008ac7 [FIX] website_forum: enlarge answer textarea
This commit permits to enlarge the answer textarea in the forum.

Steps to reproduce the "issue" resolved by this commit:
- Go to /forum
- Click on a thread
- Click on "Answer"

=> The textarea is too small to write a long answer.

task-2865782

closes odoo/odoo#124740

X-original-commit: faaf76c0043d72da7cec587c327d6b508b2ca0fd
Signed-off-by: Dieleman Guillaume (gdi) <gdi@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-13 08:44:19 +02:00
Guillaume (gdi) 7332998e89 [FIX] website_forum: permit to post an image without text
In the website forum, we checked that the post content is not empty
before posting a post or an answer. Before this commit, it was just a
verification that the content is not an empty string.
Users are also able to post an image and we want to allow them to create
a post or an answer with only an image. This commit changes the
verification to check if the content is empty or if it only contains
images.

Steps to reproduce the issue resolved by this commit:
- Go to the website forum
- Create a new post
- Set a title
- Add an image as description
- Click on "Post Your Question"

=> The post is not created because the content is considered as empty.

task-2865782

X-original-commit: 048c6b779423ff34dd80f51e2a9202e16553a3ae
Part-of: odoo/odoo#124740
2023-06-13 08:44:18 +02:00
Preksha Chouhan c9babef3c8 [FIX] account: prevent traceback while no payment method is selected
When we create a journal and it gets one of the payment method's value as
False and we input another payment method. it will give an error with the
 message -

'sequence item 0: expected str instance, bool found'

Steps to Produce:-

1. Go to Accounting then configuration
2. Click on 'Journals' under Accounting
3. Create or click on exiting one
4. Input all required fields and select 'Type' as Cash or Bank
5. Delete value of one of either incoming payments or outgoing payments
6. Click on save
7. Remove name of one of the payment method and input other

Trace-back will be generated.

Applying these changes will resolve this issue.

closes odoo/odoo#124739

X-original-commit: 1e242de53a5bbb2e1eed50504be0649775b9db47
Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-13 08:44:11 +02:00
hupo-odoo ee6e560415 [IMP] account: cash rounding strategy differentiation
Improves the cash rounding visualization in the account move view. At the bottom right of the view, a widget displays the detail of taxes and the possible rounding must also be included in this display. In all cases, whatever the cash rounding strategy, whatever the (withholding) taxes applied if any, the invoice/bill total must equal the total of the account receivable/payable respectively. This commit makes the 'Total' line always the total amount of the account move. There is no longer a 'Total Rounded' that is displayed when using cash rounding. Instead, a rounding line is added only when the cash rounding strategy is set to 'add invoice line', which is clearer for the user.

Two cash rounding strategies exist in Odoo. The new correct way to display data is the following:
When using 'add_invoice_line':
    - a rounding line is displayed on the widget
When using 'biggest_tax':
    - the biggest tax (the tax with the highest tax amount) is incremented with the rounding amount

task-3333052

closes odoo/odoo#124632

X-original-commit: ae1b1f62a53b03278ef5aec583fc75b6eb7950c4
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: hupo-odoo <hupo@odoo.com>
2023-06-13 08:44:03 +02:00
Nicolas Bayet ac9c294021 [FIX] web_editor: retrieve initialHistoryId properly
Before this commit, if in the database there is a document with
`data-last-history-steps` that contains a chain of history rather
then the last id, the wysiwyg will not properly retrieve the last id.
Subsequent call to _ensureCommonHistory will result in a conflict even
when there is no conflict.

task-3366800

closes odoo/odoo#124770

X-original-commit: 3cf0f5a0527d09cc3e6664c5734711ef923c0619
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-13 07:39:06 +02:00
Saurabh Mishra 46f46b6072 [FIX] survey: prevent question deletion when session in progress
If we create a survey and  start a new session. When the session state is in
progress and If the survey creater deletes a question and participant tries to
answer the deleted question and submits it then participant will face the issue
of 'False is not in list'.

This commit will raise an usererror if the survey creater tries to delete the
question when the survey session is in progress.

sentry-4113791861

closes odoo/odoo#124769

X-original-commit: f636025fce4edda8a5f89b7161c4e9481460f03f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Saurabh Mishra (sami) <sami@odoo.com>
2023-06-13 07:39:01 +02:00
Robin Lejeune (role) 1954ef8de9 [FIX] website: display TourPointer on configurator screen
Since [1] where the CSS / classes of the TourPointer was completely
redone, the pointer doesn't show up anymore in the default tip on the
configurator waiting screen.
This commit redisplays it as it appeared before.

Since [2], the classes `o_theme_install_loader` and derivatives have
been replaced. The commit thus also removes the file
`website.theme_install.scss` which is not needed anymore.

task-3358028

[1]: https://github.com/odoo/odoo/commit/3a79803
[2]: https://github.com/odoo/odoo/commit/1ff7f1e

closes odoo/odoo#124634

X-original-commit: 1569edb57e2e5adb242945557d9a64fac46fda96
Signed-off-by: Dieleman Guillaume (gdi) <gdi@odoo.com>
2023-06-12 22:39:44 +02:00
Renilkumar Kajavadra 2b110f7fde [FIX] account_edi: prevent typeerror when object is None
If applied, this commit will solve the  'NoneType' object is not iterable when
in _get_mail_attachment_from_doc function returns None.

Steps to reproduce the issue:
- Install Accounting and l10n_in_edi.
- Go to accounting -> Configuration -> Journals -> Customer Invoices
  -> Advanced Settings -> Enable Electronic invoicing
- Switch company to IN Company
- Go to Account -> New invoice -> Add required fields -> Confirm -> Send & Print

sentry-4215675843

closes odoo/odoo#124346

X-original-commit: 84bcdcf6042a7d938803c95a6e0fe06f6e22aef9
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-12 22:39:38 +02:00
Martin Trigaux 604a47ead8 [IMP] *: remove global ACL
THese are rarely intended for all users but often intended only for
employees.

account:
account.incoterms: only used within internal business models
account.journal.group: same as account.journal, add sudo in computed field

account_edi: need access to accounting objects

base_address_extended:
res.city: only employees should access address data

board: only employees uses this (old) module

crm:
crm.stage: internal users business object

hr_recruitment: employees can read

im_livechat: apply same as for the steps

l10n_ar: used on partner, not only invoices
l10n_ec: accessed only through account.move
l10n_latam: accessed on res.partner

mail:
publisher.warrenty.contract: no data, only static models
mail.channel: group_user has already his own rule
mail.group: group_user has already his own rule
mail.message.subtype: group_user has already his own rule
mail.message.all: remove, already has a portal and employee rule

partner_autocomplete: no interaction with public

project:
project.tags: only needed for project sharing

sale_management:
sale.order.option: same as sale.order

utm: employee already has write access

web_editor: test models that have nothing to do here
web_tour: only employees uses tours

website_sale:
product.ribbon: add sudo for access

base:
ir.default: only employees uses set (could probably be converted to group_system)
ir.ui.view.custom: same as ir.ui.view, add sudo when needed
report.*: portal users don't configure reports
res.users.log: create in sudo, no access needed (adapt test to use another model)
res.lang: still needed for public

closes odoo/odoo#118701

Related: odoo/enterprise#41285
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-12 22:39:26 +02:00
Martin Trigaux 53ca9840d8 [IMP] base: remove read on ir.default
And make get private

Part-of: odoo/odoo#118701
2023-06-12 22:39:25 +02:00
Eteil Djoumatchoua(etdj) 290e66de1d [FIX] stock: Enable the creation of a transfer from a duplicated operation type
Steps:
1- Duplicate inventory operation - Delivery Order
2- Process new order with duplicate
3- Add products and try to save

Issue:
Traceback

Cause:
The ORM tries to insert a new record of stock.picking but triggers a constraint on unique(name, company_id). When creating a new transfer the name is computed from the sequence of the stock.picking.type but here when we duplicate a stock.picking.type it creates a new sequence which starts with id 1, if the there is already a transfer with uses it the constraints will be triggered. We just have to make the stock.picking.type which are duplicated use the same sequence

Solution:
Enable the copy of the sequence_id so that two ``stock.picking`` from duplicated operation types will never collide on their name.

opw-3331835

closes odoo/odoo#124666

X-original-commit: 52219871e8d8357044763375f6f5318622e9894e
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-06-12 19:46:28 +02:00
Denis Ledoux 67e37aeda6 [FIX] base_import_module: restore module icon
The revision dd3f918cafebe26e5aa9dff1b2e484b7ed662140
introduced a regression:
it was no longer possible to set an icon in the import module,
and if no icon is provided,
the icon should fall back to the base module icon,
which wasn't the case either.

In this last case, it even leaded to a crash:
```
File "/home/odoo/src/14.0/odoo/odoo/addons/base/models/ir_module.py", line 251, in _get_icon_image
    with tools.file_open(path, 'rb') as image_file:
  File "/home/odoo/src/14.0/odoo/odoo/tools/misc.py", line 176, in file_open
    return _fileopen(name, mode=mode, basedir=base, pathinfo=pathinfo, basename=basename, filter_ext=filter_ext)
  File "/home/odoo/src/14.0/odoo/odoo/tools/misc.py", line 211, in _fileopen
    raise ValueError("Unknown path: %s" % name)
Exception
ValueError: Unknown path: /base/static/description/icon.png
```

opw-3340652

closes odoo/odoo#124661

X-original-commit: 12ccfcf8d2ee936ec066de81c2dce2dd17348cb6
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2023-06-12 19:46:23 +02:00
Luis Torres 365017a950 [IMP] l10n_pe: Welcome PLE reports
Complement module to allow generate the PLE reports.

- Missing purchase tax groups and taxes added to complete the vendor
  bills flow
- Demo data completed to has data to allow generate the PLE reports
- Document types for vendor bills completed in the data
- Method to improve the domain in document types for customer invoices
  added
- Extend method to autocomplete the number on vendor bills with the
  standard expected by the document type.

closes odoo/odoo#124595

X-original-commit: 821d313a5de857a4903bb35aaea49c3a35f8781e
Related: odoo/enterprise#42345
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-06-12 17:41:22 +02:00
Sébastien Theys 6021b68b17 [REF] mail, im_livechat: move author open chat to discuss folder
Part of task-3265211

closes odoo/odoo#124495

Related: odoo/enterprise#42264
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-12 17:41:14 +02:00
Sébastien Theys 0a3ae9e9a4 [REF] mail: remove obsolete class o_redirect
Part-of: odoo/odoo#124495
2023-06-12 17:41:14 +02:00
Sébastien Theys 3ba40f468d [REF] mail: remove obsolete test tracking setup
Part of task-3265211

Part-of: odoo/odoo#124495
2023-06-12 17:41:13 +02:00
Sébastien Theys 16329a6a3e [REF] mail, im_livechat: remove obsolete context service
inPublicPage is already written from public page boot

Part of task-3265211

Part-of: odoo/odoo#124495
2023-06-12 17:41:12 +02:00
Sébastien Theys d0dbd25701 [REF] mail: move activity cell from core to views
Part of task-3265211

Part-of: odoo/odoo#124495
2023-06-12 17:41:11 +02:00
Sébastien Theys c38e1bfee9 [REF] mail: move public page to discuss folder
Part of task-3265211

Part-of: odoo/odoo#124495
2023-06-12 17:41:10 +02:00
Valeriya(vchu) bce4aededc [IMP] (pos_,sale_)loyalty: improve validity period
currently it is only possible to define the end_date that
does not allow to prepare the program in advance.
Added the start_date property to the program model.
task-3305712

closes odoo/odoo#121193

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-12 17:40:58 +02:00
Victor Piryns (pivi)andFeyensv 500c7ab056 [FIX] website_sale: correct base_price in shop with tax included
Current behaviour:
If you have a product with tax included, and you make a discount via
a pricelist, the `base_price` of the product in the /shop page is not
correct. (it's not the same as the one on the product page, which is
correct)

Expected behaviour:
The base price in the /shop page and on the product page should be
the same in general. Should the price with tax included before the
discount.

Steps to reproduce:
- Install eCommerce, Sales
- Settings > Display Product Prices > Tax Included
- Settings > Pricelists > Advanced price rules
- Check Settings > Comparison Price
- Create a tax of 21%
- Create a product, set it's Sale's Price to $61.98, with the tax
  (tax incl = $75)
- Create a pricelist that apply to the product, give it a discount
  of 20%, and apply the discount policy "Show public price &
  discount to the customer".
- Go to the /shop page and search for your product, observe the
  `base_price` of the product is not correct.
(refer to video in ticket for a walkthrough)

Reason for the problem:
Lack of adaptation of a fw-port in commit:
30ad33de9c320f19258974a8eb77df26480d653c

Fix:
Correct the fw-port and aggregate the conditions when applying taxes
on the base price.

Affected versions:
- saas-16.1
- saas-16.2
- saas-16.3
- master

opw-3194646

closes odoo/odoo#124649

X-original-commit: a4500d1535bbf5cff7014a29971fb2e7637e2acc
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
Co-authored-by: Feyensv <vfe@odoo.com>
2023-06-12 15:27:04 +02:00
Julien MougenotandJorge Pinna Puissant 1e959827b2 [FIX] web: Fallback to latin numbers when parsing dates
Before this commit, when inputting latin numbers (i.e. 0-9) with a
locale using a numbering system different than "latn" (e.g. "arab"),
the parsing failed resulting in an error.

The issue is that these locales often support both their numbering
system as well as the "latn" one. This commit makes the parsing fall
back to the "latn" system in case latin numbers are found in the input.

OPW-3316325

closes odoo/odoo#124635

X-original-commit: 12970754fc915eb181e040d3e45fc566fe310167
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2023-06-12 15:27:00 +02:00
Adrien Minne (adrm) 2ef25b8372 [FIX] spreadsheet: download excel with filtered values
Open a spreadsheet, add a data filter, filter some values,
File > Download
=> the filtered values are not exported.

Previously, we gave the exported data to the action_download_spreadsheet
action, and we created a new model based on the data. This was a problem
for data that was only exported for the xlsx in UI plugins, because this
wasn't in the exported data.

Fixed by giving the xlsx data to the action_download_spreadsheet action instead
of the data.

Odoo task 3231170

closes odoo/odoo#124617

X-original-commit: 8a7e2ecf60993c6862c8980b70e847c0e5aa2a50
Related: odoo/enterprise#42355
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Minne Adrien (adrm) <adrm@odoo.com>
2023-06-12 15:26:50 +02:00
Daniel BlancoandJosé Moreno Hanshing 9d4710a823 [FIX] l10n_cl: enable purchase invoice for foreign vendors
Description of the issue/feature this PR addresses:
Before SII resolution 46 from 2022, the only documents for foreign vendors were 110 111, and 112.
After that, SII and accountants are indicated as a practice to issue purchase invoices (Factura
de compra 46) to foreign vendors in order to pay the vat taxes, mainly for digital services.

Current behavior before PR:
It is not allowed by validation restrictions to issue this document type to foreign vendors

Desired behavior after PR is merged:
the validation release the restriction for document type 46

closes odoo/odoo#124392

X-original-commit: ee2485fd4c4e0f1ababbc74a0e1f349d58380cff
Signed-off-by: Josse Colpaert <jco@odoo.com>
Co-authored-by: Daniel Blanco <daniel@blancomartin.cl>
Co-authored-by: José Moreno Hanshing <jose@blancomartin.cl>
2023-06-12 15:26:46 +02:00
Jurgen (jugj) d782a42483 [FIX] web, hr(_recruitment) : Fix the phone field widget text breaking in multiple lines This PR Fixes the phone widget in the hr views and adds back the possibility to SMS to mobile and phone task - 3242157
closes odoo/odoo#124626

X-original-commit: f6964d7cab3090acdd9a3b777ef17f02b0d2ac02
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-12 14:04:23 +02:00
Didier (did) 4cda4fab1f [FIX] mail: remove hard coded text-danger
closes odoo/odoo#124619

X-original-commit: 1c1b1e92c86e1ea7c81384e66b2549d77d3b37f2
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-12 14:04:19 +02:00
Alexandre Kühn aea5e51c42 [FIX] mail: long logged note in chatter should word break
Otherwise it makes whole chatter overflow on the right.

closes odoo/odoo#124618

X-original-commit: 61f47dfe74fa65fa55aa68c4a9676362511dc478
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-12 14:04:15 +02:00
Ivan Rasputin 1040be1010 [FIX] website_sale_loyalty: fix dictionary updating
After recent refactoring [1], sentry caught [2] `KeyError` on adding a record to
`res[coupon]` in `_get_claimable_and_showable_rewards` method.

Dictionary `res` may not have `coupon` and hence it leads to the error

https://github.com/odoo/odoo/blob/31b8151736b3382cca5601cd652b1d5482790af9/addons/website_sale_loyalty/models/sale_order.py#L198-L205

https://github.com/odoo/odoo/blob/31b8151736b3382cca5601cd652b1d5482790af9/addons/sale_loyalty/models/sale_order.py#L595

Fix it by checking `coupon in res` first.

[1]: https://github.com/odoo/odoo/commit/6525d5fba40c77ef9ed4445b8b9573550a1e2442

[2]: https://online.sentry.io/issues/4235487414

closes odoo/odoo#124616

X-original-commit: 57a00cae57116869f33e7267ad5ee84bd7600593
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-06-12 14:04:10 +02:00
tsm-odoo 5c12a8b82e [FIX] mail: load after message order
In [1] the order by `id ASC` has been removed from the
`_message_fetch` method. This is wrong since we want
to load the messages coming DIRECTLY after the given
id thus, this order is required.

In order to solve this issue, this commit ensures the
order of the messages returned by the `_message_fetch`
method is always in descending order as it was done
implicitly before [2].

[1]: https://github.com/odoo/odoo/pull/123664
[2]: https://github.com/odoo/odoo/pull/116666

task-3349175

closes odoo/odoo#124169

X-original-commit: 074a5fea5a7f08c7018620cb9b2b956b3a871344
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-06-12 14:03:53 +02:00
Valeriya(vchu) a29971df55 [FIX] payment_adyen: prevent override of the server error by the generic one
Before this commit the generic message error was shown in the payment form
instead of the server error message that did not allow the users to
understand the problem that caused it.

After this commit the server error is shown in the payment form.

closes odoo/odoo#124040

X-original-commit: dc1230648415dbeeb672c6fb9168472ac8c7d651
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Valeriya Chuprina (vchu) <vchu@odoo.com>
2023-06-12 14:03:48 +02:00
Valeriya(vchu) 0a5ee69c51 [FIX] payment_adyen: set error when offline transaction failed
When the offline transaction failed, the error was raised that rollback
all the operations and the failed transaction was not traced anywhere.

With this commit the error is caught and the failed transaction can be
seen in chatter.

X-original-commit: 21e84624841690d36bd38b768e35cc61b3c6a17b
Part-of: odoo/odoo#124040
2023-06-12 14:03:47 +02:00
Nicolas Viseur (vin) 12473cb0c0 [IMP] l10n_au: The opening statement should be dated to the 30th of june
Since the fiscal-year end this day.

Task id #3338971

closes odoo/odoo#124607

X-original-commit: c2640430874771d7db9cd587e7a9a04a01f7ae42
Related: odoo/enterprise#42349
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-06-12 12:41:52 +02:00
Demesmaeker 39a7cdca21 [FIX] product: price computation based on cost
- Standard price (cost price) is there for variants and for product template when there are no
variant, as it has no sense the have one otherwise. Templates with variantS have a cost of 0.
- On the website, product shown are the product templates, but you select and then buy the product
product (variants).
- The pricelist can be set to make a discount based on the cost.

==> If such a pricelist is used, the product templates having more than 1 variant are shown with a
price of 0 until you can select the wanted variant

opw-3232621

closes odoo/odoo#124594

X-original-commit: 561eba8f2adece4c21ea46c1bd050779ea3dc676
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-06-12 12:41:45 +02:00
Romain Derie 9addf96178 [FIX] website: make megamenu thumbnails template translate mode friendly
Without this commit, the words in this template (below the images) won't
be colored as translated (green) / not translated (yellow).

This is because there is a block element inside an inline element and
the color is applied on the inline element which has no impact on
children blocks since inline elements don't take up available space.

See https://stackoverflow.com/a/7439861
Note that:
- `display: inline-block` is not an option either as it would be messing
  with the `t-field` which receive this `data-oe-translation-state`
  property too. Applying the `inline-block` style on those will break
  the layout, typically on a product page.
- same for `display: contents`, it's not working as such elements don't
  generate any box, properties like border / bg color etc are thus
  ignored.

opw-3305117

closes odoo/odoo#124560

X-original-commit: ed89b0ffd7f4d6a04f71f474720ff4d82c9ecf9a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-06-12 12:41:40 +02:00
Om Rabara c3340c37e9 [FIX] website: prevent typeerror when 'url_from' field is empty
TypeError: expected string or bytes-like object

This error occurs when the 'url_from' field is left empty during website rewrite
To reproduce this issue, follow these steps:
1. go to website ->  configuration -> redirects
2. create a new record -> select 308 redirect / rewrite in action
3.  keep 'url from' empty and put any value in 'url to' such as '/'
4.  Click on the save button, and this error message will be displayed.

After applying this commit will fix this issue.

task-3346588

sentry-4229658026

closes odoo/odoo#124558

X-original-commit: 26fa923f6ab01298bf1a1e9f6a615c9aa9e2e5ed
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-06-12 12:41:36 +02:00
Demesmaeker 9a14037d50 [FIX] test_sale_product_configurators: use saveForm
Currently, discardForm has some indeterministic problems during the nightly runs.
To avoid this and until the problem is solved, these tours now use the saveForm instead.

closes odoo/odoo#124544

X-original-commit: 29d6ba2716fe0067903f1b5ee480e2e03757e0f7
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-06-12 12:41:23 +02:00
Andrea Grazioso (agr-odoo) 4caddf1787 [FIX] hr_expense: due date conflict with payment terms
Have an employee with payment terms set in the contact form
Create an expense for $100 for the employee
Create the expense report > Submit to manager > Approve > Post journal
entries

Issue: The bill due date is manually set to the Accounting Date.
This is not consistent with the Payment terms applied on the
bill

opw-3298981

closes odoo/odoo#124542

X-original-commit: d363aa12429768e63d0f9def7006101983fd0adc
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-12 12:41:19 +02:00