Commit Graph
146608 Commits
Author SHA1 Message Date
Thibault Delavallée 869ada08a0 [IMP] mail: rename tracking methods and clean dead code
Purpose is to have tracking methods beginning with ``_track``, indicating
those are tool methods used for tracking. It helps organizing the mail thread
file and having short but precise method names.

We also remove the usage of ``mail_track_log_only`` context key that is not
used anymore in the code. It allows to shorten a bit the code and make it
easier to read.

Task-2671709

Part-of: odoo/odoo#78648
2021-11-23 09:39:52 +00:00
Thibault Delavallée d1edc9e6a7 [REF] crm: correctly name lost_reason field on lead
As this is a many2one, it should end with an ``_id`` suffix. Otherwise we
may think this is a char field, which was probably the case at one point.

Task-2671709

Part-of: odoo/odoo#78648
2021-11-23 09:39:51 +00:00
Thibault Delavallée a830ceaaf9 [IMP] crm: allow to log a feedback when marking a lead as lost
PURPOSE

Allow sales reps to add a closing note to their lead while it is being marked
as lost. This is currently already done by a lot of sales reps but manually
with the "Log a Note" button.

SPECIFICATIONS

In ``Lost Reason`` model: add a new html field allowing to log a note on the
lost leads. Below the m2o, add an Extra Comment field where users can add a
"closing note". When the wizard is submitted, log this message as a note on
selected records.

Add tests, allowing to test both the wizard and this new feature.

Task-2671709

Part-of: odoo/odoo#78648
2021-11-23 09:39:51 +00:00
Thibault Delavallée d348c5e880 [IMP] crm, test_mail: flush tracking in tests involving tracking
Tracking is generated using commit hooks, meaning they are really sent when
the commit ends. This is done to ease values aggregation and accumulation
through various record updates. In some tests we therefore have to manually
flush the tracking, otherwise it is not created and posted. Notably tests about
lead lost wizard were not flushing and therefore not generated the tracking
messages. Those tests will be improved in future commits, cleaning them is
therefore a necessary step.

We also specifically add some tracking flush in mail performance tests. This
is to be sure we measure impact of a write and tracking separately from
previous transactions. Seems everything is working as intended as warmup and
query counters already perform flushes. Here we simply flush at the end
of the setup to be sure all base is clean before starting tests.

Task-2671709

Part-of: odoo/odoo#78648
2021-11-23 09:39:50 +00:00
Odoo's Mergebot 30844b713f [MERGE] website_slides(_survey/_forum): improve standard and reporting views
PURPOSE

Improve eLearning list views and settings UI. Better split standard views from
reporting views.

SPECIFICATIONS

- Lighten the "operational" list views which should not be cluttered with a ton of KPIs.
    Keep those for the reporting views (which in turn need to display some data).
- Reorder settings options for a better cleanup.

See sub commits for more details about the changes.

Task-2607467

closes odoo/odoo#76930

Related: odoo/enterprise#22072
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-23 10:39:36 +01:00
ijas ahammed 4566e1b23d [IMP] website_slides: improve content list view under reporting menu
This commit improves the list view of the contents under reporting menu
to make it simpler. Since we don't want to allow multi-edit here this commit
adds a different list view for reporting and binds it with the action.

Also, the action now excludes the sections from the result, and applies
default filter to see 'Published' content while landing as other content will
probably have no interesting statistics.

Also added float time widget for `completion_time` field.

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:35 +00:00
ijas ahammed 8f800a5ec0 [IMP] website_{slides,sale_slides}: improve course list view under reporting
This commit makes the reporting courses list view simpler, which now has
following fields:

- name
- user_id
- total_views (updated string to `# Views`)
- rating_avg_stars (updated string to `Average Review`)
- total_time (displays total)
- members_count (displays total and updated string to `# Attendees`)
- members_done_count (displays total and updated string to `# Completed`)
- product_sale_revenues (added from website_sale_slides with monetary widget)

This commit also adds a 'Published' filter to course search view
which is applied by default in report action for the courses.

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:35 +00:00
ijas ahammed a85f02a31f [IMP] website_{forum,slides_forum}: improve forum and forum post list views
This commit improves forums and forum posts list views. The changes are listed
below.

