Commit Graph
152817 Commits
Author SHA1 Message Date
Romain Derie f1f21432a3 [FIX] website_sale: refactor the GA test to avoid race condition
Before this commit, the `test_05_google_analytics_tracking` tour would often
fail, due to some race condition. It was introduced with [1].

Rewritting the test to make it (a lot) simpler, should get rid of the race
condition.

[1]: https://github.com/odoo/odoo/commit/78bc86cbeccfc5df16218aee2b0d7c501e5c05b5

task-2726482

closes odoo/odoo#82184

X-original-commit: 4bb6e3f38d8a5843cf82f889ac4eef7daf3da717
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-03 18:58:47 +00:00
qsm-odoo 3490b998ee [FIX] web, *: fix the grab cursor not working on all browsers
*: web_editor, point_of_sale, pos_restaurant

The grab cursor is currently not working on all browsers (at least
Chrome Linux). The fallback rule does not even work, meaning that if
you type:

```
cursor: move;
cursor: grab;
```

Those browsers does not even use "move" as they see "grab" as valid but
use the "default" cursor.

This commit replaces our "grab" uses with a local cursor ensuring it
works.

Related to task-2431469

closes odoo/odoo#82093

X-original-commit: 23ebcca902781f2fa0f2381997be4f3d375385b5
Related: odoo/enterprise#23193
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-03 18:58:41 +00:00
Yannick Tivisse faaf234e67 [FIX] hr_work_entry: Hide work entry types on calendar leaves if no access
closes odoo/odoo#81927

X-original-commit: 571fb24a8c880f5dcb77c909fcaf9650089c2286
Related: odoo/enterprise#23111
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-03 18:11:19 +00:00
Yannick Tivisse 3d6af5180e [FIX] hr_contract: Display trainees in contract history
X-original-commit: a06c40da777f3b78b62387f8bf2353cf2ca4fd5c
Part-of: odoo/odoo#81927
2022-01-03 18:11:18 +00:00
Yannick Tivisse 5d278b47e9 [FIX] hr_contract: Display contracts stat button for trainees
Purpose
=======

Some trainees (eg: CIP) have a signed contract when they are paid.

X-original-commit: 5fe0f732fe7d0b27b649e9bfd6bec0a1ef2732de
Part-of: odoo/odoo#81927
2022-01-03 18:11:18 +00:00
Laurent Stukkens (LTU) 38f897e0a8 [IMP] hr_timesheet,project: use name_get to add Internal project's company
Before this commit:

    - The name of the company was appended to the name of the Internal Project,
      having it even when only one Company was in the database.

After this commit:

    - The name of the company will only be appended by the name_get when more than
      one company is present in the database.

task-2608812

Closes: #79926
Related: odoo/enterprise#20514
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-03 18:11:00 +00:00
Laurent Stukkens (LTU) 04f8b7dfa9 [FIX] sales: set invoice company to so one in sale.advance.payment.inv
Prior to this commit, the company of the invoices generated through the use
of the `sale.advance.payment.inv` wizzard were not forced to the one of the
related sales orders. From the compute method on account.move the company would
then be either the one of the journal or the current company.

It seems that context_keys were used 'at least in industry_fsm_sale' in order
to ensure that the company was correctly set (although the one of the task
was used instead of the one of the SO).

This commit ensures that invoices created through the wizzard now takes the company
of the SO they are generated from.

Finaly this commit adds a multicompany test in the sale module in order to ensure
that the `sale.advance.payment.inv` wizzard is not impacted by the multicompany.

task-2608812
Closes: #79926
2022-01-03 18:11:00 +00:00
Laurent Stukkens (LTU) dd493cd6c4 [IMP] sales: add _create_invoices hook in sale.advance.payment.inv
Prior to this commit it was not possible to get a hook from
sale.advance.payment.inv in order to get the created invoices.

The create_invoices def returns either an action or an ir.actions.act_window_close

The introduction of the _create_invoices def will allow to get the created invoices
from the wizzard.

