Commit Graph
162102 Commits
Author SHA1 Message Date
Guillaume (gdi) 9177076cae [IMP] iap, website: add IAP languages test
This commit adds a test to check that the IAP languages work as
expected for the website configurator. The test checks that the
industries are translated (different than other languages).

task-3343616

closes odoo/odoo#123722

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-06-13 18:20:52 +02:00
Bastien (bvdn) 1a44b84997 [IMP] project: improve various mark as done features
New features developed in this PR:

- Write Javascript tests for the project.task.state widget
  - Tests are in the project_task_state_selection.js
- rewrite Research & Development demo data
- Created a digest tip for task state selection (in Settings > technical > digest tips)
  - Tip: Use task state to keep track of the task progression
- Fix Sharingview (Readonly) icons for the project.task.state widget, previously only the color bubble were displayed in readonly sharing views, now all of the icons are displayed
- Display state in the Calendar view
  - Display the same widget as in the kanban/list views
- Remove is_closed References
- Adapt Kanban stages Exemples
  - Kanban exemples are available when creating a new stage in kanban view
- improve Progressbar colors (different color for approved/done, in_progress/waiting)

Task-3213526

closes odoo/odoo#117968

Related: odoo/enterprise#39714
Related: odoo/upgrade#4548
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-13 18:20:44 +02:00
yhu-odoo fc61ea4acb [FIX] stock_account: valuation layer is zero when return dropshipping
To reproduce:
1. Create a Sales Order for a product whose product category is set to
   FIFO and automated. Use route "dropship".
2. Confirm the PO created.
3. Deliver the products (DS transfer)
4. Create the customer invoice
5. Return, for example, 1 unit of product
6. Add a credit note to the invoice for that 1 unit returned (reset to
   draft then change qty and post)
Issues:
The value on the valuation layers of the returned picking is 0, posted
entries for COGS and stock interim (delivered) account for credit note
is also 0.

Since #85751, When create valuation layer for return, we take all svls
of origin_returned_move_id into account to calculate the price unit.
However, then dropshiping, 2 svls are created for the original move, and
the sum of them is 0 since there is no impact of the stock when
dropshiping. So when return, the price unit will be calculated as 0.

To fix, when calculate price unit for return of dropshiping, we only
take non-negative svls into account. Note that we use non-negative ones
instead of positive ones because when subcontract dropshiping,
additional negative svls will be added for the cost of the components.

opw-3283436

closes odoo/odoo#124856

X-original-commit: 1c6c163f72301cab29c2f26021bb1ae6fb20dc7f
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
2023-06-13 16:58:51 +02:00
Karnav Sojitra b6deb79b81 [FIX] account: prevent keyerror by adding default value to tax_dest_id
This issue occurs when the value of tax_dest_id key is missing at the time of
getting fiscal localization data for  a respective package.

This commit will solve the issue by adding a get method with the default value
of an empty string to get the value of tax_dest_id key, if it does not exist.

sentry-4128326643

closes odoo/odoo#124855

X-original-commit: 4cf435e9aa3564bc1e12b38ce18a30885776c2f4
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-13 16:58:44 +02:00
Julien Carion (juca) 8c62c5e354 [IMP] web: add isEmpty to ImageField
This commit adds the isEmpty field descriptor to the image field.
This is linked to the changes made in enterprise:
https://github.com/odoo/enterprise/pull/40885

Task ID: 3259489

closes odoo/odoo#124668

Related: odoo/enterprise#40885
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-06-13 15:31:51 +02:00
MerlinGuillaume 23c43bd5cc [FIX] web: render reference fields as integer in pivot view
The value of the `order_reference` field introduced in [this PR] cannot
be displayed in pivot views
[this PR]:https://github.com/odoo/odoo/pull/116830

Solution:
Render `reference` fields like `many2one`

closes odoo/odoo#116830

Related: odoo/upgrade#4751
Related: odoo/enterprise#38895
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-13 14:07:28 +02:00
MerlinGuillaume 7bbec42f07 [IMP] pos,website(_sale): link sale.report to pos.order
It's currently not possible to know which `pos.order` is linked to a
`sale.report`