Forums list view:
  - optional hidden `total_answers` and `total_favorites`
  - added `slide_channel_id` and `visibility` fields
  - added sum for `total_posts` and `total_views`

Forum posts list view:
  - added badge widget on `state` field for better decoration
  - added sum for `views` and `child_count`, updated their label to
    '# Views' and '# Answers'
  - removed `favourite_count` field
  - moved `website_id` field at last as optional hidden
  - added title for the demo data in which title was missing.

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:35 +00:00
ijas ahammed d41a32e1d9 [IMP] survey,website_slides_survey: improve certification list view
This commit improves the survey list view in eLearning certifications to make
it simpler. This is done through a new primary view, inheriting from the base
one in order to keep changes localized. The main changes are:

- removed the trophy icon from 'Certification' button as each of them
  here are certificates only
- improved string of `title` field to 'Certification Title'
- added `user_id` field with many2one_avatar_user widget after `title`
  in the base tree view (survey.survey_tree)
- updated strings from 'Success Ratio' and 'Avg Score %' to
  'Success Ratio (%)' and 'Avg Score (%)'.
- moved `answer_done_count` field after `answer_duration_avg`
- removed the field `answer_count`
- added float time widget to the field `answer_duration_avg`
  in the base tree view (survey.survey_tree).

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:34 +00:00
ijas ahammed ac3c4e6f67 [IMP] website_slides: improve content list view
This commit makes the content list view simpler, which now has following fields

  - name
  - channel_id
  - category_id (optional, default hidden)
  - user_id (with "many2one_avatar_user" widget)
  - is_published
  - date_published
  - completion_time (displays total and added float time widget)

Note that the view is now multi-edit, but we only want to update 'user_id' and
'is_published' fields in batch. So all other fields are readonly.

We have removed tracking from `date_published`, `website_published` field and
added tracking for `is_published` field. This information is sufficient.

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:34 +00:00
ijas ahammed fb372a69de [IMP] website_slides: improve course list and form view
This commit makes the course list view multi-edit (except 'name' field)
and moves the 'website_id' next to 'user_id'.

In form view: inside options page we have moved `enroll_msg` under to
`enroll_group_ids` to have all enroll options well displayed.

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:34 +00:00
ijas ahammed ce21cfb99c [IMP] website_slides: reorder eLearning settings
This commit reorders eLearning settings blocks, which now looks like

+----------------+-------------------+
| eLearning      |                   |
+================+===================+
|                |                   |
+----------------+-------------------+
| Certifications | Paid Courses      |
+----------------+-------------------+
| Mailing        | Forum             |
+----------------+-------------------+

TaskID-2607467

Part-of: odoo/odoo#76930
2021-11-23 09:39:33 +00:00
Laurent Smet 6227007b7a [FIX] account: Fix Receive bank account on register payment wizard
- Create a partner with 2 bank accounts: BNK1 and BNK2

Wrong flow with vendor bill:
- Create an vendor bill => BNK1 is set by default
- Change BNK1 to BNK2
- Register a payment
=> BNK1 is proposed by default instead of BNK2

Wrong flow with customer invoice:
- Set BNK3 on your company
- Create a customer invoice
- Register a payment
=> BNK1 is suggested instead of BNK3

closes odoo/odoo#80175

Issue: 2683197
X-original-commit: ec0d807b2b6ff3596d9b591bd8ec7d8889d41d8a
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@openerp.com>
2021-11-23 08:53:39 +00:00
Mathieu Duckerts-Antoine 64c8e4eadd [FIX] board: graph height
The commit 3862d5aae1df72d3585f915e8a2a2626322e74ad has changed the class
set on the root node of the graph renderer but has not adapted a css rule
used in the board app to ensure that the graph views have the correct
height. We fix that situation.

closes odoo/odoo#80047

