Skip to content
Snippets Groups Projects
  1. Mar 24, 2022
    • Denis Ledoux's avatar
      [ADD] portal: manage api keys in portal · 6baada5e
      Denis Ledoux authored
      
      Add the possibility for portal users to manage API keys
      in the frontend portal interface.
      
      - Allow for portal users to manage their API keys if the system parameter
        `portal.allow_api_keys` is set.
        A settting in `res.config.settings` is added in order
        to enable or disable the feature (to add/remove the system parameter)
        through a compute field,
        to avoid adding a new database column in standard
        (as this revision targets stable 15.0).
        The setting appear only in debug mode.
      
      - Display the API keys in the portal in debug mode only
        (as in the back-end for regular users, in their profile)
      
      - The flow in the frontend is a mimic of the flow from the backend,
        the wording and the look and feel is from the back-end.
      
      closes odoo/odoo#85682
      
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      6baada5e
    • Nicolas (vin)'s avatar
      [FIX] account: remove default journal in cut-off · 45289417
      Nicolas (vin) authored
      
      The journal in a cut-off has to be of type general. But there is an
      issue at the moment where a default_journal_id would be provided in
      the context (coming from the dashboard for example) and thus, fill
      the journal in the cut-off wizard with a wrong value (vendor bill for
      example).
      
      This change make sure no default values are provided to the wizard.
      
      closes odoo/odoo#87136
      
      X-original-commit: 5b099bf6
      Signed-off-by: default avatarFlorian Gilbert <flg@odoo.com>
      Signed-off-by: default avatarNicolas Viseur <vin@odoo.com>
      45289417
    • Pieter Claeys (clpi)'s avatar
      [FIX] mrp: don't show reserved column for byproducts · 7aa08fe3
      Pieter Claeys (clpi) authored
      No longer show the reserved column from by-products production registration on an MO.
      
      Task ID: 2797692
      
      closes odoo/odoo#86768
      
      Pr: https://github.com/odoo/odoo/pull/86768
      
      
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      7aa08fe3
    • Juan Jose Scarafia's avatar
      [FIX] l10n_ar/cl: starting sequence · f2f76dfa
      Juan Jose Scarafia authored
      
      When getting l10n_ar/l10n_cl starting_squence check with the proper
      company (self.company_id) and not self.env.company_id
      
      We do not put a journal_id anymore as it should take the correct one
      automatically in v15.
      
      Original commit d6f4fee58edf103c63836ac488be240961fd671a
      
      closes odoo/odoo#85786
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      f2f76dfa
    • Nicolas Bayet's avatar
      [FIX] web_editor: prevent opening linktool on uneditable links · 4a634f2c
      Nicolas Bayet authored
      
      Before this commit
      When trying to open the linktool on link that are not
      `isContentEditable`, the linktool was initialized and not
      showed in the sidebar.
      
      After this commit
      As it does not make sense to edit a link that is not editable,
      prevent the linktool from being initialized in the first place.
      
      task-2802592
      
      closes odoo/odoo#87137
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      4a634f2c
    • Aaron Bohy's avatar
      [FIX] web: action service: concurrency issue · fb9c8cd6
      Aaron Bohy authored
      
      There is a concurrency issue in the action service:
       1) be in an action with several views
       2) execute another action (e.g. by clicking on a menu)
        -> [calls the route "/web/action/load", and it takes a while]
       3) meanwhile, click on another view in the view switcher
      
      If the call to "/web/action/load" is long enough, it may happen
      that the view requested in step 3 is briefly shown before the
      action associated with the menu clicked in step 2.
      
      In this scenario, the action of step 2 should never be displayed,
      because the user requested something else afterwards (in this
      case a switch view).
      
      One can produce a similar issue when restoring a previous action
      of the breadcrumbs instead of switching view.
      
      This commit fixes those two issues by registering a resolved
      promise in the keepLast (concurrency utils), s.t. it "cancels"
      the potential current operation (in this case, the call to
      "/web/load/action").
      
      closes odoo/odoo#87127
      
      Signed-off-by: default avatarMathieu Duckerts-Antoine <dam@odoo.com>
      fb9c8cd6
    • Katherine Zaoral's avatar
      [FIX] l10n_ar: share sequences compute sequences · 0e448d9e
      Katherine Zaoral authored
      
      Before this change, we have the errors that documents generated on
      pre-printed sales journals mark as unified book were wrongly
      named using the wrong doc prefix code.
      
      This was visible thanks to the demo data were we notices that the credit
      notes were having FA- doc prefix instead of NC-
      
      This was because we are reusing the shared sequence directly, now we
      check and fix the doc prefix for those cases and all documents generated
      on shared sequences are properly named.
      
      closes odoo/odoo#86599
      
      X-original-commit: 11551f36
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      0e448d9e
    • rhe-odoo's avatar
      [FIX] point_of_sale: fix quantity decrease popup · b04b5898
      rhe-odoo authored
      
      When the popup was canceled, the input value was null and it lead to an error.
      
      Now we add a check to ensure the value exist.
      
      closes odoo/odoo#87147
      
      Signed-off-by: default avatarMasereel Pierre <pim@odoo.com>
      b04b5898
    • luvi's avatar
      [FIX] web: fields _onClick handler triggered twice · 852e084c
      luvi authored
      
      This commit fixes a bug present in FieldEmail and
      FieldPhone where the handler on the click event was
      triggered twice and was not preventing the field to
      turn into quick edit mode appropriately.
      A test has been added for EmailField to ensure the
      correct behavior
      
      PR enterprise: odoo/enterprise#25506
      
      closes odoo/odoo#86928
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      852e084c
    • Raphael Collet's avatar
      [FIX] core: avoid NULLs in subselects generated for one2many fields · 7e6b6d5b
      Raphael Collet authored
      
      This fixes a problem that occurs with conditions on one2many fields,
      where most conditions are translated with a subquery like
      
          "model".id IN (
              SELECT "comodel"."model_id" FROM "comodel" WHERE ...
          )
      
      The issue occurs when the subquery return NULL values, i.e., when the
      field "model_id" in the subquery above can be NULL.  The fix simply
      consists in adding the condition "model_id IS NOT NULL" in the WHERE
      clause of the subquery.
      
      The problem with NULL values returned by subqueries is the fact that
      they make the SQL condition undetermined instead of false, and this
      discards some of the results returned by a query.  Simply consider:
      
          id NOT IN (1, 2, 3)
      
      The value id=3 makes the condition false, while i=4 makes it true.  Now
      consider that the set also includes a NULL value, like:
      
          id NOT IN (1, 2, 3, NULL)
      
      The value id=3 makes the condition false, but the value id=4 makes it
      undetermined.  Therefore this condition is actually undetermined for all
      possible values of id, and a query containing that condition simply
      returns nothing!
      
      closes odoo/odoo#87111
      
      X-original-commit: 11483a7d
      Signed-off-by: default avatarVincent Schippefilt (vsc) <vsc@odoo.com>
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      7e6b6d5b
    • Raphael Collet's avatar
      [FIX] core: use EXISTS in domain conditions on many2many fields · 212533d6
      Raphael Collet authored
      
      This fixes two problems that occur with conditions on many2many fields:
      the subtle bug caused by NULL values that are returned by subqueries,
      and the performance of those subqueries.
      
      The problem with NULL values returned by subqueries is the fact that
      they make the SQL condition undetermined instead of false, and this
      discards some of the results returned by a query.  Simply consider:
      
          id NOT IN (1, 2, 3)
      
      The value id=3 makes the condition false, while i=4 makes it true.  Now
      consider that the set also includes a NULL value, like:
      
          id NOT IN (1, 2, 3, NULL)
      
      The value id=3 makes the condition false, but the value id=4 makes it
      undetermined.  Therefore this condition is actually undetermined for all
      possible values of id, and a query containing that condition simply
      returns nothing!
      
      Regarding performance, consider a domain like [('tag_ids', '=', False)].
      It is currently translated in SQL as
      
          "model".id NOT IN (
              SELECT "model_id"
              FROM "model_tag_rel"
              WHERE "model_id" IS NOT NULL
          )
      
      PostgreSQL does not handle well this "NOT IN" expression when the
      relation table is large, and uses some very inefficient query plan in
      that case.  The inefficient query plan is possibly related to the
      special handling of NULL values, by the way.  This commit changes the
      above expression to a "NOT EXISTS" expression (as below), which is
      executed with a much more efficient query plan, even with large tables.
      
          NOT EXISTS (
              SELECT 1
              FROM "model_tag_rel"
              WHERE "model_tag_rel"."model_id" = "model".id
          )
      
      This change was motivated by a use-case with 2.7M account moves, 11M
      account move lines and a many2many relation table with 2.3M lines
      (`account_move_line_account_tax_rel`).  The query was timing out (15
      minutes), and it now takes 15 seconds.
      
      We have replaced all the conditions on many2many fields to use the
      relational operators EXISTS and NOT EXISTS.
      
      A test has been added to reflect a case where the many2many table
      contains NULL values, like the one for channel_partner in regards to
      partner_id and guest_id.
      
      task-2753782
      
      X-original-commit: 955caf48
      Part-of: odoo/odoo#87111
      Co-authored-by: default avatarDidier Debondt <did@odoo.com>
      212533d6
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] l10n_cl: unable to issue credit note · 29f9e1d7
      Andrea Grazioso (agr-odoo) authored
      Have a CL company setup
      Issue an invoice
      Then generate the credit note via 'Add Credit Note' wizard
      Add a reason (credit method is locked to 'partial refund') and confirm
      Error will raise “You can not use a invoice document type with a refund
      invoice”
      
      This occur after
      https://github.com/odoo/enterprise/commit/9e049b833b23809e4287ef61ddf7482413debefd
      
      
      
      We now fall back to the logic of l10n_latam_invoice_document
      which, in turns, fall back to the l10n_cl, ignoring the 'credit_note'
      case.
      
      opw-2794515
      
      closes odoo/odoo#87094
      
      X-original-commit: c9ff9d28
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      Signed-off-by: default avatarGrazioso Andrea (agr) <agr@odoo.com>
      29f9e1d7
    • Achraf (abz)'s avatar
      [FIX] base: Allow users read_group with reified field inside the view · eaeb05fb
      Achraf (abz) authored
      
      Until now using a groupby on a view containing a reified field added
      with studio was not possible.
      
      Because `read_group` uses these pseudofields as simple fields when they
      are not actually columns in the table.
      
      With `read`, `write`, `create` and `fields_get` it was already
      supported.
      
      This commit solves this problem by ignoring reified fields in an
      override of `read_group`
      
      opw-2793148
      
      closes odoo/odoo#87120
      
      X-original-commit: 48f869b6
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      eaeb05fb
  2. Mar 23, 2022
    • Aurélien (avd)'s avatar
      [IMP] stock: avoid calling quant_tasks by default. · 91f30054
      Aurélien (avd) authored
      
      Currently, a cron is called once a day (by default)
      to merge duplicated quants. Moreover, each
      time the customer loads the Inventory Report,
      the duplicated quants are also merged.
      
      This is a bit overkill as duplicated quants
      due to concurrent updates are quite rare. Also,
      merging quants can be quite slow when the stock.quant
      table is big (>1M).
      
      This commit adds an ir.config_parameter to turn
      off the merging of quants when accessing the
      Inventory Report. It can be switched back on
      for a specific DB if duplicated quants happen
      more frequently.
      
      opw-2574152
      
      closes odoo/odoo#87099
      
      X-original-commit: bb2cb76a
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      91f30054
    • Nicolas Bayet's avatar
      [FIX] website: propagate action_demand onFailure to promises · 8fa6d40b
      Nicolas Bayet authored
      
      Before this commit
      The code called `action_demand` without specifying a failure
      method.
      In website, there is bug arising where a promises is not rejected
      causing spinner of the sidebar of the website builder to never stop.
      
      After this commit
      Failure is propagated and the website builder bug does not prevent
      the user from continuing to work.
      
      closes odoo/odoo#87100
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      8fa6d40b
    • Jinjiu Liu's avatar
      [FIX] purchase: removed header on subsequent pages of RFQ · 61f380b5
      Jinjiu Liu authored
      
      Reproduction:
      1. Change Document layout style to "Boxed"
      2. Creating a PO with long descriptions for each product, make sure the
      report is at least 2 pages
      3. Send By Email (use default RFQ template)
      4. In chatter, open the RFQ pdf file-> go to second page -> the
      descriptions overlap the header
      
      Reason: like a fix from previous bug in sale order report, the header is
      removed in subsequent pages to avoid overlapping
      
      Fix: set the header to row group
      
      opw-2779427
      
      closes odoo/odoo#87006
      
      X-original-commit: dece57d1
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      61f380b5
    • Katherine Zaoral's avatar
      [ADD] l10n_ar: add demo data liquido producto · c4869c59
      Katherine Zaoral authored
      
      closes odoo/odoo#84945
      
      Related: odoo/enterprise#24561
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      c4869c59
    • Adrien Widart's avatar
      [IMP] stock: set partner for inter-warehouse transfers · cb93c259
      Adrien Widart authored
      
      Test af13e766
      
      closes odoo/odoo#87063
      
      X-original-commit: 46245ea0
      Signed-off-by: default avatarSteve Van Essche <svs@odoo.com>
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      cb93c259
    • Xavier-Do's avatar
      [FIX] crm: avoid indeterminism linked to create_date filter · 4a5b68f0
      Xavier-Do authored
      
      The test `test_assign_count` may fail randomly leading to the error:
      
      ```
      self.assertEqual(self.sales_team_1_m3.lead_month_count, 14)
      AssertionError: 12 != 14
      ```
      
      Since BUNDLE_HOURS_DELAY is 0 (during tests), the domain becomes
      `[('create_date', '<', fields.Datetime.now()]`
      
      Depending of the time when the transaction starts, and the tests is
      executed, the domain could match more or less records when executed one
      second earlier or later. This is especially True for single module build
      where there is less logic and the execution is faster. The domain may be
      tested earlier and match less records.
      
      This error can be reproduced deterministically by setting
      `BUNDLE_HOURS_DELAY = 1/3600`
      
      A fix could be to ignore ignore the create_date domain if the
      BUNDLE_HOURS_DELAY is 0, we want to match all records in theory
      (except if some of them are created in the future...)
      
      The chosen solution is to use cr.now and use a <= instead.
      
      Some assertions where also added to the test in order to identify why
      the count was different and give a more precise message when it fails.
      
      ```
      AssertionError: Lists differ: [] != ['TestLeadInitial_0000', 'TestLeadInitial_[97 chars]006']
      
      Second list contains 6 additional elements.
      First extra element 0:
      'TestLeadInitial_0000'
      
      - []
      + ['TestLeadInitial_0000',
      +  'TestLeadInitial_0001',
      +  'TestLeadInitial_0002',
      +  'TestLeadInitial_0004',
      +  'TestLeadInitial_0005',
      +  'TestLeadInitial_0006']
      ```
      
      task-2796579
      
      closes odoo/odoo#83922
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      4a5b68f0
    • Sébastien Theys's avatar
      [FIX] mail: reintroduce scroll to top on posting message in chatter · e36dbb83
      Sébastien Theys authored
      The feature was broken in https://github.com/odoo/odoo/commit/80d74e7ee0eab83dc5100e0776df09d04b882fec#diff-14904a101d1c0589d79515df7065aeeaaf0d4cdeaff9a4748ff0331c481efe8eL275
      
      
      where `loadNewMessages` was mistakenly removed.
      
      But this call is useful to make sure newly posted messages (from other users)
      are fetched, as well as having the side-effect to scroll to the newly posted
      message of the current user in particular.
      
      closes odoo/odoo#87056
      
      Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
      e36dbb83
    • David Tran's avatar
      [IMP] hr_holidays: separate value preparation and record creation into 2 · 6040670f
      David Tran authored
      
      methods for others to extend functionality
      
      1. _prepare_resource_leave_vals_list() that will prepare value for
      creation
      later in _create_resource_leave()
      2. _create_resource_leave() now calls the
      _prepare_resource_leave_vals_list()
      instead of having done the job itself
      
      closes odoo/odoo#86903
      
      X-original-commit: b37677b9
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      6040670f
    • Jinjiu Liu's avatar
      [FIX] website_sale: changed domain for Online Sales Analysis · 01e433e8
      Jinjiu Liu authored
      
      Reproduction:
      1. Install eCommerce, and complete a checkout using the Wire Transfer
         payment, but don’t confirm the order at the website backend
      2. Go to Orders > Unpaid Orders, the new created order should be there
      3. Go to Reporting > Online Sales, select the "Unpaid Orders" filter
      4. No pivot table shown for the unpaid orders
      
      Reason: the pivot table is restricted for confirmed orders only (‘sale’
      or ‘done’), the unpaid orders filter in Reporting has a different domain
      from Orders
      
      Fix: Remove the domain constraint for pivot table. Set the "Confirmed
      Orders" filter to default
      
      opw-2754932
      
      closes odoo/odoo#86895
      
      X-original-commit: 09b91b4b
      Related: odoo/enterprise#25457
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      01e433e8
    • Ivan Yelizariev's avatar
      [FIX] project: make custom fields copiable again · 9947e82c
      Ivan Yelizariev authored
      
      Since #73341 copy_data is filtered to avoid leaking information to portal user.
      Partically, it makes custom field not copiable.
      
      Fix it by disabling the filter for internal users. This may lead to a problem
      with hacky field `personal_stage_type_ids`. To avoid extra complexity in the
      code, just mark it as `copy=False`. The latter change is kind of an improvement
      from functional point of view, since using default personal stage seems to be a
      better idea rather than copying the stage.
      
      ---
      
      opw-2746922
      
      closes odoo/odoo#86757
      
      Signed-off-by: default avatarLaurent Stukkens (ltu) <ltu@odoo.com>
      9947e82c
    • Vincent Larcin's avatar
      [FIX] resource: update default calendar timezone on first admin login · 3297ffde
      Vincent Larcin authored
      When the admin user logs in for the first time, their timezone can be updated based on the cookies of their browser.
      In such case, the timezone of the default working calendar should be updated too.
      
      Related: https://github.com/odoo/odoo/pull/83262/
      
      
      
      Task 2759592
      
      closes odoo/odoo#84258
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      3297ffde
  3. Mar 22, 2022
    • Goffin Simon's avatar
      [FIX] website_slides: Missing translation · 3697aa91
      Goffin Simon authored
      
      opw:2765730
      
      closes odoo/odoo#86987
      
      X-original-commit: 5982d2e9
      Signed-off-by: default avatarSimon Goffin <sig@odoo.com>
      3697aa91
    • Denis Ledoux's avatar
      [FIX] auth_totp_portal: revoke trusted device selector and model · 0aeb0030
      Denis Ledoux authored
      The selector `.fa.fa-trash.text-danger` is not enough precise,
      it could select another element using the same classes,
      as it's the case in #85682,
      and at the binding the event `RevokeTrustedDeviceButton` `_onClick`
      event on that other element.
      I would have used a dedicated class directly on the element,
      such as `o_auth_totp_remove_trusted_device`,
      but since we are in stable and cannot rely on the template
      being updated, there is no other choice than using what we
      currently have without the update.
      
      In addition, the `remove` method must be called on the model
      `auth_totp.device`, as since the revision
      https://github.com/odoo/odoo/commit/2dee29a7dc6db5cd1f9cc62989b905cff5466f3b#diff-6ea780b2956bc89552a57dd3e711fdd7191d1599c246cc9c887bcc38fa7eabacR11-R12
      
      
      `auth_totp.device` has been added,
      inheriting from `res.users.apikeys` but with a different `_name`
      and they therefore do not share the same IDs.
      Meaning you would end asking the deletion of the `res.users.apikeys`
      record using the same ID than trusted device record.
      
      closes odoo/odoo#87010
      
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      0aeb0030
    • Abdelouahab (abla)'s avatar
      [FIX] auth_ldap : add system parameter to disable referral chasing · eb64ce68
      Abdelouahab (abla) authored
      
      To reproduce
      ============
      
      - Using ldap server with Microsoft Active Directory
      - Set up ldap authentication on Odoo
      - Trying to log with a username/password from ldap on Odoo doesn't work
      
      Purpose
      =======
      
      Because referral chasing is enabled by default, python-ldap ends up requesting
      a completely different unrelated server.
      
      Specification
      =============
      
      To solve the issue, a system parameter `disable_ldap_chase_ref` must be created
      to have the possibility to disable referral chasing by setting its value to `True`.
      
      opw-2724800
      
      closes odoo/odoo#86941
      
      X-original-commit: f40a98ee
      Signed-off-by: default avatarOlivier Dony <odo@odoo.com>
      Signed-off-by: default avatarabla001 <abla@odoo.com>
      eb64ce68
    • Wolfgang Taferner's avatar
      [FIX] delivery: update_prices does ignore shipping rate · 3b171efc
      Wolfgang Taferner authored
      
      As sale does not know about special lines it will always update
      the price based on product and price list instead of applying the correct
      shipping rate, so we do skip those lines by using a newly introduced hook method
      
      closes odoo/odoo#86589
      
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      3b171efc
    • Jérémy Hennecart's avatar
      [FIX] base: use tz in time only datetime field qweb · 3e5decf4
      Jérémy Hennecart authored
      
      We should also use the tzinfo to display only the time of a
      datetime.
      
      task-2458013
      
      closes odoo/odoo#86916
      
      X-original-commit: 49604185
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      3e5decf4
    • Akim Juillerat's avatar
      [FIX] hr_recruitment : send interview to duplicated applicant · bc9dc1d7
      Akim Juillerat authored
      
      Steps :
      Install Recruitment and Surveys.
      Recruitment > Settings > Enable Send Interview Survey.
      Recruitment > Any Position > Create an Application,
      click on Send Interview and then on Send.
      Duplicate it, click on Send Interview end then on Send.
      
      Issue :
      ValueError: Wrong value for survey.user_input.applicant_id.
      
      Fix :
      This is initially caused by the fact that the applicant's response
      is also duplicated. As it shouldn't be, copy=False.
      
      opw-2751975
      
      closes odoo/odoo#86878
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      bc9dc1d7
    • Benjamin Vray's avatar
      [FIX] web_editor: fix scrolling the page while dragging a snippet · d4b23122
      Benjamin Vray authored
      Since the commit [1], it's no longer possible to scroll the page while
      dragging a snippet thanks to its thumbnail.
      
      This is because for mass mailing the scroll element is not the same and
      to check it we were looking for a class in the DOM. For that we did a
      jQuery 'find' but without a 'length', the jQuery 'find' is always
      truthy.
      
      [1]: https://github.com/odoo/odoo/commit/29c6c80ac7009aa5068c763778342f7c6b115fad
      
      
      
      task-2798872
      
      closes odoo/odoo#86745
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      d4b23122
    • anhe-odoo's avatar
      [FIX] delivery: use pricelist to compute shipping cost · c8166b78
      anhe-odoo authored
      
      Expected Behaviour
      
      When adding a shipping cost in a SO, with the shipping method being
      associated to a product, the price should be calculated according to
      the price of the product in the order's pricelist if available
      
      Observed Behaviour
      
      When adding a shipping cost related to a product, with a fixed price,
      the public price of the product is used instead of the price defined
      in the SO pricelist
      
      Reproducibility
      
      1. Create a product "Test Shipping" with a public price of 10
      2. Create a shipping method "Test Shipping" associated with the
      "Test Shipping" product
      3. Create a pricelist "Test Pricelist", where the product "Test
      Product" has a cost of 15
      4. Create a contact "Test Contact" associated with "Test Pricelist"
      5. Create a So for the "Test Contact" with "Test Shipping" as shipping
      method -> Shipping cost will be 10 instead of 15.
      
      Fix Description
      
      The issue here was that the price computed by the delivery carrier didn't
      took into account the selected pricelist. We tried to then change it in
      the delivery chooser wizard, but some issue with particular case (i.e.
      when the shipping cost should be 0 if the SO total is bigger than X)
      appeared, leading us to add the fix directly in the delivery_carrier
      classe.
      
      Related Issues/PR
      
      - opw-2754482
      
      closes odoo/odoo#86905
      
      X-original-commit: e43ff93b
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      Signed-off-by: default avatarHendrickx Anthony (anhe) <anhe@odoo.com>
      c8166b78
    • Merlin (megu)'s avatar
      [FIX] stock: correct total ordered quantity on delivery slip · df914877
      Merlin (megu) authored
      The total ordered quantities on a delivery slip with order lines of the
       same product was wrong + this PR
      https://github.com/odoo/odoo/pull/83591
      
       was incorrect, the undelivered
      products should be displayed once
      
      Steps to reproduce:
      1. Install the Sales and Inventory app
      2. Create and confirm a sale order with two order lines, both with the
      same product
      3. Go to the delivery and confirm it with all demands met
      4. Print the delivery slip
      5. The ordered quantity of the product is wrong, it should be equal to
      the delivered quantity
      
      Solution:
      Use all empty moves in package-less products
      `qty_ordered` = `qty_done` when in a package (the potential remaining
      quantities will be displayed in the package-less products or in the
      backorder section) or when there is no backorder (as the undelivered
      products will either be added to the package-less products section or
      the ordered quantity will be incremented later)
      If we are not in a package and there is a backorder, adapt the ordered
      quantity to remove the quantity of the packages considered before
      Convert `qty_done` to the UoM of the stock move
      
      opw-2722203
      opw-2758840
      opw-2782572
      
      closes odoo/odoo#83442
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      df914877
    • Samuel Degueldre's avatar
      [FIX] web: fix tooling failing to run due to bash-specific syntax · 3104ab16
      Samuel Degueldre authored
      
      In #86163 we added a check on the branch name to avoid running the
      tooling on stable branches, however this check used bash-specific
      syntax. While the hashbang in the pre-commit hook specifies that the
      hook should be run using bash, we were using the npm module "husky" to
      manage git hooks, which would ignore this hashbang and always run the
      hook using sh, causing the hook to fail in all cases.
      
      After some consideration, we have decided to stop using husky, as its
      main purpose is to make hook management easier in npm-based projects.
      Since we already need a script to enable the tooling, we can do
      essentially the same thing that husky is doing but with more control
      over the process with no drawbacks.
      
      closes odoo/odoo#86888
      
      Signed-off-by: default avatarSimon Genin (ges@odoo) <ges@odoo.com>
      3104ab16
    • Raphael Collet's avatar
      [FIX] base: record count on ir.model defined by query · d9bc8dd5
      Raphael Collet authored
      
      Models can be defined by an SQL table, an SQL view or an SQL query (with
      attribute _table_query).  Counting records makes little sense when the
      model does not correspond to a table, and actually fails when it is
      defined by an SQL query.
      
      We fix the compute method by counting records only for models where
      _auto=True.
      
      closes odoo/odoo#86880
      
      X-original-commit: 956a0a1c
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      d9bc8dd5
    • tsm-odoo's avatar
      [FIX] mail: correct res fake model · 4644df23
      tsm-odoo authored
      
      The res.fake model has a partner_ids fields which
      is a many2one but is used as a one2many.
      
      closes odoo/odoo#86808
      
      X-original-commit: 02b34c6b
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      4644df23
    • bve-odoo's avatar
      [FIX] base: allow the codeview on users signature · 8adcd60c
      bve-odoo authored
      Since v15 and the owl improvment, the signatures of other users
      could not be modified in HTML (as v14 and previous) as the
      codeview button was missing.
      
      In order to modify the signature with this commit in v15:
      1/ Access a user
      2/ Edit
      3/ Click on the codeview button (Odoo Green button with </> inside)
      4/ Copy/paste your html code
      5/ (/!\) Click again on the codeview button
      > You should see your HTML signature
      6/ Save
      
      opw-2728194
      follow-up of https://github.com/odoo/odoo/pull/80788
      
      
      
      closes odoo/odoo#86739
      
      Signed-off-by: default avatarSimon Goffin <sig@odoo.com>
      8adcd60c
    • roen-odoo's avatar
      [FIX] mrp, sale_mrp: Avoid merging stock move different bom_line_id · 0e648081
      roen-odoo authored
      
      Current behavior:
      When using a product kit that have a product kit in his BoM some move line where merging when they shouldn't.
      Because of this the delivered count wasn't correctly updated in any sale order using this product
      
      Steps to reproduce:
      - Create product B to manufacture with a BoM (type Kit) using component A and component B
      - Create product A to manufacture with a BoM (type Kit) using product B and component A
      - Create a sale order with product A
      - Confirm the sale order and validate the delivery
      - The delivered count of product A on the sale order stays at 0
      
      opw-2777810
      
      closes odoo/odoo#86718
      
      X-original-commit: 3157929c
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      Signed-off-by: default avatarEngels Robin (roen) <roen@odoo.com>
      0e648081
    • Florian Damhaut's avatar
      [IMP] payment_ogone: add possibility to use sha256 · 9289ed05
      Florian Damhaut authored
      
      SHA1 is going to be deprecated by ogone.
      This change try to keep current behaviour while adding
      the possibility to use SHA256 and SHA512
      
      As this change as to be done in stable version,
      We use the length of the key to know which version of SHA
      we should use.
      
      The goal is to switch add an selection to master to ensure
      better code modularity.
      
      The change was requested by PDE/ANV.
      
      opw-2766648
      
      closes odoo/odoo#86652
      
      X-original-commit: 759411fa
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      Signed-off-by: default avatarDamhaut Florian (flda) <flda@odoo.com>
      9289ed05
    • bit-odoo's avatar
      [FIX] mail: attachment viewer download and print buttons for guest · 4f846f0e
      bit-odoo authored
      
      Before this commit:
      
      Attachment viewer download and print buttons not working for guests.
      
      After this commit:
      
      Attachment viewer download and print buttons will work for guests.
      
      Task-2664842
      
      closes odoo/odoo#80830
      
      Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
      4f846f0e
Loading