Skip to content
Snippets Groups Projects
  1. Sep 26, 2022
  2. Sep 25, 2022
  3. Sep 23, 2022
    • Loan (lse)'s avatar
      [FIX] website_event: prevent send Register form as HTTP POST request · b447523b
      Loan (lse) authored
      To reproduce:
      Video: https://drive.google.com/file/d/1bAh7KA_5UhhIrr-qF5A5gOVWhk3_9clj/view
      
      
       1. Have multi-language website
       2. Event with one ticket
       3. Reload page and click the "Register" button
       -> in some cases there is a traceback
       `/event/great-reno-ballon-race-2/registration/new: Function declared as capable of handling request of type 'json' but called with a request of type 'http'`
      
       Reason of the issue:
       As the button "Register" in the form is defined with `type="submit"` it will send the form as plain HTTP if clicked.
       This behavior is modified in the JavaScript to prevent this default behavior.
       However, if the button is clicked before the JS load, the HTTP behavior is used which does create the above traceback (as the `registration/new` route accept only `json` type).
      
       Solution proposed:
       Prevent the button default behavior and make it deactivated and let the JS activate it when it is ready
      
       Note on stability:
       As JS code and XML view is modified, this fix was thought so that the JS won't have an impact if the view isn't updated.
       There is theoretically no way that the XML view would be updated without the JS being updated (except manual modification in the view or rollback on the version revision after performing a module update on odoo.sh). If it was the case then the button will be deactivated until the user change the number of ticket.
      
       OPW-2946706
      
      closes odoo/odoo#100490
      
      X-original-commit: 34db5005
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      b447523b
    • Touati Djamel (otd)'s avatar
      [FIX] mrp_account, sale_mrp: wrong kit cost after so confirmation · ea9fdac3
      Touati Djamel (otd) authored
      Steps to reproduce the bug:
      - Create a storable product “B1”:
          - Costing Method: average
          - With BOM:
              - BOM Type: Kit
              - Components:
                  - 3 units of “C1” (cost c1 = $2)
      - Go to the “B1” product form:
          - Click on “Compute Price from BOM”
          - Cost = 3 * $2 = $6
      
      - Create a storable product A1:
          - Costing Method: average
          - BOM
              - BOM Type: Kit
              - Components:
                  - 2 units of B1
      
      - Go to the “A1” product form:
          - Click on “Compute Price from BOM”
          So: 1 unit of A1 → 2 units of B1 → 3 units of C1
          - Cost = (2 * 3 * $2) = $12
      
      - Create a SO:
          - Add 1 unit of “A1”
          - save
          - cost(`purchase_price`) = $12
          - Confirm the SO
          - The cost is recomputed and becomes = $6
      
      Problem:
      When the SO is created and the product “A1” is added, the cost is
      retrieved from the product: https://github.com/odoo/odoo/blob/14.0/addons/sale_margin/models/sale_order.py#L27
      
      But when the SO is confirmed, a picking is created, therefore the
      cost is recomputed: https://github.com/odoo/odoo/blob/14.0/addons/sale_stock_margin/models/sale_order_line.py#L18
      
      
      
      So The `_compute_average_price` function is called, in which a loop is
      made for each move related to the `sale.order.line`, but the
      `bom_line.product_qty` is used for each component (in this case the qty
      necessary of the product `C1 ` to make a single unit of `B1`, but this
      is not multiplied by the number of units needed to be used in the
      parent's bom_line
      
      opw-2971248
      
      closes odoo/odoo#100126
      
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      ea9fdac3
  4. Sep 22, 2022
  5. 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
  6. Sep 20, 2022
  7. 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
  8. Sep 18, 2022
  9. 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
  10. 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
  11. Sep 14, 2022
    • Walid HANNICHE (waha)'s avatar
      [FIX] account: auto-complete apply the correct currency rate · 6b966b92
      Walid HANNICHE (waha) authored
      
      Steps to reproduce:
      - enable multi currency in settings
      - set different rates for multiple days
      - create a vendor bill in a different currency
      - create a second vendor bill
      - fill the second bill using auto complete from the first one
      
      Bug:
      the correct currency rate isn't applied unless date is changed when
      the source is a vendor bill not a purchase order
      
      Fix:
      update currency rate after adding a line with a different currency
      
      opw-2890210
      
      closes odoo/odoo#99934
      
      X-original-commit: fd4a8d98
      Signed-off-by: default avatarGrazioso Andrea (agr) <agr@odoo.com>
      6b966b92
Loading