X-original-commit: b08bc57d5ba2e0da17a452189d584574fb2f9832
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-11-23 06:46:52 +00:00
Mathieu Duckerts-Antoine e0cbf4739d [FIX] board: save correct domain
Since 40f1ae87e1436192a70a8a7432eb72d379cfa6dc, a view added to the board application would not
have the correct domain:
    - the action domain was not kept in the saved domain
    - the saved domain was kept dynamic, leading to possible crashes
      e.g. a condition like ("user_id", "=", uid) in the saved domain
      would make crash the dashboard app.
We fix the problem and add a test.

X-original-commit: 7e77bb74bfa1bfef92c6d385dedc2d89e0040780
Part-of: odoo/odoo#80047
2021-11-23 06:46:52 +00:00
Mathieu Duckerts-Antoine b87448356b [FIX] board: keyboard navigation
During the refactoring of the legacy control panel done in d679cd0d8ba9a2420e81a42a698763e9be2327e1,
the method "_addToBoard" was renamed as "addToBoard", but a call to _addToBoard
was left, breaking the keyboard navigation. We fix that situation.

X-original-commit: 6aa10e8c9118eba3c19563431c57912108fe12b9
Part-of: odoo/odoo#80047
2021-11-23 06:46:52 +00:00
Michael (mcm) 3ce226dd85 [FIX] hr_holidays: fix date range picker
Before this commit, picking a range of dates by clicking on
the end date field set the wrong date on the start date field.
This was because the option "related_end_date" was used
on the end date field instead of "related_start_date"

Replacing the "related_end_date" by "related_start_date"
on the end date field fixes the issue.

closes odoo/odoo#79997

X-original-commit: 8402e55e0db474ee64e641866d8c76302fb1ef4e
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-11-23 06:46:46 +00:00
Goffin Simon e4cb8fc426 [FIX] website_crm_partner_assign: Coding error
The state value 'open' does not exist on model  account.invoice.report

opw:2666887

closes odoo/odoo#80206

X-original-commit: 2e7c667f56f84c9bd516711685ca886ff25a5965
Signed-off-by: William André (wan) <wan@odoo.com>
2021-11-22 19:31:51 +00:00
Philippe Wauthy 5cdb8f51a3 [FIX] hr_holidays: fix time off with allocation of one day
As an HR officer, when you create an allocation of one day for a user,
you need to be able to put a time off on that person, following the allocation.
But for the moment, we got an error saying there is no valid allocation on that day.

If you create an allocation of 1 day, you need to be able to put a time off on
that specific day without any error message.

task-2696771

closes odoo/odoo#80196

X-original-commit: 60f691bbac660d47404b35242303288880f084f7
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-22 17:26:53 +00:00
Jeremy Kersten 5945e8e4e3 [FIX] http_routing: don't remove trailing / during redirect
Before this commit, since we promote the use of route without trailing / for
best SEO (fee0113), we remove the trailing / during a redirect to avoid an
extra request.

Unfortunately, it will break some route with trailing / in case of multi lang.

So we remove this optimization, it will increase potentially number of http
request before to get the final url, but it will allow to continue to support
trailing slash in v15.

This commit partially revert the commit ae35117

closes odoo/odoo#80191

X-original-commit: 84d2f5b57ccf3dbcefebdbc795ab1872bc1504b9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-11-22 16:27:09 +00:00
Kamlesh Pathekar 760a226495 [FIX] sale_project: fix sales order stat button traceback
Currently, when we click on 'sales order' stat button of 'project.update'
it shows traceback because action name is incorrect.

In this commit, action is renamed-https://github.com/odoo/odoo/commit/3d10c7c70884993f1290a4fd430a1c52247a8420#

closes #79739
task-2689432

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-22 16:27:01 +00:00
Audric Onockx (auon) 91633b6008 [FIX] sale_timesheet : fixed Credit Notes for Vendor Bills not taken into account in project overview profitability
Reproduce :

- Install modules Purchase, Accounting, Project, Sales Timesheet
- In Accounting settings, activate option Analytic Account
- Create a Project and link it with an Analytic Account
- Create a PO then Vendor Bill with this Analytic Account
- Check the Overview for the Project associated with that Analytic Account
- The amount of the bill will show in the "Other Costs" field of the Profitability section
- Go back and add a Credit Note for the vendor bill

Issue :

