Commit Graph
147341 Commits
Author SHA1 Message Date
Thibault Delavallée b173dae36b [IMP] test_event_full: go post-install
In order to test performances let us be sure all modules are installed.

Task-2703289 (Event testing and coverage)
Preparing Task-2703285 (Event performance improvements)

Part-of: odoo/odoo#81717
2021-12-21 20:20:50 +00:00
Thibault Delavallée 8e867c0c8f [UPD] test_event_full: update counters
Followup of odoo/odoo@034d369 . Now that followers computation is done in
batch we gain 1 query per additional record to create in a recordset. Indeed
some searches are now performed in batch instead of in loop. This allows to
gain notably 19 queries on batch of 20 records to create for example.

Task-2703289 (Event testing and coverage)
Preparing Task-2703285 (Event performance improvements)

Part-of: odoo/odoo#81717
2021-12-21 20:20:50 +00:00
roen-odoo 8b47ba06c7 [FIX] point_of_sale : Cash in/out button not showing in mobile app
Current behavior :
Cash in/out button is not present on mobile PoS app

Steps to reproduce :
- Go on your mobile app
- Go in PoS app

opw-2704097

closes odoo/odoo#81758

X-original-commit: cdd2475251e161e5029fc5a363e28aa8163fc490
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2021-12-21 17:23:37 +00:00
David Monjoie 2d295d6c1f [FIX] web_editor: fix multiple editors removing each other hints
The previous code resulted in only the last editor to trigger its
handler having hints, as all the others would be killed by the last one.

closes odoo/odoo#81743

Task-id: 2632841
X-original-commit: e24b039ea120597ff5438deca3c69c7a1d54cd31
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-21 15:56:00 +00:00
oco-odoo 5817e69a56 [IMP] account: reconciliation models: No confusing label anymore for "Match Invoice/bill with"
This label was defined with 'for="match_text_location_label"', even though it actually isn't met for just that field, but for the three boolean fields allowing to choose where to match on the statement line. As a consequence, in debug, it displayed the helper of that field, which was confusing for the user.

closes odoo/odoo#81730

X-original-commit: a89c6300f3b9b22fc4e18b286f2f28734e750638
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Olivier Colson <oco@odoo.com>
2021-12-21 15:55:56 +00:00
oco-odoo 840c93ddab [FIX] account: reconciliation models: properly match statement line fields when no partner is set
When no partner is set on a statement line, the reconciliation models try to find candidates using the payment reference or the partner name.

This was not working well when using reconciliation models configured to match on notes and/or reference. Only the default match on label was working.

As an example, consider the following case:

1) setup an invoice-matcing reconciliation model as such:
	- Partner Is Set and Matches = False
	- Match Invoice/bill with = Reference

2) Create an invoice with payment reference 123, for 100€

3) Create a statement line of 100€, with reference ('ref' field, inherited from account.move) = 123, label='test', and no partner set.

4) Try to reconcile the statement line

=> not match is found

OPW 2701729

X-original-commit: 74894b0da82f5f71cd22a3c9bb405696f908ef5c
Part-of: odoo/odoo#81730
2021-12-21 15:55:56 +00:00
Alexandre Kühn c1c082543c [FIX] mail: redefine UserSetting/volumeSettings
Follow-up of
https://github.com/odoo/odoo/pull/81679

This field was actually being used, so shouldn't have been deleted.

closes odoo/odoo#81737

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-21 15:03:32 +00:00
Thibault Francois a592e3a368 [FIX] sale: avoid concurrent update on invoice
Issue
-----

When a customer sign and pay a sale order from the portal and
automatic invoicing is enabled, it generate an invoice.
Once the payment done the customer is redirected to
the sale order preview with a link to the invoice created.

To display the link to the invoice the method _portal_ensure_token() is
called and write the access token token.

In parallel, if the invoice need to send edi document, the cron job is
triggered at the posting of the invoice and thus the cron job try to
write as well on the invoice as the invoice link is displayed to the
customer