Solution:
Add a field `order_reference` on model `sale.report`. This field refers
to either a "sale.order" or a "pos.order" record.
The field `order_reference` is used to count the number of distinct
orders. We cannot simply use count_distinct on the `order_id` because
there can be multiple sale.report with the same `order_id` but related
to different models (sale or POS order).

Part-of: odoo/odoo#116830
2023-06-13 14:07:27 +02:00
Antoine Guenet 55837e14d7 [FIX] web_editor: prevent editor santizing root's ancestors
When sanitizing the content of the editor, we sometimes move up too far
and sanitize nodes that are not in the editor. This adds the proper
boundaries required to contain the sanitization.

closes odoo/odoo#124803

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-13 12:50:03 +02:00
Soumya M 54e40d100e [REM] spreadsheet: removing ads from template
This commit removes 'Try Odoo' ad from the spreadsheet template which is
visible when spreadsheet is shared with public.

Task-3347908

closes odoo/odoo#124779

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-06-13 12:49:55 +02:00
Saurabh Mishra 4759a8e1a2 [FIX] l10n_it_edi: preventing valuerror in 10n_it_edi
When we confirm an invoice without adding a product in it and then click on
process now then we will face the above valuerror.

Steps to produce:
1) Install 'l10n_it_edi'.
2) Change the company to 'IT Company'.
3) Now go to 'Invoicing' settings and then under 'Fattura Elettronica mode'
check  'Allow Odoo to process invoices' radio button.
4) Create an invoice by adding a partner.
5) While creating it click on 'Add a section' instead of 'Add a line'.
6) Click on confirm.
7) Now Click on 'Process now'.
By following the above steps you will be able to produce the above error.

Applying this commit will solve the valuerror issue.

Sentry- 4170737698

closes odoo/odoo#124771

X-original-commit: 8006e7ce618f98bd26a82cf9b64eaa9b6e9c9d2a
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-13 12:49:50 +02:00
Alexandre Kühn b399b1afe0 [FIX] mail: no crash on livechat close in mobile
Steps to reproduce:

- Create a chatbot
- Browse your website as a user in moble
- Start a conversation with your chatbot
- Go back to your website or close the window

There was a crash because some code in chat window service
makes sense only in `/web`.

Task-3367338

closes odoo/odoo#124716

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-13 12:49:39 +02:00
Lucas Lefèvre 66e875b031 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/251a52e98 [REL] 16.4.0-alpha.4
https://github.com/odoo/o-spreadsheet/commit/73409d7eb [FIX] formatting: round floats with leading zeroes Task: 3327899
https://github.com/odoo/o-spreadsheet/commit/b98383f20 [FIX] misc: type of isCloneable interface
https://github.com/odoo/o-spreadsheet/commit/08492ae06 [IMP] ColorPicker: Extend the custom color selection Task: 3272474
https://github.com/odoo/o-spreadsheet/commit/891d82d9d [REF] xlsx: remove useless exported check
tqhttps://github.com/odoo/o-spreadsheet/commit/6f0ca54f1 [IMP] plugins: remove activeSheet from CoreViews Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/2ac86cdaa [IMP] cf evaluation: make cf evaluation lazy Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/6957579fa [FIX] style: fix dependencies of getCellComputedStyle Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/f035db27d [IMP] plugins: add Immutable type Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/735b3ced4 [IMP] plugins: add history to some CoreView plugins Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/f08900e7c [IMP] plugin: make CoreView plugins more core Task: 3288703
https://github.com/odoo/o-spreadsheet/commit/5fbde7277 [FIX] ColorPicker: fix `+` sign position
https://github.com/odoo/o-spreadsheet/commit/565740d89 [IMP] doc: connecting to external API
https://github.com/odoo/o-spreadsheet/commit/2a92e2dfb [IMP] sheet_actions: removed french spacing
https://github.com/odoo/o-spreadsheet/commit/fbf076535 [IMP] charts: dynamic errors in side panel
https://github.com/odoo/o-spreadsheet/commit/5a7435320 [FIX] demoData: fix XSLX demo data
https://github.com/odoo/o-spreadsheet/commit/8b9c9887c [FIX] clipboard: Do not update viewport on `paste`
https://github.com/odoo/o-spreadsheet/commit/1c4aa507f [REF] Selection: Let caller control selection visibilty Task: 3348042
https://github.com/odoo/o-spreadsheet/commit/c7b0d544f [IMP] config: enables type checking for binded functions