- The amount of the PO still shows in the "Other Costs" section, where it is expected to be balanced (zeroed) by the Credit Note.

Solution :

- Don't take into account the Vendor Bills for whioch a Credit Note exists.

opw-2527655

closes odoo/odoo#80187

X-original-commit: 848f71f22d50d443adfa7c5544e48d25e80dabd9
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-22 15:34:37 +00:00
Nicolas Bayet 57127f1721 [FIX] web_editor: prevent editor observing technical modification
Whenever the qweb plugin modified the dom for rendering purposes,
the mutations were observed but shouldn't. The reason was that the
reference to the editor was missing in the plugin and therfore it did
not call `observerUnactive` and `observerActive`.

Task-2695658

closes odoo/odoo#80182

X-original-commit: e973526ffe6deba778a613eb4053ba3017f9fb00
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-22 14:48:11 +00:00
Martin Trigaux a8e50921af [FIX] *: correct typos and English errors
closes odoo/odoo#80181

X-original-commit: efd178daee689192d4e930a075475587038b3e0d
Related: odoo/enterprise#22439
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-22 14:48:04 +00:00
FrancoisGe a8cd4e9315 [FIX] web: Breadcrumb to FormView
Before this commit, going to a form view using the breadcrumb menu did
not retrieve the record id. The record id was not present in the url.
So, if you reloaded the page, the record was not displayed anymore.

closes odoo/odoo#80174

X-original-commit: 3eeaa6b1c6f54be9a87e67140ab57fe8f3a61407
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-11-22 14:48:00 +00:00
Laurent Smet 6d77ec0d99 [FIX] account: Fix currency of write-off lines generated by a reco model button
Steps to reproduce:
- Create a journal with a custom currency
- Create a statement line
- Create a reconciliation model button putting the residual to a random account
- Reconcile the statement line using the button
=> The amount lands inside the debit/credit instead of amount_currency

Introduced by:
https://github.com/odoo/odoo/commit/5ad660877f485d741a0120e07eb73178f59d2dfc#

closes odoo/odoo#80173

X-original-commit: fc9b8dc6611d761f2c8778254dcbad52091404dc
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@openerp.com>
2021-11-22 12:43:37 +00:00
ani-odooandChristophe Simonis 4f42d3302a [FIX] hr_holidays: correct definition of Time Off Calendar report
- Use fully qualified column names to avoid ambiguities.
 - Remove the useless usage of `row_number()`. The ID of the timeoff can
   act as ID. It also allow the removal of the `ORDER BY` clause which
   accelerate the query execution
 - Correctly compute the timezone. Gettting the timezone of the current
   user at build time led to invalid data.

closes odoo/odoo#80172

X-original-commit: fed5b8e4ebafd4002d66d1c748ea4e2b2f650f21
Signed-off-by: Christophe Simonis <chs@odoo.com>
Co-authored-by: Christophe Simonis <chs@odoo.com>
2021-11-22 12:43:33 +00:00
Alexandre Kühn a1049cc7d6 [IMP] mail: enforce t-key on all OWL t-foreach directives
In preparation to using OWL v2 in discuss code

Task-2695901

closes odoo/odoo#80166

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-22 12:43:30 +00:00
Thibault Delavallée cd0c0d631b [FIX] crm: fix query counter in assign performance
In one week, this test failed about 4 times, seems mainly on nightly
enterprise. Let us update counter accordingly.

closes odoo/odoo#80164

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-22 11:56:50 +00:00
Kevin Baptiste b90ee11ef3 [FIX] hr_holidays, *_calendar: disable sync on new leave
On large databases, the `postcommit` hook for Google|Microsoft Calendar
was taking up to 10% of a leave validation even if the user has the sync
disabled.

This commit disables the postcommit hook for new leaves, as the event will
be synced through the cron eventually.

closes odoo/odoo#80160

Taskid: 2693265
X-original-commit: 88884292e105eab2c36b2a334c617ac4978fa79c
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-22 11:56:46 +00:00
Julien Mougenot 54b45aec9e [FIX] base_import_module: Keep manifest assets of dynamic modules
The `ir_import_module` module is used by users to upload custom module
data via a zip file. The zip file can contain xml data, xml views and
static files.

