Skip to content
Snippets Groups Projects
  1. Sep 22, 2022
    • Katherine Zaoral's avatar
      [FIX] sale_stock: Compute lots only when nedeed · 4dcb0319
      Katherine Zaoral authored
      
      Only compute the lot values info on stockable or consu (kits) products
      on the invoice lines
      
      closes odoo/odoo#100663
      
      X-original-commit: affc9abb
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      4dcb0319
    • Yannick Tivisse's avatar
      [FIX] website_sale: add missing method check · 89bbb6b7
      Yannick Tivisse authored
      Backport of https://github.com/odoo/odoo/commit/c88f76cab7a1292e6fff3bd77441a9845b8173c8
      
       because it could lead to a traceback in the case a GET wasn't supposed to receive this kind of format as request answer.
      
      closes odoo/odoo#100674
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      89bbb6b7
    • Adrien Widart's avatar
      [FIX] mrp: add operation field on kanban view · 3c99b038
      Adrien Widart authored
      When creating a MO with some WO from a mobile, the quality checks are
      not created
      
      To reproduce the issue:
      (Need quality_control)
      1. Create two storable products P_compo, P_finished
      2. Create a BoM:
          - Product: P_finished
          - Components: 1 x P_compo
          - Operations: create a new operation OP
      3. Add a step to OP:
          - Type: Pass - Fail
      4. Switch into mobile mode
      5. Create a MO for 1 x P_finished
      6. Confirm it
      7. Open the WO
      
      Error: the tablet view skipped the pass-fail step, the user can already
      mark the MO as done and close it
      
      When confirming the MO, it leads to the quality checks creation. To do
      so, we iterate on the `quality_point_ids` of the WO to generate these
      quality checks:
      https://github.com/odoo/enterprise/blob/7ff0f43df777027bf8544be3ac95e76feb7da957/mrp_workorder/models/mrp_workorder.py#L406
      But, the WO has not any quality point, which is incorrect: it should
      have the one related to the step created on the operation P. This field
      is a computed one and is based on the quality points defined on the
      operation linked to the WO:
      https://github.com/odoo/enterprise/blob/7ff0f43df777027bf8544be3ac95e76feb7da957/mrp_workorder/models/mrp_workorder.py#L70-L73
      
      
      But again, there is an issue: the WO has not any defined operation
      (which is incorrect, it should be linked to OP). And this is because of
      the WO creation from the kanban view: the field `operation_id` is
      missing so it is not defined during the WO creation.
      
      OPW-2984037
      
      closes odoo/odoo#100672
      
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      3c99b038
    • MerlinGuillaume's avatar
      [FIX] mrp: keep end time and duration consistent when moving work order · 7a5a54cb
      MerlinGuillaume authored
      
      When drag and dropping a work order in the Work Orders Planning, the
      end time wasn't recomputed. This can make the end time inconsistent with
      the duration when the work order spans across a non-working time.
      
      Steps to reproduce:
      1. Install Manufacturing
      2. Go to Settings > Manufacturing > Operations and enable Work Orders
      3. Go to Manufacturing > Master Data > Routings and edit routing
         'Primary Assembly' to last 120:00 minutes
      4. Go to Manufacturing > Operations > Manufacturing Orders and create
         one with values:
         - Product: Table Top
         - Plan From: today's date at 11:00:00
      5. Save, mark as todo and plan the manufacturing order
      6. Go to Manufacturing > Planning > Planning by Workcenter and trigger
         the day view
      7. Move the work order to 8 am
      8. The work order still lasts for 3 hours (according to its start and
         finish time) even though its expected duration is 2 hours
      
      Solution:
      Recompute `date_planned_finished` when we move a work order in the
      planning (`date_planned_start` and `date_planned_finished` are passed in
      values), and recompute `expected_duration` when we extend it (only one
      of them is passed depending on the way we extend the work order).
      (`duration_expected` is never passed in values when we manipulate a work
      order through the planning)
      
      Problem:
      `date_planned_finished` wasn't recomputed when moving the work order in
      the planning
      
      opw-2893622
      
      closes odoo/odoo#100540
      
      X-original-commit: 90f83914
      Related: odoo/enterprise#31547
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      Signed-off-by: default avatarGuillaume Merlin (megu) <megu@odoo.com>
      7a5a54cb
    • Romain Derie's avatar
      [FIX] website: remove the handler in the destroy · a221342c
      Romain Derie authored
      
      What is done in start should be undone in the destroy.
      
      closes odoo/odoo#100420
      
      X-original-commit: 6f5fc1a2
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      a221342c
    • Thomas Beckers's avatar
      [FIX] Ignore CABA moves when checking 'Reversed' state on invoice · 7fbb337e
      Thomas Beckers authored
      
      To check if the state 'Reversed' should be set on an invoice. We checked that the full reconciliation moves
      only contain the invoice, the reverse move and the potential exchange move. However, it's possible to have
      also some CABA moves for the invoice and credit note when the tax used have a CABA transition account which
      is reconcilable (eg. tax "IVA(16%) VENTAS"). So if this append the status 'Paid' will be set instead.
      
      Now, we take into account those CABA moves and the status will be set to 'Reversed' accordingly.
      
      opw-2976667
      
      closes odoo/odoo#100380
      
      Signed-off-by: default avatarOlivier Colson (oco) <oco@odoo.com>
      7fbb337e
    • jbw-odoo's avatar
      [FIX] l10n_it_edi: handle negative unit price · d31d562a
      jbw-odoo authored
      
      Before this fix negative aml unit prices were systematically set to positive in the edi xml generating inconsistencies.
      
      closes odoo/odoo#100598
      
      Task: opw-2963947
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      d31d562a
    • Hubert Van de Walle (huvw)'s avatar
      [FIX] calendar: duplicated emails when creating allday meeting · 00591c66
      Hubert Van de Walle (huvw) authored
      
      Steps to reproduce:
      
        - Switch to debug mode
        - Go to calendar
        - Create an allday event in the future named test
        - Add an attendee with an email address
        - Save
        - Go to Settings > Technical > Email > Emails
      
        Two emails have been sent:
        * Invitation to test
        * test: Date updated
      
      Cause of the issue:
      
        The method `_inverse_dates` is called when creating an event,
        triggering a write on the start field.
        This then causes an update email to be sent
      
      Solution:
      
        Add a context key and don't send the update email if it is present
      
      opw-2841276
      
      closes odoo/odoo#100275
      
      Signed-off-by: default avatarArnaud Joset <arj@odoo.com>
      00591c66
  2. Sep 21, 2022
    • Touati Djamel (otd)'s avatar
      [FIX] l10n_it_stock_ddt: calculate link between invoice and deliveries · 23a18bc1
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      - Install [l10n_it_ddt]
      - Create a storable product “P1”
      - Create a SO for “P1” with qty 3
      - Deliver 1 unit and create a backorder
      - Generate the invoice for the delivered qty: 1
      - Post the invoice
      - smart button with the link to DDT n°1 appears
      - Deliver the remaining 2 units
      - Create the second invoice
      - Post the invoice
      
      Problem:
      The link to DDT appears but with the 2 pickings, whereas in this case
      only the 2nd picking is linked to the invoice.
      
      Before using the `account.move.line` records, we sorted them by date
      in order to always use the first created one to link it with the first
      picking created, however if two `account.move.line` were created in
      the same days, they will be ordered randomly, so we also have to
      sort them by id if the date is the same.
      
      opw-2968401
      
      closes odoo/odoo#100294
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      23a18bc1
    • Demesmaeker's avatar
      [FIX] sale_product_matrix: ensure SO is saved · 637c6d65
      Demesmaeker authored
      
      Manual action "click" was wrongly took off in
      c650faaaf77fe99559a23a4d68fae56b498d8c89 and browser was sometimes
      closed before the default click action ran. For clarity purpose, a step
      is added to ensure the form is saved in place of the manual click.
      
      closes odoo/odoo#100725
      
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      637c6d65
  3. Sep 20, 2022
  4. Sep 19, 2022
    • Arnaud Joset's avatar
      [FIX] calendar: default recurrence value were not properly set · 7a6fa761
      Arnaud Joset authored
      
      Before this commit, when an event was set to recurrent, all the recurrence
      values were falsy. They were not equal to the default values.
      
      opw-2886253
      
      closes odoo/odoo#97012
      
      Signed-off-by: default avatarPedram Bi Ria (pebr) <pebr@odoo.com>
      7a6fa761
    • pedrambiria's avatar
      [FIX] google_calendar: not sending emails to existing event attendees · d3c1a0aa
      pedrambiria authored
      Before this commit: syncing with google led to sending emails to
      attendees of existing future events on Odoo.
      
      Steps to reproduce the first issue:
      
      - Install 'google_calendar' module
      - Integrate with Google Calendar in setting
      - Add an event to the Odoo calendar for future date
      - Add one external attendee to the event
      - Sync with Google
      
      Invitation emails would be sent to the attendees of the events.
      Solution
      
      It's possible to not send emails to the attendees in api calls. So
      the solution is to not send emails to the attendees for the syncing
      time.
      opw-2819046
      
      Part-of: odoo/odoo#97012
      d3c1a0aa
    • Walid HANNICHE (waha)'s avatar
      [FIX] payment: fix payment processing payment_redirect · 256752df
      Walid HANNICHE (waha) authored
      Steps to reproduce:
      - create and send a quotation
      - make a failed payment (through cutomer preview)
      - create and send a second quotation to the same customer
      - make a succesful payment this time
      - redirect takes to the wrong quotation (failed one)
      
      Bug:
      polling the processed payments initially returns both transaction
      but the following polls only returns the rejected payment
      (introduced in [1] processed transactions are filtered out)
      since there's only a single transaction, redirect takes to it
      
      Fix:
      if there's only a single succesful transaction (regardless of the rest)
      it means the current payment was successfull so we redirect to it
      
      opw-2954162
      
      [1]:https://github.com/odoo/odoo/pull/31741/commits/7612659565ee24f1c878b81e6c86b5780fbd5a3d
      
      
      
      closes odoo/odoo#100406
      
      X-original-commit: 0420a0b6
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      256752df
    • Victor Piryns (pivi)'s avatar
      [FIX] sale: display related SO for intermediate contacts · c34e0200
      Victor Piryns (pivi) authored
      
      Current behaviour:
      In the context of a multilevel contact hierarchy, if a contact is creating an SO, only that contact and it's commercial partner (usually the first company when going up in hierarchy from that contact) can see the SO.
      The other contacts that are in that hierarchy could see the number of related SO on the smart button, but once clicking on it, no SO were shown.
      
      Expected behaviour:
      Every direct or indirect parent of a contact should be able to see the SO, as shown in the smart button count.
      
      Steps to reproduce:
      - Create 3 contacts with the following hierarchy: Company -> Contact 1 -> Contact 2 (Company is the root)
      - Create an SO with Contact 2 as a customer
      - On each of the contacts, click on the SO smart button, all of them have 1 SO shown on the button, but only Constact 1 has none shown once clicked. (Regardless if Contact 1 is an Individual or Company)
      
      Fix:
      Simplify domain search to only take into account the children's ids.
      There is no need to make a distinction between a contact that is a company or not, since all commercial_partners are also partners by default.
      
      Affected versions:
      - 14.0
      - 15.0
      - saas-15.2
      - saas-15.3
      - master
      
      opw-2961030
      
      closes odoo/odoo#100377
      
      Signed-off-by: default avatarPiryns Victor (pivi) <pivi@odoo.com>
      c34e0200
    • Walid HANNICHE (waha)'s avatar
      [FIX] website_sale: prevent adding empty fields · c00fd50e
      Walid HANNICHE (waha) authored
      
      Steps to reproduce:
      1- install eComerce app and activate debug mode
      2- go to Website > Configuration > Websites
      3- on a website product page extra fields tab add an empty line and save
      4- visit any product page on the website (500: internal server error)
      
      Bug:
      adding an empty field crashes the website server on the product page
      
      Fix:
      made the field required
      
      opw-2945621
      
      closes odoo/odoo#100318
      
      Signed-off-by: default avatarWilliam Braeckman (wbr) <wbr@odoo.com>
      c00fd50e
    • aliya's avatar
      [FIX] l10n_in: hide l10n_in fields for other l10ns · 7888a3c4
      aliya authored
      
      `l10n_in_gstin_partner_id` should be hidden on the journal form for non-Indian companies. It's probably also a good idea to hide `l10n_in_tin`in the country state form whenever the state added is not in India.
      vat field on `res.company` should be renamed to GSTIN only when the company country is India.
      
      task-2765567
      
      closes odoo/odoo#99124
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      7888a3c4
  5. Sep 18, 2022
  6. Sep 16, 2022
    • Renaud Thiry's avatar
      [FIX] mail, web_editor: dialog file update event · c112361b
      Renaud Thiry authored
      
      HOW TO REPRODUCE
      
      Go on a record (e.g. a lead), open the full composer and use the "File / Image"
      button from the editor to insert an image. After sending the attachment is
      displayed in chatter. However after a few days it disappears, being garbage
      collected.
      
      ISSUE
      
      When adding an image inside a mail composer via the /image command or 'image'
      button of the editor, the related attachment was never processed. This makes
      sense as we do not want to attach it to the resulting message(s). However as
      the attachment res_id and res_model were never updated from the compositor in
      which they originated, they would become dangling attachments and be garbage
      collected the next day (or the in the next pass of the GC) by
      '_gc_lost_attachments'.
      
      The attachment keeps 'mail.compose.message' as res_model and 0 as res_id.
      It is therefore considered as a lost attachment and removed by the garbage
      collect of attachments. As image are inlined in the content (using a link
      towards /web/image) they are not part of 'attachment_ids' given to the
      'message_post' method and therefore not linked to the document by
      '_message_post_process_attachments' whose job is to correctly set the
      model and res_id of attachments linked to the composer.
      
      An event was not called on uploading files in a media dialog. This means the
      parent of html field didn't know of the new attachments which resulted in
      attachments being linked to no record at all and not being garbage collected
      later. This fix makes that call.
      
      The attachments newly uploaded in media dialog are uneditable to prevent users
      from unlinking attachments that are still used in the body of the composer
      (causing the same issue).
      
      Task-2860761
      
      closes odoo/odoo#95537
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      c112361b
    • Xavier-Do's avatar
      [IMP] standalone: log exception when standalone fails · b16f850d
      Xavier-Do authored
      
      Currently the exception is not logged using the logger meaning that the
      only indication of the failure is the "module not loaded" error message.
      
      Catching the exception to log it the proper way will help identifying
      the cause of the issue, mainly for uninstall tests.
      
      closes odoo/odoo#100372
      
      Signed-off-by: default avatarXavier Dollé (xdo) <xdo@odoo.com>
      b16f850d
    • Nasreddin Boulif (bon)'s avatar
      [FIX] l10n_ar_website_sale: always display b2b fields for argentina · 874fc508
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce:
      
        - Install `l10n_ar_website_sale` module
      
        - Go to shop (Argentinian website) and add a product to cart
        - Open cart and click on checkout
        - Click on Customize and disable `Show b2b fields` feature
      
      Issue:
      
        Fields are no more displayed.
      
      Cause:
      
        Since the b2b fields template (`address_b2b`) have customize_show set
        to `True`, it is possible for all countries to display/hide
        the b2b fields, but it should not.
      
        For Argentinian companies (for example), the b2b fields should always
        be displayed.
      
      Solution:
      
        For frontend (Website shop): in address form, if website company
        country is Argentina, check if the address_b2b view is active and if
        not, enable it.
        For frontend and backend: on write of a view `address_b2b`, do not
        allow to disable it if have a website and website company
        country is Argentina.
      
      opw-2941199
      
      closes odoo/odoo#98084
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      874fc508
    • Demesmaeker's avatar
      [FIX] sale_product_matrix: error in matrix tour · 5ccc7dfc
      Demesmaeker authored
      
      Following the steps that changed every quantity in a matrix, the next
      step was triggered after at least one sale order line's quantity was
      changed. Due to the number of lines created, one of the so lines was
      sometimes not updated before the next step, which produces an error in
      the final sale_count.
      
      In order to check the total and ensure every line was updated, we set
      the partner sooner in the tour, which in turn sets the pricelist used to
      get the price of each line. Thus allowing a check on the subtotal.
      
      Backport of commit-af1e67aa2c6c676479ee4ea73106bcabd20c621e
      
      closes odoo/odoo#100301
      
      X-original-commit: e0461e1d
      Signed-off-by: default avatarMorgane Demesmaeker <edm@odoo.com>
      5ccc7dfc
    • Stanislas Sobieski's avatar
      [FIX] base: avoid indexing attachment on copy · 3d59cc84
      Stanislas Sobieski authored
      
      When sending a mass mailing with a pdf attachment, the ir.attachment
      is copied in the mail.composer for each email. Spending time and
      resources in the indexing of the pdf. On copy that value is already in
      the vals. This is especially true when attachment_indexation is
      installed, processing the pdf documents can be costly with pdfminer.
      
      It could also be done by overwriting the copu from ir_attachment but it
      could happen a misuse of mass create of ir.attachment with the same file
      has the same issue
      
      closes odoo/odoo#99856
      
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      3d59cc84
    • nouraellm's avatar
      [FIX] stock: fix todo filter for product moves · 27cd3c08
      nouraellm authored
      
      Steps to reproduce:
      - Create a transfer and choose whatever operation
      - Enable detailed operations option for the operation
      - Check availability and set quantities
      - Cancel the transfer then Go to Product Moves
      
      Current behavior:
      - todo filter is broken, it shows canceled moves
      
      Desired behavior:
      - Show only moves that are assigned or waiting
      
      - Task id: #2981249
      
      closes odoo/odoo#100292
      
      X-original-commit: 49c8351f
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      27cd3c08
  7. Sep 15, 2022
    • Didier (did)'s avatar
      [FIX] mail,hr: fix performRpcRead on user model · 95d3f4b0
      Didier (did) authored
      
      Fields param is actually not a kwargs. This cause a stack trace when opening a chat window (other than a chat with yourself) from a Kanban user avatar icon.
      
      closes odoo/odoo#100259
      
      Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
      95d3f4b0
    • Abdelouahab (abla)'s avatar
      [FIX] product_expiry: fix expiration date on stock move line · f1b0e6e6
      Abdelouahab (abla) authored
      
      To Reporduce
      =============
      - Install inventory, purchase and product_expiry
      - Create a new storable product that is tracked by lots or serial numbers and expiration date and set expiration days to a value
      - Go to inventory > configuration > Warehouse Management > Operations Types
      - In “San Francisco: Receipts” > Enable "Create New Lots/Serial Numbers"
      - Create a new RFQ > select the created product > Confirm the order
      - Click on “Receipt”
      - Click on the icon with 3 bars (last thing on line) to open Detailed Operations view
      - add a line and set a `lot/serial Number`
      - from the same view open the `lot/serial number` wizard and edit the expiration the date
      - save/confirm
      
      Problem
      =======
      The expiration date on Detailed Operations doesn't change
      
      Solution
      =========
      to solve the issue a condition in compute method was corrected
      
      opw-2937438
      
      closes odoo/odoo#97898
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      f1b0e6e6
    • Raphael Collet's avatar
      [FIX] core: remove confused log message about existing index · fe8d0024
      Raphael Collet authored
      
      When a module extends model 'base', the database schemas of all models are
      checked, including indexes.  And a log message appears for "unexpected index
      mail_message_subtype_id_index on table mail_message_subtype".  The index indeed
      exists, but not for the table mentioned in the message.  The ORM actually makes
      a confusion between:
       - the index mail_message_subtype_id_index for subtype_id on table mail_message
       - the index mail_message_subtype_id_index for id on table mail_message_subtype
      
      The fix consists in logging the message about the unexpected index only if the
      index is on the expected table.
      
      closes odoo/odoo#100217
      
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      fe8d0024
    • jbw-odoo's avatar
      [FIX] l10n_it_edi : invoice template node order · 71da80de
      jbw-odoo authored
      
      The RappresentanteFiscale and CessionarioCommittente nodes must be in this order in the invoice xml. The RappresentanteFiscale node is only added if the company has a tax representative configured. In that case, before this fix, submitting an invoice to the SDI (Italian tax agency) would not go through and generate an error :
      The invoice has been refused by the Exchange System
      File non conforme al formato : Invalid content was found starting with element 'RappresentanteFiscale'. One of '{TerzoIntermediarioOSoggettoEmittente, SoggettoEmittente}' is expected.
      
      How to reproduce :
      - Install l10n_it_edi_sdicoop
      - Configure a tax representative on the company
      - Go to accounting settings > Electronic Document Invoicing and choose the test mode + check the “Allow odoo…” checkbox.
      - Create a new invoice and confirm
      - Click on “Send now”
      - Click again on “Send now” until there is an update and the error is displayed.
      
      closes odoo/odoo#100129
      
      Task: opw-2952098
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      71da80de
  8. Sep 14, 2022
  9. Sep 13, 2022
Loading