This lead to a concurrent update for the cron job that do not retry in
case of concurrent update as normal transactions do. So the edi document
is never synchronized and the invoice never sent

Solution
--------
Avoid to write on the invoice while displaying the sale order portal
view by already generating the access_token in the transaction that post
the invoice

closes odoo/odoo#81731

X-original-commit: ccf76a5b8c0671e69e8875ea476d13005dab8d72
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-12-21 13:47:03 +00:00
Sébastien Theys 0565171213 [IMP] mail: add file uploader view model
closes odoo/odoo#81697

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-21 13:46:59 +00:00
Thibault Francois 31e610f7a3 [FIX] purchase, sale: Fix multicompany fiscal pos access
Context
-------

On some database, record rule may be configured in such a way
that user are able to read Purchase/Sale order
with a company_id != user.company_ids

Issue
-----
This commit https://github.com/odoo/odoo/commit/4dd150950274b1d7c3b24b7665443318f94323f6#
introduce a new field tax_country_id that require to be able to read
the fiscal.position as well.

The reading of a sale.order or purchase.order should not require the
right to read the fiscal.position for the computation of a technical
field only use during the modification.

Solution
--------
Compute tax_country_id as sudo

closes odoo/odoo#80049

X-original-commit: b329c3b18197ac6db5ffdf3cb4945a14997a1f0b
Signed-off-by: Olivier Dony <odo@odoo.com>
Signed-off-by: Thibault Francois <tfr@odoo.com>
2021-12-21 13:46:55 +00:00
Aktiv Software c510df4201 [FIX] base: duplicate mandatory field while creating contact
Description of the issue/feature this PR addresses:
duplicate mandatory field in popup when save the contact record.

Current behavior before PR:
Its showing same field name twice in popup which asking invalid fields.

Desired behavior after PR is merged:
it should show 'name' field only once.

Fixes #79753

closes odoo/odoo#81727

X-original-commit: eb4b49e7078f4aa90f9d652de10386da38ded2dc
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-21 12:55:05 +00:00
nurefexc eb6810d1b5 [FIX] web: missing context during resequence
Problem 1: The context was not passed when calling the resequence function.
Problem 2: Also, the subsequent read operation did not pass the full
context, but only the context of the user, not the context of the action.
A test has been added for the basic model to check that the context is properly
given after a resequence.

closes odoo/odoo#81726

X-original-commit: 75bbec4f7fe14aa9d9c310ffcbd500bd1f70b14f
Signed-off-by: Luca Vitali <luvi@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-12-21 12:55:01 +00:00
Camille Spiritus fbb5b074f7 [IMP] account: rename non-trade filtering option, spread its use
Renamed the 'Other' account type into 'Non Trade' to enhance clarity and coherence

Changed the filtering system in the accounting search view to improve coherence with the filtering system available in the reports.
It is now possible to filter the trade/non trade accounts in the accounting views.
This change may be overriden by default selections already in place.

Renaming Receivable/Payable to Trade Receivable/Trade Payable could have turned out to be confusing for accustomed users.

They are now renamed Receivable/Payable, though the Non-Trade option is still present.

task-2669128

closes odoo/odoo#79752

Related: odoo/enterprise#21773
Related: odoo/upgrade#3004
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-21 12:54:54 +00:00
Philippe Wauthy c0515b4585 [FIX] hr_holidays: fix being able to select invalid time off type
Prior to this commit, the _search_valid method returns all the time off types.

With this commit, only the time off types that have a valid allocation are returned

task-2711388

closes odoo/odoo#81724

X-original-commit: 20a2b29ee273c505f0279f128e8ac6c13c5be043
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-21 12:05:57 +00:00
qsm-odoo 08a2dd9133 [FIX] website: fix form submit button permanent loading
Before this commit, in some cases the submit button of the form snippet
never stopped loading after being clicked (e.g. redirect to an anchor in
the same page).

Now, the form and the button loading effect are reset at the same time
at the appropriate time depending on the post-send action:

