Skip to content
Snippets Groups Projects
  1. Sep 05, 2022
    • Yoshi Tashiro (Quartile)'s avatar
      [CLA] update quartile's members · 272b9ddc
      Yoshi Tashiro (Quartile) authored
      
      closes odoo/odoo#99588
      
      X-original-commit: 9e86d160
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      272b9ddc
    • Thibault Delavallée's avatar
      [FIX] mail: fix broken multi _message_compose_with_view · cccd8d40
      Thibault Delavallée authored
      
      Returning after first loop iteration has the sad side effect of
      somehow breaking batch version of methods.
      
      Oversight of odoo/odoo@0ea27f430c27716e9f995523f050ba70fa4befde
      
      closes odoo/odoo#99574
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      cccd8d40
    • Jeremy Kersten's avatar
      [FIX] web: show datetime localized in Metadata view from debug menu · a852ee1a
      Jeremy Kersten authored
      
      Before this commit, the dialog 'View Metadata' open the date in utc
      since the refactoring of Owl. It is not coherent with all others dates
      shown in form.
      
      Now we show the date in the timezone of the current user.
      
      Partial backport of #92108
      
      closes odoo/odoo#99570
      
      Signed-off-by: default avatarJérémy Kersten <jke@odoo.com>
      a852ee1a
    • mafo-odoo's avatar
      [FIX] hr_holidays: accross two years accrual plans period fail: · 781d98dc
      mafo-odoo authored
      
      Steps to reproduce:
      - Create Accrual plan to add 3 days with frequency Yearly on 1 of
      January and days lost at the end of the year
      - Submit an Allocation request for this accrual plan starting more than
      2 years ago
      - Run scheduled action "Accrual Time: Updates the number of time off"
      
      Current behavior:
      Allocation request calculation time off computes 0 hours
      
      Expected behavior:
      Allocation request calculation time off computes 3 hours for the
      period between the first of last year and the first of this year
      
      Explanation:
      With this modification there are two changes:
      
      1) When the attribution day is the first of january, the nextcall
      set in the _end_of_the_year_accrual is the first day of next
      year meaning that no days are going to be computed for the last
      year period. We change that so that if the first of the year is
      the attribution day then the first of the year is the nextcall and
      the last call is computed accordingly.
      
      2) If the period to compute the attributed days is acrros two years
      the begining of the period is not the first of the year anymore but
      the usual lastcall, this has an impact particularly on based on
      worked time accrual plans.
      
      opw-2948216
      
      closes odoo/odoo#99016
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      781d98dc
    • Mathieu Duckerts-Antoine's avatar
      [FIX] web: lower precedence for globalContext keys · f9762b59
      Mathieu Duckerts-Antoine authored
      
      Go to Project -> Reporting -> Timesheets and Planning Analysis and
      select other measures in the pivot view via the "Measures" menu.
      After that create a new favorite.
      
      Result: the favorite is saved with the correct measures but the
      pivot view will never use those measures. This is due to the presence
      of the key "pivot_measures" in the action context.
      
      (Note that the same problems occurs with other keys and other views)
      
      We fix that problem by giving less precedence to keys in action contexts
      with respect to those found in the search item contexts as it was
      originaly the case in legacy views (cfr. __get method in action_model.js).
      
      opw-2945969
      
      closes odoo/odoo#99557
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      f9762b59
    • Nasreddin Boulif (bon)'s avatar
      [FIX] web[_editor]: Apply RTL position to translate button · 56f620ff
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce:
      
        - Install Inventory
        - Open any product
        - Switch to RTL language
        - Edit the product
        - Try to translate field "Internal Note"
      
      Issue:
      
        Button is not displayed correctly (nearly hidden).
        Issue also present with wysiwyg or codeview editors.
      
      Cause:
      
        Applying style `right: 5px` to the button without taking into account
        if layout direction.
      
      Solution:
      
        On translate button:
        - Apply direction left for side-space if RTL, else right.
        - If wysiwyg is enabled, add it after the buttons in the sidebar.
      
      opw-2962790
      
      closes odoo/odoo#98963
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      56f620ff
    • Victor Piryns (pivi)'s avatar
      [FIX] web: prevent hanging while previewing PDF on Firefox · d6e5716f
      Victor Piryns (pivi) authored
      
      When we create a pdf preview in the mail generation (from a quotation), on
      Firefox the promise doesn't get resolved (the server response is 200), it
      may have something to do with the transition from legacy JS -> Owl.
      This patch is providing a workaround by opening the links in a new tab,
      those tabs are automatically closed by themselves and solves the issue/doesn't
      alter the UX.
      
      Affected versions:
      - 15.0
      - 15.2
      
      opw-2964376
      
      closes odoo/odoo#99341
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      d6e5716f
  2. Sep 04, 2022
  3. Sep 03, 2022
    • Nasreddin Boulif (bon)'s avatar
      [FIX] purchase: Update price unit on new line even if confirmed RFQ · 0c19d088
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce:
      
        - Install purchase
        - Go to Settings and activate `Variant Grid Entry`
        - Create a new Requests for Quotation
        - Add a customer and add a product that has a variant min 2 variant
        - Wizard should ask for the variant
        - Select 1 variant by increasing quantity in the grid and confirm
        - Confirm order
        - Add again a product variant with the wizard
      
      Issue:
      
        Price unit is not set on the new line.
      
      Cause:
      
        In `_onchange_quantity` (triggered by the purchase_product_matrix
        module), we do not update price unit if order line
        is in state `purchase` or `done`.
      
      Solution:
      
        Replace condition to not perform `_onchange_quantity` if order line
        has an invoice line.
      
      opw-2956755
      
      closes odoo/odoo#99519
      
      X-original-commit: a5632601
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      Signed-off-by: default avatarNasreddin Boulif (bon) <bon@odoo.com>
      0c19d088
    • Nasreddin Boulif (bon)'s avatar
      [FIX] pos_sale: display weight for product product in sales report · 71329db1
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce:
      
        - Install pos_sale module
        - Create a product and set it as available in POS
        - Create 2 variants and set a weight for each variant
        - Open a POS session and make an order with one of the variants
        - Go to the Sales -> Reporting -> Sales and select view pivot
        - Set Gross Weight as measure
      
      Issue:
      
        Weight for ordered variant is set to 0.
      
      Cause:
      
        Sales Analysis is an SQL view and it use product template in instead
        of product product to get the weight value.
      
      opw-2956457
      
      closes odoo/odoo#99500
      
      X-original-commit: 3d5e2764
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      Signed-off-by: default avatarNasreddin Boulif (bon) <bon@odoo.com>
      71329db1
  4. Sep 02, 2022
  5. Sep 01, 2022
  6. Aug 31, 2022
  7. Aug 30, 2022
    • Julien Van Roy's avatar
      [FIX] account_edi_ubl_cii: fix constraint · 62e6b3c0
      Julien Van Roy authored
      
      The constraint can crash if the zip is not defined.
      Check that the zip exists to prevent the error.
      
      closes odoo/odoo#99226
      
      X-original-commit: bc9fb51b
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      Signed-off-by: default avatarJulien Van Roy <juvr@odoo.com>
      62e6b3c0
    • MerlinGuillaume's avatar
      [FIX] point_of_sale: show orders with correct tax from fiscal position · 7b3320db
      MerlinGuillaume authored
      
      Orders in POS all use the same fiscal position (the fiscal position
      currently selected in the POS) so their tax might be wrong if the order
      used another fiscal position that applies another tax mapping
      
      Steps to reproduce:
      1. Install Point of Sale
      2. Go to Invoicing > Configuration > Accounting > Fiscal Positions and
         create a fiscal position 'Test' with a tax mapping from 'Tax 15.00%
         (Sales)' to 'Tax 10.00% (Sales)' (that you should create)
      3. Go to Point of Sale and edit 'Shop' settings
      4. Enable 'Manage Orders' and 'Fiscal Position per Order' and add fiscal
         position 'Test'
      5. Go to Products and add 'Tax 15.00%' to the Customer Taxes of product
         'Acoustic Bloc Screens'
      6. Open a new session in POS 'Shop'
      7. Add 'Acoustic Bloc Screens' to the order with fiscal position 'Test'
         and validate it (total is $3,245.00)
      8. Click on 'New Order' and then on the order management button
         (magnifying glass in the top right)
      9. The order total is $3,392.50, if you go back and select the fiscal
         position 'Test', the order will have the correct total in the order
         management screen
      
      Solution:
      When we compute the taxes of an order, apply the tax mapping of the
      fiscal position used on the order
      
      Problem:
      The taxes applied on the orders are all computed with the fiscal
      position of the POS
      
      opw-2956608
      
      closes odoo/odoo#99236
      
      X-original-commit: 30ca2849
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      Signed-off-by: default avatarGuillaume Merlin (megu) <megu@odoo.com>
      7b3320db
    • Xavier BOL (xbo)'s avatar
      [FIX] project: cannot change stage if stage contains rating email · c5093988
      Xavier BOL (xbo) authored
      
      Before this commit, when the portal user changes the stage of a task and
      the new stage contains a rating template email, he got a traceback
      saying he has no access to `mail.template` model.
      
      This commit fixes the issue by sending the email in superuser when we
      are sure the user can write on that task.
      
      Steps to reproduce:
      ==================
      
      1) Enable the rating feature in the settings of Project App
      2) Create a Project A and edit it to enable the rating feature on that
      project and select "Rating when changing stage" (if it is not already
      the case)
      3) Set a rating email template on a stage of the project
      4) Create a new task and save
      5) Change the stage of that task to the stage contained the rating email
      template
      
      Actual Behavior:
      ---------------
      A traceback is occurred saying the user has no access to `mail.template`
      model.
      
      Expected Behavior:
      -----------------
      The stage of the task should be changed and the rating email should be
      sent.
      
      closes odoo/odoo#99215
      
      Signed-off-by: default avatarLaurent Stukkens (ltu) <ltu@odoo.com>
      c5093988
    • Odoo's Mergebot's avatar
      [MERGE][FIX] mail: allow normal users to view mail template preview · a5f522dd
      Odoo's Mergebot authored
      
      **Template Access Issue**
      
      Followup of odoo/odoo@1a3e713c99474951cb5000c55a2382ba12074273
      
      Bug
      ===
      
      If the user doesn't have the template editor, he cannot open the template
      preview.
      
      Technical
      =========
      
      The reason for that is because the web editor moves some CSS properties,
      and so when the user tries to open the preview, an access error is raised.
      
      1. Ideally, the template form view should not be editable if the access
      rules do not allow it. But in `_postprocess_tag_field`, we only check
      for access right because we don't have the record. So a user without
      write access rules, but having write access right can edit the template
      in the UI, and gets an error when saving.
      
      2. Also, the web editor should not save the HTML value if no change are
      made on the field (like all other text / char field).
      
      To mitigate the issue in stable, we add a computed field that check the
      access rules and make the body readonly if he can not edit the template.
      So the web editor is not loaded, the CSS properties are not moved. Other
      possible solutions are way to complex technically speaking (editor internals
      to update in frontend, complex comparison of html blobs in backend, cache
      usage making fields_view_get override not working in all cases, ... )
      
      As the HTML body look weird in readonly mode, add the same border as the web
      editor.
      
      **Ir.Model Issue**
      
      A user without administration right can not preview a mail template because
      of the ACl on the <ir.model>.
      
      Task-2845877
      
      closes odoo/odoo#94418
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      a5f522dd
    • std-odoo's avatar
      [FIX] mail: allow a normal user to view the mail template preview · b4dfda97
      std-odoo authored
      Bug
      ===
      A user without administration right can not preview a mail template because
      of the ACl on the <ir.model>.
      
      Task-2845877
      
      Part-of: odoo/odoo#94418
      b4dfda97
    • std-odoo's avatar
      [FIX] mail: allow a normal user to view the template body · 2bb148f9
      std-odoo authored
      Followup of odoo/odoo@1a3e713
      
      Bug
      ===
      If the user doesn't have the template editor, he cannot open the template
      preview.
      
      Technical
      =========
      The reason for that is because the web editor moves some CSS properties,
      and so when the user tries to open the preview, an access error is raised.
      
      Ideally, the template form view should not be editable if the access
      rules do not allow it. But in _postprocess_tag_field, we only check
      for access right because we don't have the record. So a user without
      write access rules, but having write access right can edit the template
      in the UI, and gets an error when saving.
      
      Also, the web editor should not save the HTML value if no change are
      made on the field (like all other text / char field).
      
      To mitigate the issue in stable, we add a computed field that check the
      access rules and make the body readonly if he can not edit the template.
      So the web editor is not loaded, the CSS properties are not moved. Other
      possible solutions are way to complex technically speaking (editor internals
      to update in frontend, complex comparison of html blobs in backend, cache
      usage making fields_view_get override not working in all cases, ... )
      
      As the HTML body look weird in readonly mode, add the same border as the web
      editor.
      
      Task-2845877
      
      Part-of: odoo/odoo#94418
      2bb148f9
    • Jinjiu Liu's avatar
      [FIX] hr_timesheet: calculate effective_hours on all users' hours · c940d968
      Jinjiu Liu authored
      
      Reproduction:
      1. Install Timesheet, and Project, check the timesheet box in the
      setting of Project
      2. Go to Setting->manage users, set access right for Marc Demo, Project
      as “User”, Timesheets as “See own timesheets”, and Helpdesk	as “User”
      3. Go to Project, create a task and assign it to Marc Demo, go to the
      timesheet tab, set Initially Planned Hours as 20 hours, click save
      4. Open an incognito page and log in as Marc Demo, go to this new task->
      timesheet, edit, log 5 hours, save. Hour spent is now 5
      5. Switch back to Mitchell Admin, refresh the task page, edit, log 3
      hours, save. Hour spent is now 8.
      6. Switch to the incognito page of Marc Demo, edit, log 2 hours and save
      Hour spent is now 7, which doesn’t consider the hours logged by Mitchell
      The right result should be 10 hours.
      7. Switch back as Mitchell Demo, the spent hours are also wrong
      
      Reason: The cause is that effective_hours is a stored computed field.
      When Marc Demo logs hours after Mithcell Admin, the hours from Mitchell
      do not show for Marc Demo. Marc Demo cannot get the hours from other
      users because he can only see his own timesheet. Thus the computation is
      wrong and because it’s a stored computed field, it won’t change even
      after switching back to Mitchell Admin
      
      Fix: Use read_group to get the grouped by value of the amount spent on
      the task. This makes sure that the value of Hours spent is correctly
      computed after saving. It also allows the onchange to take the change
      made by the user into account before saving.
      
      opw-2909444
      
      closes odoo/odoo#99186
      
      X-original-commit: 2033f113
      Signed-off-by: default avatarLaurent Stukkens (ltu) <ltu@odoo.com>
      Signed-off-by: default avatarLiu Jinjiu (jili) <jili@odoo.com>
      c940d968
    • Guillaume (guva)'s avatar
      [FIX] account: allow change account on tax line · 097f2d13
      Guillaume (guva) authored
      
      Before this commit, in invoice/bill, when changing
      the account of a tax line while having one of the invoice
      lines with tax 0%, the tax line was not displayed anymore.
      
      The cause of the issue is that in _recompute_dynamic_lines
      method, when setting the tax repartition lines to
      recompute, we did not filter the 0 tax. The consequence was
      that we had a delta between expected and current taxes,
      although the line of tax 0% was not displayed anyway.
      By filtering the 0 tax, we have expected taxes == current taxes,
      so we do not have delta anymore, therefore no tax line to recompute.
      
      opw-2901833
      
      closes odoo/odoo#99085
      
      X-original-commit: adf34254
      Signed-off-by: default avatarFlorian Gilbert (flg) <flg@odoo.com>
      Signed-off-by: default avatarGuillaume Vanleynseele (guva) <guva@odoo.com>
      097f2d13
  8. Aug 29, 2022
Loading