Skip to content
Snippets Groups Projects
  1. Dec 05, 2022
  2. Dec 04, 2022
  3. Dec 03, 2022
  4. Dec 02, 2022
    • Sébastien Geelen (sge)'s avatar
      [FIX] web_editor: fix commands in inline · 3776faa1
      Sébastien Geelen (sge) authored
      
      Some commands from the powerBox command bar were not working
      properly in the e-shop product "terms and conditions" section.
      
      This was due to the isolation of Odoo fields
      inside the odoo editor as a all.
      Those fields do not always have an editable block element
      to apply the command on.
      
      We disable some commands that should not be apear in this context.
      
      We also remove a redundant command (separator) in website pages.
      
      task-2962067
      
      closes odoo/odoo#107037
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      3776faa1
    • Denis Ledoux's avatar
      [FIX] base: continue stack post-processing after adding `<t groups=` · c163cbb6
      Denis Ledoux authored
      
      In a view, in the case of a field node combining
      - a `groups` attribute on the field node in the view architecture
      - a `groups` attribute on the field in the Python model
      
      e.g.
      ```py
      name = fields.Char(groups='base.group_system')
      ```
      ```xml
      <field name="name" groups="base.group_multi_company"/>
      ```
      
      The view post-processing adds a temporary `<t groups` block.
      e.g.
      ```xml
      <t groups="base.group_system">
          <field name="base.group_multi_company"/>
      </t>
      ```
      This is to make an `AND` connection with the two groups:
      the user is required to have both groups in order to see the field.
      Currently, there is no way to make that `AND` combination on the same
      node. The below:
      ```xml
      <field name="name" groups="base.group_system,base.group_multi_company"/>
      ```
      would be an `OR` connection, not an `AND.`
      Hence this temporary added `<t groups=""`.
      
      Before this revision, in such a case,
      the stack post-processing was interrupted by an unexpected side-effect:
      The field node changes of parent (the parent becomes that `t` block),
      and a condition attempting to check that the node wasn't deleted from
      the view actually checked that the parent changed, to decide to
      interrupt the rest of the stack post-processing, including the modifiers
      post-processing for that node.
      
      This revision changes this behavior,
      to check the field node no longer has a parent,
      instead of a change of parent,
      to decide that the node is indeed no longer in the view,
      and to interrupt the stack post-processing or not.
      
      This allow the field modifiers (e.g. `attrs=""`) to be post-processed
      as expected.
      
      opw-3072910
      
      closes odoo/odoo#106876
      
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      c163cbb6
    • qsm-odoo's avatar
      [FIX] web_editor, website: add cover/contain option for grid images · faf19ef7
      qsm-odoo authored
      
      As a fix, this introduces a new option for images in grid mode. When an
      image is alone in a column which later becomes a grid item, or when an
      image is directly added as a grid item via the dedicated option, the
      image used `object-fit: cover` so that when the image is resized as a
      grid item, it fits the dimensions of the selected grid area.
      
      This confused some users as the image did not appear the same depending
      on the screen size. Indeed, if an image is set to take 5 columns as
      width and 3 rows as height, it does not ensure the ratio in pixels to
      stay the same depending on the screen size: the grid is always made of
      12 columns (so the width of each column depends on the screen width),
      while the rows are always 50px tall. We could enforce the ratio of grid
      items to stay the same or limit the ratio loss by reducing the 50px
      height on smaller breakpoints but that would actually increase another
      problem: for colored text grid items, their text would more easily
      overflow their fixed area.
      
      In the end, using the grid mode is about compromises, even if it allows
      to achieve nice things and to have more freedom. This commit although
      adds a new option to mitigate the issue for images: users now have the
      possibility to switch the default "cover" mode of grid images to
      "contain": in that mode, the whole image will always be visible (and
      thus keeps the same ratio) and is just "contained" in the grid area
      which is selected as dimension.
      
      opw-3069234
      
      closes odoo/odoo#106807
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      faf19ef7
    • Soukéina Bojabza's avatar
      [FIX] web_editor: display grid mode mobile view for higher screen sizes · 1ec3c472
      Soukéina Bojabza authored
      When we are in grid mode, if we decrease the screen size small enough,
      the display is back to `flex` and the columns are displayed one above
      another (-> mobile view). However, the columns in normal mode do that
      for screen sizes higher than the breakpoint set for the ones in grid
      mode, which is inconsistent. Moreover, as the images have their
      `object-fit` property set to `cover`, they become really deformed and
      therefore do not look good.
      
      This commit solves these issues by increasing the breakpoint at which
      the grid mode switches to the mobile view, that is, from `md` to `lg`.
      
      opw-3069234
      
      Part-of: odoo/odoo#106807
      1ec3c472
    • oco-odoo's avatar
      [FIX] l10n_th: fix tax report formulas · e0cd7020
      oco-odoo authored
      
      Some formulas had not been properly converted to the new format introduced in 16.0. The report crashed when opening it.
      
      OPW 3064180
      
      closes odoo/odoo#106302
      
      Related: odoo/enterprise#34279
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      e0cd7020
    • Florent de Labarre's avatar
      [FIX] stock_account: method doesn't wok with a recordset · a5b985e8
      Florent de Labarre authored
      
      If you try to get show_reset_to_draft_button for more than one account.move, it can raise.
      
      closes odoo/odoo#106290
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      a5b985e8
    • arsi's avatar
      [FIX] mrp_subcontracting: add subcontracting loc for archived company · 1dcdbe9e
      arsi authored
      
      The problem is that when you archive a company and then install
      subcontracting, you get a traceback.
      
      Step to reproduce (in a multi-company environment):
      -install 'stock'
      -archive a company
      -install 'mrp_subcontracting'
      -->traceback
      
      Explanation:
      When installing the 'mrp_subcontracting', there's a search on all
      (active) companies in order to add a subcontracting location for each
      of them (this is is triggered by
      '/odoo/addons/mrp_subcontracting/data/mrp_subcontracting_data.xml').
      But there is still a warehouse linked to the archived company.
      So when adding routes to all warehouses and looking for the
      subcontracting location of the archived company, it is set to
      False.  Which is not intended and causes the traceback.
      
      Solution:
      Add '.with_context(active_test=False)' to the search for the companies
      in '_create_missing_subcontracting_location(self)', so the missing
      subcontracting location will be created for the archived companies too.
      
      Discussion:
      -The ability to archive companies is new to Odoo16 (implemented due to
      the new pricing).
      -Here I considered that we want to create a subcontracting location for
      an archived company instead of taking action on the warehouse linked to
      the archived company (like not considering it when creating routes).
      I did this because a company can be unarchived and with this fix, it
      will not cause issues.
      -I think other problems similar to this one (in any app), should appear
      in the future.
      
      opw-3039495
      
      closes odoo/odoo#106219
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      1dcdbe9e
    • Habib (ayh)'s avatar
      [FIX] account: import notification · 6b5dd239
      Habib (ayh) authored
      
      Since mail.thread was removed from the account.bank.statement, the message_post code was causing a crash when attempting to import duplicate transactions.
      This commit retrieves the messages from the returned action and displays them using the notification service
      
      task-3044636
      
      closes odoo/odoo#106168
      
      Related: odoo/enterprise#34191
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      6b5dd239
    • gawa-odoo's avatar
      [IMP] analytic, *: block validation with mandatory plan · 8623a785
      gawa-odoo authored
      
      * = {account, sale, purchase, hr_expense}
      When a plan is mandatory for SOL, POL or expenses, the flow should still be blocked when pressing the button, and not only when creating analytic lines.
      
      We add the info in the context of the button, so automatic flows are still not blocked.
      
      When the applicability rule requires a mandatory analytic distribution, raise an error upon :
      - confirming PO,
      - sending or confirming SO
      - approving Expense Report by manager.
      
      t-3040929
      
      closes odoo/odoo#104147
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      8623a785
    • gawa-odoo's avatar
      [FIX] analytic: field None should not validate model · feff1a8a
      gawa-odoo authored
      
      If an aml has no product, it should not trigger a model that has a product.
      So, we now define the fields that have to be checked on the model, instead of just being the ones given as parameters.
      
      The way the field `company_id` impacts the model has also been changed.
      The idea is that a model with a company specified should be better than a model without one.
      But we also want that a model with 1 valid rule and no company is better than one with only a good selected company.
      
      closes odoo/odoo#103787
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      feff1a8a
    • william's avatar
      [FIX] account: performance of search panel · 26dd1d96
      william authored
      
      This fixes the performance of the search panel of `account.move.line`
      Menu > Accounting > Accounting > Journal Items
      The control panel based on the accounts' roots was the issue (call to
      `search_panel_select_range`)
      
      Before this fix, the entire table was read through the use of a
      `read_group`.
      Since the data returned by the `read_group` is not interresting in our
      case, we can simply do a lateral join on an indexed column with a limit
      in order to improve the performances.
      
      closes odoo/odoo#103564
      
      Signed-off-by: default avatarQuentin De Paoli <qdp@odoo.com>
      26dd1d96
    • Katherine Zaoral's avatar
      [ADD] l10n_latam_check: Checks Management · cbec68b4
      Katherine Zaoral authored
      
      New features to manage checks and managed them Odoo in latam countries
      where they are widely use.
      
      Own Checks Management
      ---------------------
      
      Extends 'Check Printing Base' module to manage own checks with more features:
      
      * allow using own checks that are not printed but filled manually by the user
      * allow to use deferred or electronic checks
        * printing is disabled
        * check number is set manually by the user
      * add an optional "Check Cash-In Date" for post-dated checks (deferred payments)
      * add a menu to track own checks
      
      Third Party Checks Management
      -----------------------------
      
      Add new "Third party check Management" feature.
      
      There are 2 main Payment Methods additions:
      
      * New Third Party Checks:
      
         * allow the user create a check on the fly from a payment
         * create a third party check from a customer payment
      
      * Existing Third party check:
      
         * allow the user to reuse a Third party check already created
         * pay a vendor bill using an existing Third party check
         * move an existing checks between journals (i.e. move to Rejected)
         * Send/Receive again a check already used in a Vendor Bill/Customer INV
         * allow the user to do mass check transfers
      
      closes odoo/odoo#96074
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      cbec68b4
    • Katherine Zaoral's avatar
      [IMP] account, account_check_printing: latam adapt · 93949038
      Katherine Zaoral authored
      In order to make this modules to also match new module l10n_latam_check.
      
      * refactory of some methods to make it more heritable
      * check number now is showed only when is defined and is related to
      check_printing payment method.
      
      Part-of: odoo/odoo#96074
      93949038
    • Patrick Hoste's avatar
      [FIX] crm,website_slides: fix grouped kanban view · f7a2928a
      Patrick Hoste authored
      
      This commit fix the issue where the slide content records,
      crm team records and crm team members records were
      overlapping on other group.
      This was introduced by odoo/odoo#105531
      
      Task-3086887
      
      closes odoo/odoo#106921
      
      Signed-off-by: default avatarWarnon Aurélien (awa) <awa@odoo.com>
      f7a2928a
    • Adrien Widart (awt)'s avatar
      [FIX] purchase_stock,stock_account: convert UoM for price diff · a1906f0b
      Adrien Widart (awt) authored
      When confirming a bill with a price diff, if the UoM of the bill
      line is not the default UoM of the product, the values will be incorrect
      
      To reproduce the issue:
      (Need account_accountant)
      1. In Settings, enable 'Units of Measure'
      2. Create a product category PC:
         - Costing Method: FIFO
         - Inventory Valuation: Automated
      3. Create a product P
         - Type: Storable
         - Category: PC
      4. Create and confirm a PO with
         - 1 Dozen x P at $50
      5. Process the receipt R01
      6. Create and process the return RT01 of R01
      7. Create and process the return RT02 of RT01
      8. Create the bill related to PO
      9. Set the bill line price to $60
      10. Confirm
      11. Open the valuation of P
      
      Error: a stock valuation layer has been created because of the price
      diff, which is correct, however the value is not the good one: $670
      instead of $10 ($60 - $50)
      
      When confirming the bill, we check if there is a price difference.
      To do so, we compare the price unit of the bill line with the one of
      the incoming layer:
      https://github.com/odoo/odoo/blob/d3d41c7679f9068a7b986925b15d0d7670233bfc/addons/stock_account/models/account_move.py#L304
      
      
      But, currently, the price unit of the bill line is based on the UoM
      of the line while the price unit of the layer is based on the
      default UoM of the product. We need to convert the PU of the bill line
      
      OPW-3081449
      OPW-3062433
      OPW-3075917
      OPW-3048587
      OPW-3078429
      OPW-3075627
      
      closes odoo/odoo#106665
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      a1906f0b
    • Adrien Widart (awt)'s avatar
      [FIX] purchase_stock,stock_account: convert currency for price diff · 86ca91c3
      Adrien Widart (awt) authored
      When confirming a bill, if its currency is not the one of the
      company, and if there is a price diff, the value of the generated
      SVL will be incorrect
      
      To reproduce the issue:
      (Need account_accountant)
      1. Edit the currency of EUR:
         - Rate: 2.0
      2. Create a product category PC:
         - Costing Method: FIFO
         - Inventory Valuation: Automated
      3. Create a product P
         - Type: Storable
         - Category: PC
      4. Create and confirm a PO with
         - 1 x P at $50
      5. Process the receipt R01
      6. Create and process the return RT01 of R01
      7. Create and process the return RT02 of RT01
      8. Create the bill related to PO
      9. Edit the bill:
         - Currency: EUR
         - Price unit: 120
      10. Confirm
      11. Open the valuation of P
      
      Error: a stock valuation layer has been created because of the price
      diff, which is correct, however the value is not the good one: $70
      instead of $10 ($60 - $50)
      
      When confirming the bill, we check if there is a price difference.
      To do so, we compare the price unit of the bill line with the one of
      the incoming layer:
      https://github.com/odoo/odoo/blob/d3d41c7679f9068a7b986925b15d0d7670233bfc/addons/stock_account/models/account_move.py#L304
      But, currently, the price unit of the bill line is based on currency
      of the account move wile the price unit of the layer is based in the
      currency of the company.
      
      Related to OPW-3040171
      
      Part-of: odoo/odoo#106665
      86ca91c3
    • Adrien Widart (awt)'s avatar
      [FIX] purchase_stock,stock_account: create only one SVL for price diff · 18912b05
      Adrien Widart (awt) authored
      When confirming a bill with a price diff, if the user received, returned
      and received again the products, some unexpected valuation layers will
      be generated
      
      To reproduce the issue:
      (Need account_accountant, sale_management)
      1. Create a product category PC:
         - Costing Method: FIFO
         - Inventory Valuation: Automated
      2. Create a product P
         - Type: Storable
         - Category: PC
      3. Create and confirm a PO with
         - 3 x P at $50
      4. Process the receipt R01
      5. Create and process the return RT01 of R01
      6. Create and process the return RT02 of RT01
      7. Create and confirm a SO with
         - 1 X P
      8. Process the delivery
      9. Create the bill related to PO
      10. Set the bill line unit price to $60
      11. Confirm
      12. Open the valuation of P
      
      Error: There are two lines for the price difference, there should be
      one line only. Moreover, the value is incorrect: 30 instead of 10 (i.e.
      we should generate the price diff layer for the quantities in
      stock only)
      
      When confirming the bill, we check if we have to generate some
      additional SVL (in case of price diff)
      https://github.com/odoo/odoo/blob/d3d41c7679f9068a7b986925b15d0d7670233bfc/addons/stock_account/models/account_move.py#L288-L305
      But, we get all ingoing SVL and process them, we don't consider that the
      quantity of a SVL might actually be returned and should be ignored.
      This is the reason why a SVL is created for the first receipt. This
      also explains why the value is incorrect (we use the quantity of the
      SVL instead of its remaining quantity)
      
      OPW-3040171
      
      Part-of: odoo/odoo#106665
      18912b05
    • Antoine Guenet's avatar
      [FIX] web_editor: check if closestElement returns element · eb1fa8ca
      Antoine Guenet authored
      
      `getInSelection` had a check that depended on `closestElement` returning
      an element (and not `undefined` or `null`).
      
      closes odoo/odoo#107058
      
      X-original-commit: 0eeff826
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      eb1fa8ca
Loading