- Redirect to another page: never (we leave the form values and the
  button loading effect for the whole redirection duration)

- Redirect to an anchor on the same page: after the scroll animation

- Show a custom HTML message: never (this type of post-send action is
  meant to hide the form after that message is shown, there is no need
  to restore it to its initial state)

- "Nothing" (= small message next to send button): once the data is sent

In the last two cases, a 400ms delay was also added before showing the
message so that the send flickers less and seems more smooth. In the
last case, it also prevents to double click and double send the form.

Related to task-2172312

closes odoo/odoo#81703

X-original-commit: 42f6887bb4406d4aa636040c8325e8ecab202778
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-21 10:44:01 +00:00
Jordi Ballester e6d6961c75 [FIX] mail_bot_hr: inherit from correct view to avoid error
closes odoo/odoo#81646

X-original-commit: 7bea5890d5095abcfc8e2b6081baecfd3e9d5ec6
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-12-21 09:49:38 +00:00
rhe-odoo ef083f4b1b [FIX] pos_hr: allow user to close session.
The current user of the pos session is unable to close the session even if he is the one who opened it.
This commit allows the cashier to close the session if he is linked to the user that opened the POS session.

closes odoo/odoo#81696

Task-id: 2713876
X-original-commit: 3a27e73894e374ff30246c984ec85dc72f5e9b37
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-21 08:55:44 +00:00
Kevin Baptiste c28a826471 [FIX] lunch: bring back the favorites lunch products
It was no longer possible to favorite a product and the already
favorited products were not showing.

closes odoo/odoo#81692

Taskid: 2704569
X-original-commit: 328e0384cc2cff34fc5c4131014d94efb5747cb5
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-21 08:07:07 +00:00
Thibault Delavallée f4ef456cd7 [IMP] test_event_full: add tests without event_crm impact
Current registrations tests run with event_crm rules being activated. In
order to better highlight their impact (which is important) let us have
some tests skipping them.

Followup of odoo/odoo#81068

Task-2703289 (Event testing and coverage)
Preparing Task-2703285 (Event performance improvements)

closes odoo/odoo#81604

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-21 08:07:03 +00:00
Thibault Delavallée 90a9495887 [FIX] test_event_full: fix rare extra query on batch registration creation
Seems soemtimes an extra query is generated.

Part-of: odoo/odoo#81604
2021-12-21 08:07:02 +00:00
Rémy Voet (ryv) 034d369c10 [FIX] mail: batch _insert_followers in create of mail.thread
The `_insert_followers` wasn't batch in the `create` of `mail.thread`
for no reason, which call the create of a `mail.follower` one by one.
It is inefficient for the batch records creation (import or some
flows) of a model with `_inherit = [mail.thread, ...]`.

Then batch it, to miminize the cost of `_insert_followers`:
The creation of 100 `mail.follower` takes:
- 0.107 sec if you create one by one (before)
- 0.022 sec if you create in batch (now)

Also add two tests (on model with a chatter):
- One testing the behavior of follower and subtype in case of
multi-create
- One testing the number of queries done to create 5 records.
The old SQL request count was 23, now it is 19 (-1 by create
call).

task-2711448

closes odoo/odoo#80954

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-21 08:06:57 +00:00
Kevin Baptiste 84e6fa1c77 [FIX] hr_attendance: disable notifications in Kiosk
No notifications should be received whilst in Kiosk Mode.

closes odoo/odoo#81694

Taskid: 2704624
X-original-commit: 202a5a075b90a564d37c68d2f21f9c1edd8a7caf
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-21 07:17:57 +00:00
Laurent Stukkens (LTU) 70b88480b2 [FIX] hr_timesheet: select correct employee in create
Prior to this commit:

    - The employee was the first one returned through a search that
      was not taking the company into account.

After this commit:

    - The employee will be selected according to the company.

This issue arose with b5b105ea

closes odoo/odoo#81704