Before this commit, the "import module" feature of this module was
broken since the imported module's manifest was lost after the import
was performed.

Now, 'ir.asset' records are created along with the attachments pointing
to the imported static files.

closes odoo/odoo#80120

X-original-commit: ec77577796e72707fbb2077f05067428cebc3c7f
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2021-11-22 11:12:44 +00:00
Touati Djamel (otd) 34aa881992 [FIX] stock: fix printing picking operation
Steps to reproduce the problem:
- Create a storable product tracked by a unique serial number.
- use the product in a delivery
- try to print the "Picking Operations" document

Problem:
Traceback is triggered because we cannot use two fields in a "t-field"

opw-2692226

closes odoo/odoo#80140

X-original-commit: f478c9f48bc4f8adc0f455df1795de9672a40b78
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2021-11-22 09:21:59 +00:00
Touati Djamel (otd) 5646476dbf [FIX] mrp: improve mrp BOM report
Steps to reproduce the bug:
- Create a BOM:
    - set the quantity of the finished product and component as more than 1
    - save > print > BOM Structure

Problem:
The report generated shows the qty and cost for production of 1 unit of product, regardless of the BOM quantity

opw-2691632

closes odoo/odoo#80145

X-original-commit: d08b0abd56a04a23e155b345bf1796a031321f2f
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2021-11-22 07:49:55 +00:00
Nasreddin Boulif (bon) 1132e2b395 [FIX] website_sale: check combination before add to cart
Steps to reproduce the issue:

- Install "eCommerce" module
- Create 2 attributes with 'Variants Creation Mode' is Never and
  one of them should have at least 2 values.
- Create a product and add the two attributes as variants and
  one of them should have at least one value
- Go to configure variant and select the first attribute and
  exclude one or more values from the second variant
- Go to the website and change the variant to a value from the one
  you excluded and add to the cart directly (you should be fast).

Issue:

  Product with a not possible combination is added to cart.

Cause:

  Not checking if the combination is possible before adding to cart.

Solution:

  When adding product to cart, if element with class
  ".js_add_cart_variants" is present and have children,
  trigger _getCombinationInfo to retrieve last combination info,
  then add it only if the combination is possible.

opw-2569109

closes odoo/odoo#80134

X-original-commit: 7667d4ea32f758d062d0a0820dfc5bd6d0d084b4
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2021-11-22 07:49:51 +00:00
Kevin Baptiste 7ca6539979 [FIX] hr_contract: fix wrong view definition
The fields `employee_type` and `user_id` were not properly replaced in
the view.

closes odoo/odoo#80130

Taskid: 2694143
X-original-commit: 4d4309507911ae2440d4989df364c292ca285652
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-22 07:06:19 +00:00
2dd772dab8 [IMP] website, *: improve video providers handling
*: web_editor, website_sale

This commit adds the abibility to get an image thumbnail based on the
video provider URL and to avoid duplicating the regexes. It also
improves those URL regexes.

All the regexes are kept in a python tools file and are called in JS
using an RPC.

task-2154812

closes odoo/odoo#44537

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: ras-odoo <ras@odoo.com>
Co-authored-by: bbh-odoo <bbh@odoo.com>
2021-11-19 22:32:39 +00:00
Raphael Collet 1de5dc4b96 [FIX] base_automation: recursive computed field cause too many calls to flush
The use-case that motivated this fix is the deletion of a project task
with many subtasks.  The field 'project_id' on tasks is recursively
computed, and some automated action must be executed when its value
corresponds to a given project.

The issue occurs when the domain of automated actions is evaluated by
method search(), because the latter flushes the fields to search on,
which are also the ones being recomputed.  Combined with the fact that
recursive fields are not computed in batch, this leads to a huge amount
of recursive calls between the automated action and flush().

