Skip to content
Snippets Groups Projects
  1. May 10, 2023
    • Touati Djamel (otd)'s avatar
      [FIX] stock: change product's company · b5ffb60f
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      - Connect with the company A
      - Create a consumable product “P1”
      - Create a receipt transfer with this product
      - confirm the transfer
      - Come back to the product form
      - limiter le produit que a la “Company B”
      
      Problem:
      no user error triggered
      Go to inventory > operation > transfer: a Traceback is triggered
      
      Before this commit, there is no verification while changing a product's
      company for consumable. That can lead to an issue where some operations
      cannot be done because of access errors. To avoid that, this commit
      prevents to change the product's company if some move lines for this
      product exist in another company.
      
      opw-3300559
      
      closes odoo/odoo#120969
      
      X-original-commit: a6666de7
      Signed-off-by: default avatarDjamel Touati (otd) <otd@odoo.com>
      b5ffb60f
    • Mahdi Cheikh Rouhou (macr)'s avatar
      [FIX] loyalty : send email in partner language · f09ac453
      Mahdi Cheikh Rouhou (macr) authored
      
      When sending email with gift card, it will have the user langauge and not the partner language
      
      Steps to reproduce the error :
      1- Add french and english language
      2- Make the current language english
      3- Install contact and sales and activate gift cards
      4- create a contact having french language
      5- create a gift card for the french partner and send it to him
      6- the email will be in english lang
      
      The origin of the problem was the missing lang field in the template
      
      opw-3308919
      
      closes odoo/odoo#121028
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      f09ac453
    • Michele's avatar
      [FIX] project_timesheet_holidays: move update check to easily override it · e2f2f2df
      Michele authored
      
      Before this commit, the check is too restricted and it is not possible to update it to add other conditions.
      
      This commit moves that check in a new method to be able to override it.
      
      closes odoo/odoo#120597
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      e2f2f2df
    • Julien Castiaux's avatar
      [FIX] core: missing doc for some subcommands · 9c6bac74
      Julien Castiaux authored
      
      Run `odoo-bin help`, you'll notice that some descriptions are missing,
      this commit fixes that.
      
      Run `odoo-bin shell --help`, you'll notice that the `usage:` line says
      `odoo-bin [options]` instead of `odoo-bin shell [options]`. Other
      commands that depend on the server cli are broken too. Fix those too.
      
      closes odoo/odoo#120285
      
      Signed-off-by: default avatarVincent Schippefilt (vsc) <vsc@odoo.com>
      9c6bac74
    • FrancoisGe's avatar
      [FIX] web: StaticList._changes is an Array · 49bf81e0
      FrancoisGe authored
      
      In commit 5778878d433986be73c9bf5ffe0d60efedca6c9f, we remove the StaticList._changes
      for all x2m in the BasicModel. Unfortunately, the _changes are a list of
      commands, so we need to replace them with an empty list, not an empty object.
      
      This commit does not contain a test because the bug was identified during
      the fw of commit 5778878d433986be73c9bf5ffe0d60efedca6c9f to master.
      This is not reproducible in 16.0.
      
      closes odoo/odoo#121004
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      49bf81e0
    • Maruan Aguerdouh (magm)'s avatar
      [FIX] stock: set location as replenishment posible without warehouse · 874e4246
      Maruan Aguerdouh (magm) authored
      
      Steps to reproduce:
      
      - Install purchase, inventory and manufacturing.
      - Now create a subcontractor, with it's corresponding location, it's set
      by default.
      - Go to this new location and set it as replenishment location.
      - Now create a Request for Quotation using this subcontractor.
      - We will receive a traceback whent trying to access replenishment.
      
      Issue:
      
      We got a traceback caused by the fact that we are trying to set
      as replenishment location, a location that doesn't have a warehouse.
      
      Solution:
      
      We need to add the handling of this case, so we won't always need
      a warehouse for the orderpoint.
      
      opw-3164276
      
      closes odoo/odoo#113361
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      874e4246
    • Patrick Hoste's avatar
      [FIX] website_slides: fix multiple course review bug · 2e4f8ff5
      Patrick Hoste authored
      
      Before this commit, it was possible for one to post
      multiple reviews when all the already posted reviews
      had the 'Employee Only' state. A traceback was also
      thrown when trying to update an 'Employee Only'
      comment. It was also possible to edit a log note.
      This commit fixes all these issues.
      
      Task-2810085
      
      closes odoo/odoo#120570
      
      X-original-commit: c3b11554
      Signed-off-by: default avatarStéphane Debauche (std) <std@odoo.com>
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      2e4f8ff5
    • stcc-odoo's avatar
      [FIX] mrp{_account}: consider capacities when computing duration · 7b5a30fb
      stcc-odoo authored
      
      Related enterprise PR: odoo/enterprise#39669
      
      Steps to reproduce:
      
      Install mrp_workorder
      Create Product P1, Workcenter W1
      Edit W1 > Specific capacities > Add line: Product = P1, Start time = 5, End time = 5
      Create BoM > Product: P1, Operations tab > Add line: Workcenter = WC1, Default duration = 60:00 min > Save
      Click on overview stat button
      Issue:
      
      The created operation has expected time of 60:00, instead of 70:00. The workcenter start and stop times are considered in this calculation, so the workcenter capacities should be considered too.
      
      Solution:
      
      Use `_get_expected_duration` to compute the expected duration.
      
      opw-3229485
      
      closes odoo/odoo#118360
      
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      7b5a30fb
    • niyasraphy's avatar
      [FIX] website_crm_partner_assign: prevent opening partnership analysis tree/form views · 31b92913
      niyasraphy authored
      
      on clicking the graph view of the Partnership Analysis, currently the tree
      view and form view is opened. actually the tree and form view for this model
      are not defined in the code and thus the end user get the tree view with only
      ID field in it.
      
      As those view have no sense, prevent from jumping on those.
      
      closes odoo/odoo#116999
      
      X-original-commit: 82a99006
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      31b92913
    • Ali Alfie (alal)'s avatar
      [FIX] hr_expense: expense categories padding issue · f6bffc09
      Ali Alfie (alal) authored
      
      Before: in Expense Categories list view, if Internal Notes wasn't empty it would  cause a padding issue. The issue's cause was that the Internal Notes columns is an HTML field, where every line is assigned a margin-bottom.
      
      Now: fixed the padding issue by removing the margin-bottom for the last line in the Internal Notes field.
      
      task-32999162
      
      closes odoo/odoo#120626
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      f6bffc09
    • Alvaro Fuentes's avatar
      [FIX] mail: allow to create a manual blacklist model · 136fb5b5
      Alvaro Fuentes authored
      Issue 1: before this patch it was impossible to create a manual model
      marked as "Is blacklist". The reason is that a blacklist model
      implicitly need an `email` field, but such field is impossible to add in
      a manual model: the field must start with `x_`.
      
      Solution: append `x_` to the implicit email field. Note, in principle
      the user gets an error if `x_email` is not present. Solved by adding the
      field when creating the custom model. Ideally we should show some hint
      in the interface to make it more user friendly. That is out of the scope
      of this patch.
      
      Issue 2: when we have a manual model that is mail blacklist it's
      impossible to create its model class. We get an error because the MRO is
      not correct. The reason is that we are adding `mail.thread.blacklist`
      _after_ `mail.thread` in the `_inherit` list. That list is used to
      generated the `__bases__` of the model class[1]. According to Python's
      MRO rules[2], since `mail.thread.blacklist` appears after `mail.thread`
      as parents of the custom model class this order _must_ be respected. But
      `mail.thread` must appear _before_ `mail.thread.blacklist` because the
      latter inherits from the former. This is a contradiction and the MRO
      algorithm cannot succeed. To put it in a simple example:
      ```py
      class A: pass
      class B(A): pass
       # This fails:
       # class C(A, B): pass
       # The right order is:
      class C(B, A): pass
       # Equivalent to:
      class D(B): pass
       # C and D have the same MRO linearization excluding themselves
      assert D.mro()[1:] == C.mro()[1:]
      ```
      Example traceback:
      ```
      Traceback (most recent call last):
        File "/home/odoo/src/odoo/14.0/odoo/service/server.py", line 1201, in preload_registries
          registry = Registry.new(dbname, update_module=update_module)
        File "/home/odoo/src/odoo/14.0/odoo/modules/registry.py", line 89, in new
          odoo.modules.load_modules(registry._db, force_demo, status, update_module)
        File "/home/odoo/src/odoo/14.0/odoo/modules/loading.py", line 464, in load_modules
          registry.setup_models(cr)
        File "/home/odoo/src/odoo/14.0/odoo/modules/registry.py", line 263, in setup_models
          env['ir.model']._add_manual_models()
        File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_model.py", line 430, in _add_manual_models
          Model = model_class._build_model(self.pool, cr)
        File "/home/odoo/src/odoo/14.0/odoo/models.py", line 585, in _build_model
          ModelClass.__bases__ = tuple(bases)
      TypeError: Cannot create a consistent method resolution
      order (MRO) for bases BaseModel, mail.thread, mail.thread.blacklist, base
      ```
      
      Solution: check if a model inherits from `mail.thread.blacklist` first.
      There is no need to add `mail.thread` if inheriting
      `mail.thread.blacklist` because the inheritance is already implicit.
      
      This issue was observed during upgrades. We convert custom models and
      fields into manual to allow upgrading without custom code. This causes
      issues because the MRO error appears when a custom model inherits mail
      blacklist.
      
      [1]: https://github.com/odoo/odoo/blob/02f820fb0eaddbb3a4269a0967184c8aaf52c363/odoo/models.py#L585
      [2]: https://www.python.org/download/releases/2.3/mro/
      
      
      
      closes odoo/odoo#120948
      
      X-original-commit: 8848bb57
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      Signed-off-by: default avatarAlvaro Fuentes Suarez (afu) <afu@odoo.com>
      136fb5b5
    • Thomas Lefebvre (thle)'s avatar
      [FIX] website_sale: clear old pricelist in the session · 7f1da074
      Thomas Lefebvre (thle) authored
      On the ecommerce, we want the pricelist to be adapted
      to the user who is connected.
      If no user is logged in, the 'Public Pricelist' is used.
      
      To determine the pricelist that will be used (by default):
      https://github.com/odoo/odoo/blob/a3169ede4f609b56c83da04756d20b1c7a07251f/addons/website_sale/controllers/main.py#L350-L354
      
      
      
      Therefore, if we have been to the shop as a 'Public user' and we decide to log in,
      we already have a pricelist in `request.session.get('website_sale_current_pl')`.
      
      So we have to clear the pricelist when we connect to determine the new pricelist
      of the user.
      
      opw-3228998
      
      closes odoo/odoo#118880
      
      Signed-off-by: default avatarLefebvre Thomas (thle) <thle@odoo.com>
      7f1da074
  2. May 09, 2023
  3. May 08, 2023
Loading