task-2608812
Closes: #79926
2022-01-03 18:11:00 +00:00
Merlin (megu) 09a6df204f [FIX] base: error raised when automated action with many2many field and reference evaluation
Automated action with a many2many field and reference evaluation can be created but don't work

Steps to reproduce:
1. Install Automated Action Rules module and Contacts app
2. Create an automated action for model 'Contact' with trigger 'On Creation' and action 'Update the Record'
3. Add a line to the automated action 'Data to Write' for the field 'Tags (res.partner)' with evaluation type 'Reference'
4. Go to Contacts, create and save a new one
5. An error is raised when trying to execute the automated action

Solution:
Raise an error when a many2many field is of evaluation type 'Reference'

OPW-2673939

(This PR is a duplicate of https://github.com/odoo/odoo/pull/82035 which for some reason couldn't do the forward ports)

closes odoo/odoo#82168

X-original-commit: 8d45823f2dda24c03b427ecbe7003a64b63d01b7
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-01-03 16:35:56 +00:00
dht-odoo 28422acfea [FIX] survey: improve the survey question form view
Right now, for the survey that has scoring enabled, when we try to
add scored question, the label 'Scored' is displayed twice, which
looks odd.

With this commit we rearrange the 'is_scored_question' and
'answer_score' field, and display them next to each other to
improve the view of survey question form view.

task-2704057

closes odoo/odoo#82161

X-original-commit: c5c8f5ddfc3c89b92288fa9a72977835b7614ae4
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-03 15:48:43 +00:00
Pierre Masereel 50ba91513a [FIX] point_of_sale: signature of _price_get changed
During the refactoring in pricelists made in PR:https://github.com/odoo/odoo/pull/79605
the signature of the function _price_get has changed and needs to get a
recordset of product instead of an ID.

So we know pass the product record

closes odoo/odoo#81161

Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-01-03 15:48:39 +00:00
Eleftherios Kritsotakis 7e4558b275 [IMP] point_of_sale: optionally hide margins & costs for non-managers
Currently, the fact that PoS displays to any PoS users the margins & costs
of product (new information popup) makes it difficult to sell in LATAM countries.

In this commit we address this issue by adding the 'Margins & Costs' field
in the settings of each PoS terminal. When this field is disabled, only PoS users
with manager access rights will be able to view the margins & costs data in the
information popup. In order to be compatible with previous behaviour this option
is enabled by default. For this reason, default behaviour is that every PoS user
will have access to the margins and costs of the products.

task-2672063

Part-of: odoo/odoo#81161
2022-01-03 15:48:39 +00:00
Sébastien Theys f221d4f663 [FIX] mail: prevent crash with file uploader when editing message
task-2726182

closes odoo/odoo#82142

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-01-03 13:22:46 +00:00
Didier (did) c718fce536 [FIX] mail: use a placeholder when replying to empty message
Before the PR, when replying to an empty (only attachment) nothing was display
in the message reply preview. This PR introduce a placeholder to handle this
case.

Also taking to opportunity to add missing translations.

task-2664815

closes odoo/odoo#81996

X-original-commit: 60f68512fdc9ebfb2d9331790be5884a86cce67b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-03 13:22:42 +00:00
Victor Feyens f6240e3b9c [IMP] website_sale: rename files according to their model names
closes odoo/odoo#82094

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-03 12:34:21 +00:00
Victor Feyens 313123c5fb [IMP] website_sale: split python files by classes
Part-of: odoo/odoo#82094
2022-01-03 12:34:21 +00:00
Victor Feyens eb6004d704 [MOV] website_sale: wizard to the dedicated folder
Part-of: odoo/odoo#82094
2022-01-03 12:34:21 +00:00
Victor Feyens 32731c5e13 [IMP] website_sale: split python files by classes
Part-of: odoo/odoo#82094
2022-01-03 12:34:20 +00:00
Laurent Smet e9c61029e7 [FIX] account: Keep CABA tax account when reversing
When reversing the CABA entry, the CABA tax account was replaced by the transition tax account if not set on the repartition line.
To reproduce:
Set up a CABA tax with ACC1 as transition tax account and ACC2 as tax account.
When creating the CABA entry, there is a line on ACC1 and another on ACC2.
When reversing the CABA entry, both lines are now on ACC1.

Introduced by https://github.com/odoo/odoo/pull/79556

closes odoo/odoo#82004

Issue: 2718413
X-original-commit: 2f6a35eb73978ce0638765fd0981c7e95d9df696
Signed-off-by: Laurent Smet <las@odoo.com>
2022-01-03 12:34:07 +00:00
Florian Damhaut 8fee5cc6ef [FIX] hr_expense: error on duplication with uom
Step to reproduce:
- Duplicate expense with a uom != of Unit

Current behaviour :
- Error telling that the unit is not correctly chosen

Behaviour After PR:
- The uom is copied on duplication and no error

opw-2714136

closes odoo/odoo#81973

X-original-commit: bd4db173284aa45d141cc3736ecef511738dd8e3
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2022-01-03 12:34:01 +00:00
Kevin Baptiste a7754e77a9 [FIX] fleet: fleet cost report
Steps to reproduce:
- Install Fleet
- Go on report-cost
- Click on a specifi vehicles
-> The cost associated are not correct

Solution:
Correction of the SQL-query which was not correct (id not unique)

closes odoo/odoo#81688

X-original-commit: e06114b3b7e188d8ce293f77d8395592193eb83d
Signed-off-by: yosa-odoo <yosa@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-01-03 12:33:54 +00:00
Tom De Caluwé 51facb3933 [IMP] core: always log console.error during HttpCase
When running test tours logging a message to console.error causes the
test tour to fail. Only one such message can cause the tour to fail, if
other message are written on the console they are simply logged in the
odoo logs. The offending message, however, is only shown at the end of
run, as part of the failing test logs. Arguably, it is better to
include it in the browser logs as well.

closes odoo/odoo#75197

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-01-03 12:33:50 +00:00
roen-odoo 7167961fbf [FIX] sale: Payment had wrong sales team
Current behavior :
When creating payment from invoice, the payment had the wrong sales team id

Steps to reproduce :
- Create atleast 2 invoices with different sales team and same partner
- Register payments for every invoice
- Go in payments list view
- Filter on partner and group by sales team
- All the payments are grouped in the same sales team

opw-2681041

closes odoo/odoo#82114

X-original-commit: 2f3ebe86b2d520dd9c7570f60056f200bb091aab
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-01-03 11:43:42 +00:00
dht-odoo 9edc9840b6 [IMP] survey: improve technical tooltips for few fields
This commit properly formats the domain attribute of few fields so that
the technical tooltips for them do not show '\n' within the domain.

Below are the improved fields:
 - 'triggering_question_id' (for model 'survey.question')
 - 'partner_ids' (for model 'survey.invite')

Taskid-2704057

closes odoo/odoo#81631

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-03 11:43:38 +00:00
Victor Feyens 29febb9980 [IMP] sale(_*): merge product views
No need to have 3 views inheriting the same base 
`product.product_template_form_view`
2022-01-03 12:22:48 +01:00
Victor Feyens 063ad1834e [IMP] sale: clean portal templates
* indentation
* attributes ordering
* useless t tags that can be integrated in xml nodes
2022-01-03 12:22:47 +01:00
Victor Feyens ee0d28ef2b [MOV] sale: rename payment link wizard model & views 2022-01-03 12:22:47 +01:00
Victor Feyens d0198d1672 [MOV] sale: reorder sale actions
* Move specific actions to their place of use (as they are not expected 
to be used anywhere else)
* order actions by use/importance in sale_order_views.xml, and server 
actions in a specific "section"
2022-01-03 12:22:47 +01:00
Victor Feyens 70399ef3b1 [REM] sale: unused action 2022-01-03 12:22:47 +01:00
Victor Feyens 87a1ab4495 [MOV] sale_mngt->sale: move menuitem to its right place
It makes no sense to define an empty menu in sale and its submenu in 
sale_management, define both togethere in sale directly.
2022-01-03 12:22:47 +01:00
Victor Feyens b017d64141 [IMP] sale_management: xml files cleanup
* Indentation
* replace xpath expressions by simpler references when possible
* ordered import of xml files in manifest
2022-01-03 12:22:47 +01:00
Victor Feyens a611a9d4e4 [REM] sale: unused reporting model 2022-01-03 12:22:47 +01:00
Victor Feyens decd2b5093 [IMP] sale: xml cleanup
* indentation
* avoid xpath expressions when the targeted element can be specified 
cleanly
* other minor cleanups & todos
2022-01-03 12:22:47 +01:00
Victor Feyens f1e60818b1 [MOV] sale: move wizard related views into dedicated folder 2022-01-03 12:22:46 +01:00
Victor Feyens 2288b3f942 [IMP] sale: ordered files imports in manifest 2022-01-03 12:22:46 +01:00
Victor Feyens 57132f17bd [IMP] sale: clean sale_order(_line) views xml
* indentation
* simplify xpath expr
* some todos
* xml attributes ordering
2022-01-03 12:22:46 +01:00
Victor Feyens f18d668270 [MOV] sale: split sale_views.xml (2) 2022-01-03 12:22:46 +01:00
Victor Feyens 1df4e06b91 [MOV] sale: split sale_views.xml (1) 2022-01-03 12:22:46 +01:00
Victor Feyens 419d479f24 [FIX] sale: xml files loading order
Changes of previous commits led to an
invalid loading order, where some action were
defined after their place of use.
2022-01-03 12:22:46 +01:00
Victor Feyens c1289fc049 [REF] sale(_management): specify menus in a dedicated file
Use the recursive definition of menuitems
Only archive the root menu (to be unarchived in sale_management)

Clean menus specifications, order attributes, ...
2022-01-03 12:22:46 +01:00
Victor Feyens 7acd2adad9 [MOV] sale: simplify sale_views.xml
Move views & actions related to models defined in other modules in their
specific xml files.
2022-01-03 12:22:45 +01:00
Victor Feyens d4a3a0d89b [IMP] sale: fix indentation of payment_views.xml 2022-01-03 12:22:45 +01:00
Victor Feyens bc9b2dbb45 [IMP] sale: report folder code cleanup
Code indentation
Attributes ordering
qweb code cleanup
...
2022-01-03 12:22:45 +01:00
Victor Feyens c7d8510084 [REM] sale: unused reporting model
Unused since #28633
2022-01-03 12:22:45 +01:00
Victor Feyens d28bf15ca4 [MOV] sale: rename sale_report_templates.xml 2022-01-03 12:22:45 +01:00
Victor Feyens 1a484e14ca [MOV] sale: rename sale_report.xml 2022-01-03 12:22:45 +01:00
Victor Feyens 202490e1fc [MOV] sale: account_invoice_report views into its own file 2022-01-03 12:22:45 +01:00
Victor Feyens 2ab3c94049 [MOV] sale: correct file name 2022-01-03 12:22:44 +01:00
Michael (mcm) f68bbb9b73 [FIX] web: fix calendar test
This commit fixes the calendar test "select events and discard create"
which was crashing certainly because the event we want to click on was
out of the screen at this moment.
Calendar tests use positional mouse[down|up] events to simulate clicks
on events so we need first to scroll to the wanted event before clicking
on it.

closes odoo/odoo#82132

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-01-03 10:52:49 +00:00
Arnold Moyaux 2d1f56381a [FIX] stock(_account): traceback with stock user on forecast report
2 issues:
- When going to the report forecast the value of the stock is computed.
However the stock user should not be able to access the valuations
- Since an access error is return the graph view is not instanciate and
the javascript code try to amend an empty result to the DOM. It results
with a traceback on top of 403 page

closes odoo/odoo#82074

X-original-commit: dbc6b1999ad478d0fdb5774624fd50ca4018be22
Related: odoo/enterprise#23185
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-03 10:52:45 +00:00