The execution of task.unlink() looks like this:
- mark 'project_id' to compute on subtasks
- delete task
- flush()
  - recompute 'project_id' on subtask1
    - call compute on subtask1
    - in action, search([('id', 'in', subtask1.ids), ('project_id', '=', pid)])
      - flush(['id', 'project_id'])
        - recompute 'project_id' on subtask2
          - call compute on subtask2
          - in action, search([('id', 'in', subtask2.ids), ('project_id', '=', pid)])
            - flush(['id', 'project_id'])
              - recompute 'project_id' on subtask3
                - call compute on subtask3
                - in action, search([('id', 'in', subtask3.ids), ('project_id', '=', pid)])
                  - flush(['id', 'project_id'])
                    - recompute 'project_id' on subtask4
                      ...

closes odoo/odoo#80141

X-original-commit: e2788b580ef15ef3083ac919737a46d850143832
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-11-19 19:36:49 +00:00
Jeremy Kersten 27df588c15 [FIX] *: remove trailing slash from controllers
Follow-up of c1ae086cdb

closes odoo/odoo#80139

X-original-commit: 58ee1a5906e4b2a50fb248085abd9caab97f4c52
Related: odoo/enterprise#22421
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-11-19 18:53:45 +00:00
Wolfgang Taferner b71d4c44b3 [FIX] l10n_at: supplement and fix tags + remove empty tax_ids
Cash flow tags were supplemented and useless and empty tax_ids removed.
Additionally account 7990 had a wrongly tag which was corrected.

closes odoo/odoo#80135

X-original-commit: b3313905a973758da11f5bb9ea3efc6913491ef5
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-11-19 18:08:50 +00:00
Jeremy Kersten b8a2565444 [FIX] project: don't check access if in sudo
Before this commit, since the code make a sudo -> unsudo to check the rights,
whatever the previous env, it is no more possible to create a task from an
alias.

This commit check that we are not already in sudo before, or in this case it
doesn't check the access right with an unsudo.

closes odoo/odoo#80131

X-original-commit: 56c625079ac5e4da9c7d9994b4459aa06cbfe727
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-19 17:18:53 +00:00
Jeremy Kersten a20a4ffb98 [FIX] delivery_mondialrelay: fix typo in method name
closes odoo/odoo#80129

X-original-commit: cf779927c1668eca7a4a7053c796173fc1bf3522
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-11-19 17:18:50 +00:00
Jeremy Kersten 7f3a2b700f [FIX] base: fix acl error on wizard merge contact
Since 5dc4cff60a, we removed the access read on ir.model.*

Before this commit, an employee without admin rights cannot merge partners
because he doesn't have the right to read the model ir.model.fields.

Now with use a sudo to find the reference field and avoid the traceback.

closes odoo/odoo#80119

X-original-commit: 1815b108004b407714705b6f62b65f4cfc38a395
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-11-19 16:33:16 +00:00
Eleftherios Kritsotakis 2788cc499a [FIX] point_of_sale: consider the decimalSeparator for startingValue in NumberPopup
For German language and for the langauges that use the same decimal separator
(use of comma "," to separate decimal digits and use of point "." to indicate
thousands, millions etc.) the tips pop up in payment screen was displaying an
erroneous initial value: ex. '0.84' was displayed instead of '0,84'. This was
causing a miscalculation of the intented tipping amount. Thus, the tipping
amount had to be inserted manually in every occasion.

Solved it by taking into consideration the decimalSeparator in the NumberPopup.

task-2695104
opw-2677249

closes odoo/odoo#80110

X-original-commit: 5bedf8b0da1df271634da5d8c0acf48c4280594e
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-11-19 15:08:37 +00:00
Alexandre Kühn 2d88871d8e [IMP] mail,snailmail: replace component lifecycle method to hook
In preparation to using OWL v2 in discuss code

Task-2694189

closes odoo/odoo#80033

Related: odoo/enterprise#22354
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-19 15:08:30 +00:00
Rémy Voet (ryv) ec05e72dcf [FIX] stock: fix blocking generate lots name
Issue, to reproduce:
- Create a product A tracked by serial
- Reciept one product A with a lot without digit
- validate this receipt, Ok
- Create a other receipt for product A,
- You cannot anymore open the detail wizard to enter a
SN/lot : get 'The lot name must contain at least one digit.'