closes odoo/odoo#124697

Related: odoo/enterprise#42444
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-06-13 12:49:33 +02:00
Raphael Collet 7c17e2745a [FIX] base: onchange2() for res.users dealing with reified group fields
closes odoo/odoo#124612

Related: odoo/enterprise#42445
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-06-13 12:49:25 +02:00
Raphael Collet 578a6083e3 [FIX] core: enable read() on new records without origin, as it is used in onchange2
Part-of: odoo/odoo#124612
2023-06-13 12:49:24 +02:00
Raphael Collet 00e86b1552 [FIX] core: new record has one2many field with real records
Part-of: odoo/odoo#124612
2023-06-13 12:49:23 +02:00
Raphael Collet d30b5c0392 [FIX] web: onchange2() format of values in LINK commands
The LINK command must include the corresponding record data in the
web_read() format instead of the diff() format.  The real difference
shows up in x2many fields: web_read() returns them as lists of dicts (or
list of ids), while diff() returns them as lists of commands.

Part-of: odoo/odoo#124612
2023-06-13 12:49:22 +02:00
Raphael Collet 67a402edb5 [FIX] web: onchange2() copy of sub-x2many fields in cache
onchange2() reads the origin record from database, and copies its field
values in cache on the corresponding new records.  The copied x2many
fields must use NewId instead of their real id.

Part-of: odoo/odoo#124612
2023-06-13 12:49:21 +02:00
Raphael Collet 243a2e8d03 [FIX] web: make onchange2() apply x2many commands on existing record values
When doing an onchange on some existing record, the x2many commands must
be applied on the current x2many value of the record.  When doing an
onchange on a new record, the x2many commands must be applied on empty
x2many values.

Part-of: odoo/odoo#124612
2023-06-13 12:49:20 +02:00
Raphael Collet a980d58e48 [FIX] web: onchange2() did not return default value for x2many field
Make the parameter 'force' in method RecordSnapshot.diff() effective in
the case of x2many fields.

Part-of: odoo/odoo#124612
2023-06-13 12:49:19 +02:00
Maximilien (malb) cf00ac4be7 [IMP] l10n_es: default chart template
When you create a new Spanish DB, by default the installed localization package
is the one for non-profit localization. This is probably the most convenient,
as the most normal usage for standard Odoo is the PYMEs one. This PR modify the
demo data and also change the order of how they are displayed in the fiscal
position setting.

In the ir_module, the added line will get the order of module of the init file,
and will sort the template with that order so that we can prioritize some
template.

closes odoo/odoo#122254

Task-id: 3336598
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-13 12:48:58 +02:00
dane@odoo.com 2b10359e10 [FIX] mass_mailing: fix photo uploading
Images weren't shown when using predefined templates, the problem was
that returned  object wasn't assigned to anything, because sometimes
`filename` wasn't found in `imagesInfo` object,
which caused wierd behaviour.
bug happened: f4f0f78318

task-3328675

closes odoo/odoo#124786

X-original-commit: 0944db93f9d9ac895cf81401998aff7bd11a3c92
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-13 11:28:05 +02:00
Trịnh Ngọc Hưng aec840bb56 [FIX] account: sanitize vals, field explicitely empty other one is not
- Create invoice with default `invoice_line_ids`. In the Values both
fields `invoice_line_ids` and `line_ids`, field `line_ids` is empty,
filed `invoice_line_ids` not empty.
  function _sanitize_vals return vals with del `invoice_line_ids`, but
function `_add_missing_default_values` update value default of filed
`invoice_line_ids` in to values.
  And as a result, the invoice is generated with 2 duplicated lines.

closes odoo/odoo#124764

X-original-commit: 87f14b051ee5e7c8f1f86aaf758a98d7b2d2421e
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-13 11:28:00 +02:00
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