X-original-commit: 246caae0e70a8af0b507ba87921783a493c86064
Related: odoo/enterprise#23010
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-12-20 21:50:45 +00:00
Samuel Degueldre 0091259e17 [REF] web: remove datetime-changed event in preparation for owl-2
In owl-2, t-on will no longer be supported on components. This commit
converts the code that used to rely on the datetime-changed event to use
a callback-prop based approach instead.

closes odoo/odoo#81199

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2021-12-20 20:57:13 +00:00
qsm-odoo f7ad4ff8ec [IMP] web_editor, website: review s_popup drop-in selector
The final forward-port work merged in master at [1] should have been
adapted to avoid the JS "hack".

[1]: https://github.com/odoo/odoo/commit/e51cdc1e60ea8b61f6b1ca24ef7151d487ce8c86

closes odoo/odoo#81699

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-20 19:16:55 +00:00
qsm-odoo d0e673f8a9 [REF] website_mass_mailing: remove dead code linked to newsletter popup
Commit merged at [1] left dead code behind.

[1]: https://github.com/odoo/odoo/commit/8873fe7240e505553650fc15aea1ea3a299acc0f

Part-of: odoo/odoo#81699
2021-12-20 19:16:55 +00:00
Louis Wicket (wil) 99b2c61d92 [IMP] mail: make inverses optional when unused
IdentifyingFields and fields marked `required` must have their inverse
with `isCausal: true`. This led to having to systematically declare
inverses on the related models in order to explicitly add `isCausal:
true` to them, even when these inverses are not used for anything else.

This commit automatically adds `isCausal: true` to the inverses
generated by the framework when they are related to required fields or
identifyingFields. Thus, it is no longer necessary to declare inverses
if they are not used for anything else.

This commit also removes all the inverses that are no longer needed
thanks to this change.

closes odoo/odoo#81679

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-20 17:59:01 +00:00
Achraf (abz) 6c39b566d6 [FIX] mass_mailing,project: Prevents crash on form views
When a user double clicks on a record in the kanban view of the form view of project a crash occurs.
This happens because there is an init which is called twice and during the second time the component created during the first click is destroyed and a DOM_updated event is still trigger which leads to a crash because in the case of project_form there is has a use of the element's dom which is then no longer available.

There is the same case in "FieldHtmlWithAction" and in "MassMailingFullWidthFormController"

The problem can be easily fixed by using on_attached_callback and on_detach_callback instead of setting a listener on DOM_updated in the init method.

opw-2685867

closes odoo/odoo#81680

X-original-commit: 8d83433d463dd3d1aef321921939962883f57d68
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
2021-12-20 16:53:09 +00:00
roen-odoo 927dd2d371 [FIX] hr: Cannot acces profile without right
Current behavior:
When a user doesn't have any HR access right he cannot access his own profile

Steps to reproduce:
-Go to the demo user settings
-Remove all the right in the HR section
-Log into demo account
-Try to access My Profile

opw-2712593

closes odoo/odoo#81674

X-original-commit: ee932eab329043a3ddf82bb39dff458f4eb7f7ad
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2021-12-20 16:53:05 +00:00
Florian Damhaut 44300c6d74 [FIX] stock: print traceability report
Step to reproduce:
Try to print traceability report

Current Behaviour:
Traceback wrongly generated header

Behaviour after PR:
No Traceback, the header is now correctly generated

opw-2704299

closes odoo/odoo#81673

X-original-commit: 6b567326edc7bc691d87d911759ee30a24a8a1d7
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2021-12-20 16:53:01 +00:00
Benjamin Vrayandqsm-odoo e51cdc1e60 [FIX] web_editor: prevent dropping popup inside a substructure
Before this commit, it was possible to drag and drop a popup inside an
oe_structure which was itself inside an other oe_structure (e.g. snippet
parallax). It didn't make sense and moreover created bugs.

After this commit, it is no longer possible to drag and drop the popup
snippet or the newsletter popup snippet in a substructure.

