Commit Graph
148305 Commits
Author SHA1 Message Date
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
Martin Trigaux 5169fc0c20 [FIX] web: add record id when uploading
Before that, uploading a file from a kanban was adding res_id=0
Was missing from 5e81850ea6

closes odoo/odoo#82101

X-original-commit: 6b4b68a2682a233ca058f3b89ea0aa096061c0eb
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-30 20:46:52 +00:00
Younn Olivierandqsm-odoo 30682fd44c [FIX] web_editor: remove rename button from custom snippet on drag
Commit [1] added a rename button for custom snippets... but forgot to
remove it once the snippet is being dragged.

[1]: https://github.com/odoo/odoo/commit/1044a76a19d94ce93c4cd41841fb805d36a160e3

closes odoo/odoo#82080

X-original-commit: 2d81a6e4a1a8ebb915f00bf37267fb445b7027b7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-12-30 15:15:37 +00:00
bit-odoo c74e501e3a [IMP] mail: add test for temporary or transient messages not have reply icon
Task-2702690

closes odoo/odoo#82079

X-original-commit: 87c0f4a2ab43f9bd385fb66b21629e64415c5461
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-30 15:15:33 +00:00
Florian Damhaut b52cd37c5e [FIX] account: accrual rounding error
Step to reproduce:
- Create PO with an item rounded to 0.01
- Deliver 0.48/1
- Open Accrual Expense Entry

Current Behaviour:
- Order line is not taken into account due to rounding error
- Wizard is empty

Behaviour After PR:
- Qty is correctly rounded and appear as expected
- Order line is taken into account

opw-2720161

closes odoo/odoo#82073

X-original-commit: 85c2ab58d9ce1ccefd02f8214937a649285fde4a
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2021-12-30 15:15:30 +00:00
Florian Damhaut baa88e7a26 [FIX] stock: assign in priority to earlier move line
Steps to reproduce:
-Create a quote with 2 lines (same product - different lead time).
-When a partial delivery is made (e.g., 5 of 10), Odoo places the operation related to the remaining undelivered quantity (5), on the last line in the Operations list.
-When the next delivery is made, Odoo deducts the quantity from the first operation in the list instead of from the line whose deadline is closest.

Current Behaviour :
Odoo assign button assign quantity to the first move line in the list.

Behaviour After the PR:
Odoo assign button assign quantity to a move line based on the priority, the closest deadline and the id.

opw-2657048

closes odoo/odoo#82062

X-original-commit: 430f4f2ca1cebaea62415ee72bf4369684abbfaa
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2021-12-30 15:15:26 +00:00
qsm-odoo 29e5516e2a [FIX] web_editor: re-encourage to use snippets in empty oe_structure
This commit re-applies the commit that was merged at [1] but whose
code was lost during Jabberwock revert at [2].

Make the draggable snippets "wizz" when the user clicks on an empty
oe_structure.

[1]: https://github.com/odoo/odoo/commit/3ed3537abd416ebc35f8bc2ee65f209840c071bf
[2]: https://github.com/odoo/odoo/commit/e5572c317a7775a58675ed73efc89b5c9f6c0c39

Related to task-2363616

closes odoo/odoo#82046

X-original-commit: 668539aa17f061c8851099863e4d5fb7b11b59e8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-30 11:16:11 +00:00
Younn Olivierandqsm-odoo 116afad9fa [FIX] web_editor: correctly move snippets on a popup
Inside a scrollable popup, the scroll was not correctly triggered when
moving one of its snippets through drag and drop.

This commit correctly defines the SmoothScrollOnDrag.$scrollTarget when
a modal is shown.

task-2431469

closes odoo/odoo#82040

X-original-commit: 844051168311ac0c3e8640dda2a90545e373c98d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-12-30 11:16:08 +00:00
Arnold Moyaux 062ad4d998 [FIX] stock: add a partner on warehouse doesn't set correct properties
- Install stock with demo data
- Log in Chicago company
- Chicago partner has inter-company transit set on Customer and Supplier
locations
- Jeff Lawson (partner address of chicago warehouse) has Customer and
supplier locations set instead of inter-company transit.

It prevents the following usecase:
- Enable synch SO and PO between chicago and SF company with automatic
confirmation
- Create a product with route Buy and MTO
- Create a PO in company chicago that buy to SF comapny
- Validate the PO

You have an error with rule since it try to pull from intercompany
transit instead of customer

However if you log in San Francisco company Jeff Lawson has
inter-company transit set while it should not.

It happens because during the demo install the partner is added through
a write and the company is not provided and the code was missing a part
in that case.

closes odoo/odoo#82006

X-original-commit: 46c49ce4f6c9677463425981f01b69117c11943e
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-12-30 09:27:33 +00:00
Arnold Moyaux 72ef6c8db5 [FIX] sale_mrp: quantity invoiced in cogs is different than qty delivered
When a kit is exploded to `stock.move` the quantity is rounded half-up
for every move. But during the invoice. The quantity to invoice on
kit is rounded up so it could result in differences between the
inventory valuation and the cost of the product

closes odoo/odoo#81778

X-original-commit: 1a56d6646d44861cea238ae67d2a7becb36c01b3
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-12-30 09:27:29 +00:00
nni-odoo e0f74e8b0a [FIX] sale_mrp: unit price calculation BoM in different UoM
Fix for task 2620026.

_get_bom_component_qty function is only referred to once in the whole odoo app,
which is on addons/sale_mrp/models/account_move.py#22.

The result returned from this function is used as a multiplier to quantity
to convert into the expected UoM. However, the quantity being referred to on
_stock_account_get_anglo_saxon_price_unit (qty_invoiced, qty_to_invoice), are
already converted into the SO Line's product's default UoM. In this function,
it however tries to convert 1 from SO Line's UoM to BoM's UOM.

With this, if Product UoM=x, SO Line UoM=y, BOM UoM=x, in the function _stock_account_get_anglo_saxon_price_unit,
the quantities will be multiplied by the same factor twice, resulting to the incorrect computation of price_unit to follow.

X-original-commit: d7c2f59dc6e769bd6e8c0e53fe1e4f9df16bbe52
Part-of: odoo/odoo#81778
2021-12-30 09:27:29 +00:00
Florian Damhaut 83d7e36864 [FIX] mail: no more than 2 user in a chat
Step to reproduce:
- Settings -> Mail channel -> any chat-type channel
- Go to Members
- Add an user
- Refresh the page

Current Behaviour:
- Traceback
- Chat are designed for 2 users and you should not be able to add more

Behaviour after PR:
- Can only edit members of channel if it's not a chat
- User error if try to add more user
- Fix traceback if there is too much users

opw-2717341

closes odoo/odoo#82044

X-original-commit: 85f7b7c1304222966610833dc325bc47f1c13158
Related: odoo/enterprise#23156
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-29 18:44:41 +00:00
Alexandre Kühn edb25d056e [IMP] mail: use popover view for emojis
Task-2694206

closes odoo/odoo#81877

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-29 17:55:16 +00:00