Fix:
Remove the constraint and fallback by adding "0" at the end.

task-2652292

closes odoo/odoo#80104

X-original-commit: 5f75d5b1c8d5d4f37cbdc34daa79514226a17855
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Rémy Voet <ryv@odoo.com>
2021-11-19 14:24:02 +00:00
Alexandre Kühn 9ff1e76735 [IMP] mail: use t-component with component definition
In preparation for using OWL v2 in discuss code.

Task-2694217

closes odoo/odoo#80084

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-19 14:23:54 +00:00
Adrien WidartandFlorent de Labarre f53b702071 [FIX] stock: transfer the package level to backorder
The packages reservations are not correctly done in case of a backorder

To reproduce the issue:
(Use demo data)
1. In Settings, enable:
    - Delivery Packages
    - Multi-Step Routes
2. Edit the warehouse:
    - Outgoing Shipments: 2 steps
3. In Operations Types > Delivery Order, enable:
    - Show Detailed Operations
    - Move Entire Packages
4. Create a Pick P:
    - 1 x [DESK0004] Desk
    - 1 x Large Cabinet
5. Put each product in a separate pack
6. Validate P
7. Create a Delivery Order (Planned Transfer):
    - 1 x [DESK0004] Desk
    - 1 x Large Cabinet
8. Mark as TODO, Check Availability
9. In Detailed Operations, mark one of the packs as Done
10. Validate the DO, Create a backorder

Error: The not-yet-done pack is still on the delivery order and its
status is "Reserved". This line shouldn't be present anymore. Moreover,
the backorder has a line for this pack, its state is "Draft" (instead of
"Reserved") and the state of the BO is Ready.

When creating the backorder, the packages levels of the not-yet-done
moves are transferred to the new picking (i.e., the backorder) However,
these moves does not have a package level defined (due to
9d758fa2e1). Therefore, when checking the
packs:
https://github.com/odoo/odoo/blob/e7450bee8f018a5334d9628235824f2fc6f32cec/addons/stock/models/stock_picking.py#L822-L832
`package_level_ids` is empty, so a new `stock.package_level` is created
(instead of using the one of the initial delivery order). And
`move_lines_to_pack` is empty too, so the new `stock.package_level`
won't have any move lines and its state will be "Draft"

We should rather transfer the package levels of the moves' lines.

OPW-2659176
closes #77509

closes odoo/odoo#80072

X-original-commit: 4fd5cd6f940575090021dedd2159d050b594dd69
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Co-authored-by: Adrien Widart <awt@odoo.com>
Co-authored-by: Florent de Labarre <florent.mirieu@gmail.com>
2021-11-19 13:37:29 +00:00
William Braeckman 8e049f4f26 [FIX] hr_holidays: fix allocation to time off link
The link between time off and allocation didn't check for allocation
state.

TaskId-2695066

closes odoo/odoo#80095

X-original-commit: d84d0b7a8bfbb88c538f4918dc7c226dc69ecc89
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2021-11-19 12:51:12 +00:00
Habib (ayh) 90c681a8f9 [IMP] account_edi,account_edi_extended,l10n_es_edi_sii,l10n_it_edi_sdicoop: improve the ability to debug EDI xml
When using EDI, documents often fail to be submitted to the relevant API. This provides the ability to generate and download the XML

Task-2669041

closes odoo/odoo#80088

X-original-commit: 6eba7935c4d4f0fef5e1e7ad9b1d7726aa3db109
Related: odoo/enterprise#22392
Signed-off-by: Laurent Smet <las@openerp.com>
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
2021-11-19 12:51:05 +00:00
Tiffany Chang (tic) 0d882a4e49 [FIX] product,stock: print lot when provided instead of product
When Print Labels was revamped in odoo/odoo#69690 it was decided that
only product barcodes would be printed. Unfortunately we want SN/Lot
barcodes to be printed instead when they are filled in, so we make this
the case when applicable (i.e. when printing Transfer Quantites + qtys
done).

closes odoo/odoo#80079

Task: 2678336
X-original-commit: 105587e9e411442fd8e6d30efaa35b90b0e09959
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-11-19 12:50:58 +00:00