task-2491976

closes odoo/odoo#81669

X-original-commit: 49050c124795852ce7ad51b92958498972730dcf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-12-20 16:52:57 +00:00
Kevin Baptiste 9c5694e929 [IMP] hr: make tags visible/editable by Officer
The tags management on an employee was limited to HR Administrator,
which didn't make sense as an HR Officer could manage the tags just not
assign them to an employee.

closes odoo/odoo#81654

Taskid: 2715498
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-20 16:52:54 +00:00
Didier (did)andSébastien Theys 84adbcaffa [IMP] mail: move the activity handler inside a model view
part of task-2579306

closes odoo/odoo#79538

Related: odoo/enterprise#22506
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2021-12-20 16:52:47 +00:00
Antoine Guenet c53ebf8244 [FIX] web_editor: prevent line breaks at edges of anchor on press enter
When pressing enter at the edge of an anchor that is a child of an
unbreakable element, we inserted line breaks in the anchor itself, which
is unexpected. This inserts the anchors after/before it instead.

closes odoo/odoo#81662

X-original-commit: df6f8dd0c54c40ea7edbd3821ae068d79b1b7af7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-20 16:04:49 +00:00
Antoine Guenet d049e3d7d7 [FIX] web_editor: ensure snippet selection is kept when acting in it
The snippet selection was lost on every action in mass mailing. The code
that prevents that was checking if the target of a click was the body
element but for mass mailing we needed to be a little bit more
restrictive since the editable area is not the body itself and we want
to actually prevent changing the snippet selection when the target is
the iframe target as well.
Since the mailing itself has a options, the sidebar is actually never
empty and therefore removing a snippet doesn't bring us back to the
block tab. Since therefore also ensures that we actually do.

task-2716397

X-original-commit: ecdb71bf6a566f5f6c294904e84f2132561dbb3c
Part-of: odoo/odoo#81662
2021-12-20 16:04:49 +00:00
Tiffany Chang (tic) b8d2a07e3f [FIX] mrp_subcontracting: block all components = 0 qty_done
Same issue as odoo/odoo#71068 but for subcontracting rather than a MO.

Steps to reproduce:
- create a subcontracted product w/tracked component
- create receipt with subcontracted product (don't forget to set
  "Receive From" = subcontractor
- fill in Detailed Operations with tracked component lot/sn, but Done=0
- Try to record production

Expected Result: Subcontract production is done + window closes
Actual Result: nonsensical "The quantity to produce must be positive"
               validation error

Discovered during task: 2695173

closes odoo/odoo#81649

X-original-commit: 646789811c1f874160318badfe8105d84057b8bd
Related: odoo/enterprise#22998
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-12-20 15:09:50 +00:00
Tiffany Chang (tic) 631b111ead [FIX] mrp(_subcontracting): avoid view inheritance conflict
Both mrp_subcontracting and a module in Enterprise both inherit
`mrp.mrp_production_form_view`. This was leading to a conflict where the
Enterprise view could overwrite the invisible=1 attribute added by
mrp_subcontracting, therefore we update the views to avoid this.

Part of Task: 2695173
ENT PR: odoo/enterprise#22637

X-original-commit: 6317c34808d381e54bae2431fec2de4b8503b447
Part-of: odoo/odoo#81649
2021-12-20 15:09:50 +00:00
Tiffany Chang (tic) 509a32c3dc [FIX] mrp_subcontracting: show correct view when subcontracted product
Fixes 2 issues:

Issue 1: wrong view shown when registering strict consumption
To reproduce:
- create tracked product to subcontract
- create subcontract BoM with no tracked components + strict consumption
- create receipt of subcontracted product (remember to select From =
  subcontractor)
- click on `action_show_details` burger button in Operations

Expected result:
- Detailed Operations window with no move lines in it (i.e.
  stock.view_stock_move_nosuggest_operations view)
Actual Result:
- Detailed Operations window with move lines w/ 0 Done
  (i.e. stock.view_stock_move_operations view _ lines also do
  not get filled in when using the `action_assign_serial_show_details`,
  => twice as many lines as needed end up in view)i

Similar issue can occur when using a non-strict BoM + tracked product.

Issue appears to be that conditional was incorrectly updated during
refactoring to allow non-strict BoMs also record components.
stock.view_stock_move_operations view should only appear when all
productions are recorded

Issue 2: Consumption warning wizard not showing correctly
To reproduce:
- same as Issue 1, except consume less than BoM amount

Expected result: Consumption Wizard
Actual Result: stock move view shown instead

Issue was due to 'form_view_ref' value in context of picking view,
therefore we force clear this value everytime we expect this wizard
to open.

Task: 2695173
X-original-commit: b9990a5dab8731a8f69fd07aa73a318fc9d4a808
Part-of: odoo/odoo#81649
2021-12-20 15:09:50 +00:00
Antoine Guenet ccbcb4919e [FIX] mass_mailing: ensure media list items are full width
A horizontal padding was applied to each media list item, making it
impossible to make the media list items full width. Full width media
list items can always be reduced by adding padding in the editor, but
the converse is not true. For this reason, this commit applies
horizontal padding 0 to each media list item in the snippet template.

task-2716398

closes odoo/odoo#81637

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-20 13:38:59 +00:00
Antoine Guenet afa8233502 [FIX] mass_mailing: center image in cover snippet
When the cover snippet's image is in full width, we don't notice it's
not centered. But reduce its width and it appears at the left of its
container. There is no reasonable scenario in which this would be what
we expect so this commit centers that image by default.

task-2716399

Part-of: odoo/odoo#81637
2021-12-20 13:38:59 +00:00
Antoine Guenet f057befb82 [FIX] mass_mailing: use unicode copyright sign rather than font awesome
The footer templates were using a font awesome icon for the copyright
sign, while it has a unicode equivalent, which is easier to edit and
lighter.

task-2716401

Part-of: odoo/odoo#81637
2021-12-20 13:38:58 +00:00
Andrea Grazioso (agr-odoo) 8465d19c06 [FIX] account: creation of redundant entries
Have an MX database set up
Activate multicurrency (MXN and USD)
Have several rate for USD
- yesterday 0.047939098170
- today 0.048486729180
Make an invoice, dated yesterday for USD 116, tax 16% (cash basis)
Create a received payment dated today, for USD 116
Reconcile invoice and payment

Jounal items will be created for the invoice, for the exchange
difference and for the cash basis entries, but there are redundant
entries addressing the tax.
This occur because when reconciling the payment with the invoice the
system create the cash basis moves and reconcile them. During this inner
reconciliation exchange difference move are created (1) just for the tax
line.
Then the outer reconciliation flow continue and compute the exchange
difference moves, considering all cash basis items created before. A new
couple of journal items will be created to account for the difference in
tax, but this is redundant since it was already covered before (1)

opw-2685570

closes odoo/odoo#81624

X-original-commit: 03bf311bfde98f28a9b8e73953869a42b828c5e3
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2021-12-20 10:50:04 +00:00
Benjamin Vray 509b7654e9 [FIX] website_form: fix form redirection to an anchor in the same page
Before this commit, when the redirection of a form was an anchor and
that anchor link came from the anchor option, the scroll animation was
not triggered.

task-2172312

closes odoo/odoo#81622

X-original-commit: 5db838cfc91d8438d6234df00bd8174768445974
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-20 10:49:59 +00:00
rhe-odoo 27e65db56f [FIX] point_of_sale: receipt automatic print image fail
There were some issues when auto printing the receipt with images.
It could happen that the receipt was printed and the image were not yet visible.

To fix this, we make sure the image are rendered on the receipt before we print it.

closes odoo/odoo#81579

Ticket-id: 2688238
X-original-commit: 10d47ed2aee17f2a0d0b76c49c623fb3da4d5e30
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-20 10:49:52 +00:00
Pierre Masereel 70c12c5790 [FIX] l10n_sa_pos: qr code not seen on ticket
When a ticket was sent by email or printed, the qr code was not
visible. This was because it was not correctly put in the report and was
injected in the DOM throught the mounted of the component.

So we are now setting it in the qweb and prepare the values in
export_for_printing instead of inject it through the component that
display it.

closes odoo/odoo#81573

X-original-commit: 1ca12f15d39f9cda09fd1743184d64daf82adabc
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-20 10:49:49 +00:00
Florent de Labarre 572a7117b2 [FIX] point_of_sale : impossible to open the pos
- Create a TAX A and TAX B
- Create a fiscal position, and TAX A in scr and TAX B in dest, and add other tax map
- Use this fiscal position in POS
- A month latter unactive TAX B (because the law have change).
--> You have an issue during opening the pos

closes odoo/odoo#81427

X-original-commit: 7471f13264d7002bd5570b5008565d3cc84042e6
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-20 10:49:39 +00:00
anhe-odoo a38a0caa0e [FIX] sale_coupon: fix the unexpired_promotions filter
Expected behaviour

When having multiple promotions with, for example, a promotion of X% for the
first order and a promotion of Y% (Y<X), we should apply the first promotion
on the first order and then don't get this promotion into account to choose
the best promotion for a future order, so that we have:
1. A promotion of X% on the first order
2. A promotion of Y% on every other order

Observed behaviour

When trying to apply promotion on other order, nothing seems to happen, as
Odoo take the already-used X% promotion into account, being the most
interesting promotion, select it as the best promotion to apply and then
apply it to finally get a result of a 0% discount as the promotion has
already been used.

Problem Root Cause

As it can be seen in the commit, the error comes from the fact we filtered
the available promotion with a non-strict inequality.

Validation

A test has been added in test_program_numbers.py to validate our fix

Related issue

- opw-2674681

closes odoo/odoo#81633

X-original-commit: 9bade951570d79e2623d3bf548df445c22c31034
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
2021-12-20 09:58:54 +00:00
Philippe Wauthy 98b8479585 [IMP] hr_skills: remove skills edit buttons when no rights
When the user has no rights on the Employee app, he can still
see the information on the employee public view
If the skills module is installed, there are add and remove buttons
displayed even in the absence of user rights.

Buttons should be hidden if the user has no rights to edit the
skills and resume

task-2702678

closes odoo/odoo#81617

X-original-commit: fd2f6e9586c5c853ba36d7ce511591574fac0bb2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-20 07:55:41 +00:00
Adrien Minet 96dab7ac98 [FIX] l10n_de: ensure o is defined in din5008 report
How to reproduce the bug:

- install l10n_de
- in Settings/General Settings/Business Documents, configure document
  layout to DIN 5008
- try to print one of several:
   => timesheet entries
   => direct debit mandates
   => follow-up reports

Bug:

When you use the DIN 5008 report defined in l10n_de, the o variable is
defined which generates an error.

closes odoo/odoo#81505

Opw: 2659703,2699563,2649221
X-original-commit: c6ffe7eb65844dad33db4390ffeeb24d61a36f40
Signed-off-by: William André (wan) <wan@odoo.com>
2021-12-18 21:00:49 +00:00
Josse Colpaert 144abbe552 [FIX] l10n_gcc_invoice: also add description/label of the invoice line
We did not add the description of the invoice line on the print-out
of the invoice. (probably because description is not translatable
and the name of the product is)

If a product is set, the name of the product becomes the description (label)
on the invoice line,  but of course this depends on the language.

So, we only add the description if it does not correspond
to either the English (/standard language) or Arabic product description.
(People can always add both languages in the same field)

Of course, if the product is not set, it will also just show the description (label).

Also put the : of the payment reference in Arabic on the other side.

closes odoo/odoo#81620

X-original-commit: 3485c7ad368d9c841d75a0b0614082b8989e2afc
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2021-12-17 21:59:10 +00:00