Skip to content
Snippets Groups Projects
  1. Mar 10, 2023
    • Horacio Tellez's avatar
      [FIX] sale: bad error message when invoicing sales order · 0f867bc4
      Horacio Tellez authored
      
      When trying to invoice undelivered quantities the error message
      was somewhat misleading: it indicates as a possible solution a
      Stock app feature even when Stock is not installed.
      
      After this commit the message will be more appropriated.
      
      opw - 3206001
      
      closes odoo/odoo#114850
      
      X-original-commit: 39de34e3
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      0f867bc4
    • lathuat1997's avatar
      [FIX] stock_account: check new qty_done before creating a SVL · d26dc33d
      lathuat1997 authored
      
      closes odoo/odoo#113814
      
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      d26dc33d
    • qsm-odoo's avatar
      [FIX] website: fix wrapwrap overflow and animations (2) · 04984fb3
      qsm-odoo authored
      This reviews [1] which solved the problem in most cases (hopefully) but
      not in all cases. Animated elements which overflow the screen on the
      right made an horizontal scrollbar appear on iPhone <= 8 using Safari,
      even when they were not animating yet.
      
      This was due to Safari ignoring the `transform: none` rule on inactive
      elements, preferring to consider the animation transform. As a fix, we
      forced no possible overflow of the page when we saw this safari bug on
      the first animated element.
      
      The problem here... is that this Safari bug does not occur in every
      situation. For example, if the animated element is inside a column which
      is marked as hidden in mobile, Safari actually understands the no
      transform rule. So if the first animated element was in such a situation
      but another element in the page had the safari bug... the problem was
      there again.
      
      As a fix, we now check all animated elements for the Safari bug, instead
      of only the first one. That should do the trick.
      
      This commit also reviews the comment: the problem is not confined to
      old iPhones. This was reproduced on the latest iPhone with latest iOS
      and up-to-date Safari.
      
      opw-3204613
      opw-3201937
      Related to opw-3165651
      
      [1]: https://github.com/odoo/odoo/commit/c1447835786e04f342342540c09e46d1226d5fc0
      
      
      
      closes odoo/odoo#114829
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      04984fb3
    • Tom De Caluwé's avatar
      [FIX] website: keep table of contents title and menu entries in sync · da30b410
      Tom De Caluwé authored
      
      The table of contents menu entries are generated automatically which
      poses a problem in translation mode. The menu translation entries
      are not be editable separately, but the users might be trying to.
      
      This commit shows a notification when the user clicks on the menu
      entries while in translation mode, explaining that they are generated
      from the title entries.
      It was initially intended to use a tooltip - but the amount of code
      needed to display a tooltip without marking the DOM as modified is
      needlessly complex.
      Additionally, the translation widget updates the generated links of
      table of content headers to keep them synchronized.
      This could not be done by matching the translation id because those
      are different when a style is applied to the header.
      
      To avoid that styles applied on a plain text during translation were
      also appearing in the navigation menu, an attempt at adding a span
      around them to make sure that their translation was distinct from the
      one inside the main content. But this led to the risk of losing
      existing translations.
      Because of this, and because that situation seems unlikely, any
      remaining style in the navigation menu is instead stripped when the
      table of content is started to maintain consistency with what is shown
      during translation.
      
      task-2752391
      
      closes odoo/odoo#86377
      
      Signed-off-by: default avatarOutagant Mehdi (mou) <mou@odoo.com>
      da30b410
  2. Mar 09, 2023
    • Horacio Tellez's avatar
      [FIX] sale: forbid taxes of different company on sol · d88409e8
      Horacio Tellez authored
      
      Before this commit when in a multi-company environment an user
      could assign a company to the sale order and use taxes related
      to a different company for the sale order lines.
      This is a functional error and also provoques that taxes are not
      shown for some users when in a multi-company environment.
      After this commit a ValidationError will be raised whenever the
      company of the taxes in the sol and the so do not match.
      
      opw - 3117352
      
      closes odoo/odoo#114836
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      d88409e8
    • Maxime Franco's avatar
      [CLA] FrancoMaxime : I've learned and signed the CLA for acsone SA · 885d70d9
      Maxime Franco authored
      
      closes odoo/odoo#114763
      
      X-original-commit: 84613d1c
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      885d70d9
    • Maxime Franco's avatar
      [FIX] stock_account - adds missing parenthesis causing an operator precedence error · 9e6c2a51
      Maxime Franco authored
      X-original-commit: 111a7f58
      Part-of: odoo/odoo#114763
      9e6c2a51
    • Aurelien van Delft (avd)'s avatar
      [IMP] stock: _apply_putaway_strategy opti for MOs · 111b319f
      Aurelien van Delft (avd) authored
      
      Backport of cbeab103342 to speed up MOs confirmation when
      producing lots of quantity and when at least one component
      is tracked by Unique SN.
      
      closes odoo/odoo#112565
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      111b319f
    • Kevin Baptiste's avatar
      [FIX] hr_holidays: fix access error for officer · bf37032f
      Kevin Baptiste authored
      
      Time Off officer would sometimes get an AccessError when requesting
      leaves for many employees.
      
      opw-3220920
      
      closes odoo/odoo#114778
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      bf37032f
    • Eteil Djoumatchoua (etdj)'s avatar
      [FIX] sms: fix traceback clicking on Send SMS button · 7f84971d
      Eteil Djoumatchoua (etdj) authored
      
      Steps:
      
      install calendar app.
      enable sms template of calendar.
      go to calendar event form view.
      try to send SMS.
      Issue:
      
      traceback clicking `Send SMS' of Send SMS wizard.
      Cause:
      
      trying to write on field even though field does not
      exist in model.
      Fix:
      
      check field exist in model before write on it.
      task-3084701
      
      closes odoo/odoo#114771
      
      X-original-commit: cf98b3a8
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      7f84971d
    • Florent de Labarre's avatar
      [FIX] account: portal user can show not finished invoice · ee077745
      Florent de Labarre authored
      
      - Create an Order, send to customer
      - Create an invoice from this sale
      --> Issue the customer can show the invoice in draft mode
      This prevent customer to print a draft invoice with wrong value.
      
      Only show send invoice.
      
      closes odoo/odoo#114733
      
      X-original-commit: 687f4792
      Signed-off-by: default avatarOlivier Colson (oco) <oco@odoo.com>
      ee077745
    • Antoine (ande)'s avatar
      [FIX] purchase: PO stat button no groups · 19b92d28
      Antoine (ande) authored
      
      To reproduce the issue:
      1. Create user with no access rights apart from user rights in Sales,
         Sign, Project and Timesheet
      2. Create a project, add a task inside and link an analytic account
         to the project
      3. Create an RFQ, add a product linked to the analytic account
      4. Confirm order, receive product, validate, create bill
      5. Log in with user
      6. Try to access the analytic account through:
         Project->Task->project name->Settings->Analytic account
      7. An error message pops-up "You are not allowed to access Purchase
         Order (purchase.order) records."
      
      Error: You should be able to access the analytic account, but the
      Purchase Order smart button should not be visible/present
      
      The data access by the smart button was not stopped by rules or
      groups, thus data was always trying to be loaded, even when the user
      did not have the access rights
      
      OPW-3180788
      
      closes odoo/odoo#114701
      
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      19b92d28
    • Maruan Aguerdouh (magm)'s avatar
      [FIX] purchase: no more bold rows when unreaded messages that won't dissapear · 381c8b56
      Maruan Aguerdouh (magm) authored
      
      Steps to reproduce:
      
      - Install purchase and discuss.
      - Go to the purchase list view.
      - You will see the purchase lines in bold.
      
      Issue:
      
      The bold lines are supposed to indicate that we have unreaded messages
      in the chatter, but they are not working as expected, and instead it is
      mixed with discuss, and they bold line won't dissappear until we send a
      message in discuss.
      
      Solution:
      
      We removed from the views the "feature" of showing bold lines as it is
      not well implemented, and it is not working as expected. This will avoid
      confusion for the clients on not knowing what it is for, and when it's
      bold or when it's not. Also this feature was removed in future versions.
      
      Extra info:
      
      If you don't have any lines in bold, and you realize they don't appear
      when you send messages through the chatter. The easiest way I found to
      test it is removing `cp.channel_id = msg.res_id AND ` from the SQL query
      in the code inside `_compute_message_unread`. With this you will see the
      bold row whenever you send a message in the chatter, but it won't
      dissappear when you open the RfQ.
      
      Forward bot up to saas-15.2.
      
      opw-3185071
      
      closes odoo/odoo#114288
      
      X-original-commit: 8741db1a
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      Signed-off-by: default avatarMaruan Aguerdouh Mohtar (magm) <magm@odoo.com>
      381c8b56
    • Victor Piryns (pivi)'s avatar
      [FIX] {sale,purchase}_stock: propagate package type to stock moves · 1dc25c61
      Victor Piryns (pivi) authored
      
      Current behaviour:
      If you have a confirmed SO, with a `sale.order.line` that has a
      `product_packaging_id`, and you write a new `product_packaging_id`,
      the "Delivery Order" has 2 lines, 1 move with the old qty and the old
      packaging, and another line with the difference of qty and the new packaging.
      Same behaviour is present on purchase side.
      
      Expected behaviour:
      If you have multiple `stock.move.line` from the same `sale.order.line`,
      they should be able to merge, when you changed the `product_packaging_id`.
      Ex: If you edit an SOL from 1 pack of 10 to 1 pack of 20, we should have
      1 move line with qty 20 in packs of 20, instead of 2 lines, one with qty 10
      in packs of 10, and another line with qty 10 in packs of 20.
      Same behaviour is expected on purchase side.
      
      Steps to reproduce:
      - Install Sales and Inventory
      - Activate "Product Packaging" in Settings
      - Create a new product with 2 types of packaging
        - PackOf10 with quantity of 10
        - PackOf20 with quantity of 20
      - Create a SO with a new line that product, quantity 10
      - Confirm the SO
      - Edit the SOL with 1 pack of 20 (`product_uom_qty`=20)
      - The "Delivery Order" has 2 lines, instead of 1 with the new packaging
      
      Reason for the problem:
      When saving the SO/PO, a new `procurement` is created which will create
      a new `stock.move.line` with the new packaging. This will prevent the
      lines to merge correctly, because they have different packaging.
      
      Fix:
      When writing the `product_packaging_id` on a `sale.order.line`/`purchase.order.line`,
      we directly write the package on the `stock.move.line`,
      before any `procurements` are created, so the generate move lines
      can correctly be merged.
      
      Affected versions:
      - 15.0
      - saas-15.2
      - saas-15.3
      - 16.0
      - master
      
      opw-3002612
      
      closes odoo/odoo#107223
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      1dc25c61
    • Adrien Widart (awt)'s avatar
      [FIX] {sale_,}stock: decrease SOL qty with existing backorders · 4180afb9
      Adrien Widart (awt) authored
      
      2-steps delivery. If there is already a backorder for the picking
      out->customer, when decreasing the SOL qty, an unexpected picking
      will be created
      
      To reproduce the error:
      1. In Settings, enable "Multi-Step Routes"
      2. Edit the warehouse:
         - Outgoing: 2 steps
      3. Create a storable product P
      4. Update the on hand qty:
         - 10 x P at WH/Stock
      5. Create and confirm a SO with 10 x P
      6. Process the pickings with 6 x P (with backorders)
         - There should be 4 pickings
      7. On the SO, decrease the quantity to 7
      
      Error: an unexpected picking (customer -> out) is created for 3 x P
      
      Step 6, when creating a backorder for 4 x P from out to customer,
      we split the initial SM, and we force the `procure_method` to
      `make_to_stock`
      Step 7, when decreasing the qty, we create a negative procurement
      and run the rules' system. Because of warehouse configuration, the
      rule that links output location and customer one is based on an MTO
      logic: the SM for -3 x P has the `procure_method` set to
      `make_to_order`. As a result, that move will not be merged with the
      one created during the split (step 6) and we will create the
      unexpected picking for the move.
      
      The SM generated by the split should keep the same procure method
      logic as the initial one.
      
      OPW-3141387
      
      closes odoo/odoo#114686
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      4180afb9
  3. Mar 08, 2023
    • Paolo Gatti (pgi)'s avatar
      [IMP] l10n_it_edi_sdicoop: Cannot delete already sent attached files · f7030ad4
      Paolo Gatti (pgi) authored
      If an invoice is send to the Tax Agency, we should block the fact
      that the user can delete it. In that case, we can have issues when
      the tax agency sends back notifications.
      
      Task link: https://www.odoo.com/web#id=3192962&model=project.task
      
      
      Task-3192962
      
      closes odoo/odoo#114667
      
      X-original-commit: 0c1113e0
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      Signed-off-by: default avatarPaolo Gatti (pgi) <pgi@odoo.com>
      f7030ad4
    • niyasraphy's avatar
      [FIX] repair: hide cancel button in done state · e7981feb
      niyasraphy authored
      Before this commit, the cancel button is visible in the done state and
      on clicking showing the validation that it cannot be cancelled.
      
      by the commit:
      https://github.com/odoo/odoo/commit/8d37cf462badc25d911d3fa6d3382c6f7418904f
      one of the cancel button in the form is made hidden in the done state,
      similarly applying for the other cancel button also.
      
      also currently on trying to delete a done repair order, it says to
      cancel first and then delete the order, from the commit:
      https://github.com/odoo/odoo/commit/8d37cf462badc25d911d3fa6d3382c6f7418904f
      
      
      cancelling a done record is prevented, thus modifying the warning
      message and its related pot file
      
      After this commit, the cancel button will not be visible in the done
      state.
      
      closes odoo/odoo#114693
      
      X-original-commit: f539f0ee
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      e7981feb
    • Walid HANNICHE (waha)'s avatar
      [FIX] mail: set correct reply_to company · 8da210e3
      Walid HANNICHE (waha) authored
      Steps to reproduce:
      - select a different company from the main one
      - under settings/discuss enable External Email Servers
      - set up an alias domain
      - create an SO and send it by email
      (you can catch the sent email using mailhog)
      - reply to that email
      (you can use the support-tools[1] and set In-Reply-To: "previous message_id")
      
      Bug:
      the reply_to field of incoming message defaults to the first company
      
      Fix:
      set the reply_to field to the company asociated to the record
      (there's already a fallback to self.env.company  in
      "_notify_get_reply_to_formatted_email")
      
      opw-3060214
      [1]: https://github.com/odoo/support-tools/tree/master/scripts/mail
      
      
      
      closes odoo/odoo#114680
      
      X-original-commit: 74893cf2
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      Signed-off-by: default avatarWalid Hanniche (waha) <waha@odoo.com>
      8da210e3
    • Raphael Collet's avatar
      [FIX] core: first onchange when adding a line in a one2many field · 5f031578
      Raphael Collet authored
      
      Consider a form view with a one2many field, which has no form subview.
      Also the form view of the comodel (the one2many field's lines) contains
      the inverse many2one field of the one2many field.  When adding a new
      line on some existing record, the form view shows the many2one field as
      empty, instead of being the main record.
      
      Explanation: the form view of the line invokes onchange() with the main
      record's values (dict) as the value of the many2one field.  Inside
      onchange(), the field is actually set to a new record corresponding to
      the main record.  Alas, when that value is sent back to the form, the
      new record is serialized as False.
      
      Solution: let onchange() serialize the new record as its origin record
      instead.
      
      closes odoo/odoo#114633
      
      X-original-commit: d137ea49
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      5f031578
    • qsm-odoo's avatar
      [FIX] web: properly display table texts over any background · f9988852
      qsm-odoo authored
      
      Bootstrap tables can basically be customized with the `$table-bg` and
      `$table-color` variables. The problem is that, by default, BS4 defines
      them so that the background-color is null (so transparent: displaying
      the background-color of its ancestors) but the color is forced to the
      body color (by default: white). This is a problem as soon as the
      ancestors background colors are a color close to the body text color:
      the text becomes invisible. For instance, in website:
      - Set a body background color to black, the body text will automatically
        become white.
      - Add a table in a snippet: still ok, the text in the table is white
        over the black body (the table being transparent).
      - Then set the snippet background to white -> the table text will still
        be white... but now over a white background.
      
      This should be reviewed in master: it should be ok to set the variable
      $table-color to `null` thus letting the table be transparent and have
      the same text color as its parent. But in stable, changing a color
      variable to `null` could break customizations relying on the fact this
      is a set color. It would also not make sense if the user set up a
      `$table-bg` value going well with table text forced to the body color.
      Instead, here, in the very specific case we have a transparent table bg
      and table color equal to the body color, we temporarily unset the table
      color variable for the duration of the bootstrap table rules.
      Note: we cannot create a rule in an "Odoo file" to fix this as unsetting
      the color for the `.table` rule would also unset the color in the case
      of a `.table.bg-XXX` where we still want `.bg-XXX` to force the color.
      
      task-2728923
      opw-3048306
      opw-3180568
      
      closes odoo/odoo#114623
      
      X-original-commit: 02c2cfdf
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      f9988852
    • pedrambiria's avatar
      [FIX] point_of_sale: allow to refund less than one quantity · 79ee6aed
      pedrambiria authored
      Before this commit: if you had a pos order with one product and one
      quantity, it wasn't possible to refund less that one quantity.
      
      Steps to reproduce:
       1. Create POS order with any product -> Qty = 1.0
       2. Go to the refund page -> Select Order -> Update Qty to 0.5 -> Click
       on the 'Refund' button
      
      The solution is to keep the input quantity in case of a single product
      refund.
      
      issue https://github.com/odoo/odoo/issues/112291
      
      
      
      closes odoo/odoo#112810
      
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      79ee6aed
    • Antoine (ande)'s avatar
      [FIX] purchase: analytic account clears · 87e1673a
      Antoine (ande) authored
      To reproduce the issue:
      1. In Accounting, settings, activate Analytic Accounting
      2. Head over to the purchase module, create an RFQ
      3. Add a POL to the RFQ, with an analytic account specified
      4. Save the RFQ
      5. Edit the RFQ, and change the Order Deadline
      6. The analytic account in the POL has disappeared
      
      Error: The analytic account should not disappear
      
      When modifying the deadline, the analytic account was always
      being replaced, even if the replacement was empty.
      
      In the same version (14.0), the same fix can be found in AML:
      https://github.com/odoo/odoo/blob/1dcd071b27779e7d6d8f536c7dce7002d27212ba/addons/account/models/account_move.py#L3583-L3584
      
      In 16.0, the issue doesn't need to be fixed, as it has already
      been fixed, by a similar fix, as seen in POL:
      https://github.com/odoo/odoo/blob/c677f45dcb050ce7e6f755b71e56c9b9120bf613/addons/purchase/models/purchase.py#L1153
      
      
      
      OPW-3159905
      
      closes odoo/odoo#114523
      
      X-original-commit: 6b300286
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      Signed-off-by: default avatarDemany Antoine (ande) <ande@odoo.com>
      87e1673a
  4. Mar 07, 2023
    • Merel Geens (mege)'s avatar
      [FIX] website_sale: store empty fields as False · ce0cd0ed
      Merel Geens (mege) authored
      
      If you specify an empty VAT number in the Contacts app, it will store it
      as `False` in the ORM. If a new partner is created through the shop, the
      VAT number is set through HTML form submission. It will use `''` for an
      empty VAT number. When evaluating the VAT number in Python code, it will
      usually be converted to a boolean, so it doesn't matter if it's `False`
      or `''`. But in ORM queries those are two different values and code that
      checks on `False` to check for the presence of a VAT number can
      misinterpret `''` as being one.
      
      This fix replaces `''` values submitted through the address form in the
      shop with `False`.
      
      opw-3114246
      
      closes odoo/odoo#114570
      
      X-original-commit: db701c21
      Signed-off-by: default avatarMerel Geens <mege@odoo.com>
      ce0cd0ed
    • Benjamin Vray's avatar
      [FIX] web_editor: fix customize panel backdrop position · 87622c26
      Benjamin Vray authored
      
      Before this commit, the customize panel backdrop did not fully cover the
      customize panel when the vertical scrollbar was scrolled to the bottom.
      
      Steps to reproduce the bug:
      
      - In website edit mode, add a table of content snippet to the page.
      - Add a three columns snippet within the table of content.
      - Click on an image in the three columns snippet.
      - Scroll the customize panel to the bottom and open the filter selector
      of the image.
      - Bug: the backdrop does not fully cover the customization panel.
      
      task-3090626
      
      closes odoo/odoo#114507
      
      X-original-commit: 672a8cb1
      Signed-off-by: default avatarOutagant Mehdi (mou) <mou@odoo.com>
      87622c26
    • Benoit Socias's avatar
      [FIX] website, *: unescape URL parameters when used in autocomplete · ac8d582c
      Benoit Socias authored
      *: web_tour, website_blog
      
      Since [1] when the search box autocomplete was introduced, the URL
      parameters are implicitly included into the RPC that fetches the
      autocompletion results.
      Those parameters were not correctly unescaped before being sent to the
      RPC call.
      Because of this, a timestamp such as "2023-01-01 23:00:00" was sent as
      "2023-01-01+23%3A00%3A00" to the server. If that string reached the SQL
      layer, the "+" was interpreted as defining a timezone.
      
      This commit unescapes the URL parameters before using them in the RPC.
      Note that javascript's `decodeURIComponent` does not handle the '+'
      encoding of spaces inside URL parameters.
      
      For testing purpose, the following updates were needed to make it
      possible to select the `<option>` within the Archive month `<select>`:
      - because the `option`s are in a tree, the tool was adapted to take all
      `option`s into consideration instead of only the direct children of the
      `select`.
      - because the `option` text is dynamically created from the date of the
      test execution, the tool was adapted to allow targeting an `option`
      based on its index by specifying the tour step's `run` as
      `'text index N'`, `N` being the index of the `option`.
      
      Steps to reproduce:
      - Enable the sidebar of the `/blog` page.
      - Select a month in the sidebar.
      - Type something in the search box.
      
      => Did show an error popup while obtaining the autocompletion records.
      
      [1]: https://github.com/odoo/odoo/commit/7559626c54e34b41e1549e28276a650accec6986
      
      
      
      task-3213916
      
      closes odoo/odoo#114229
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      ac8d582c
    • Thomas Lefebvre (thle)'s avatar
      [FIX] sale_product_configurator, website_sale: missing never/custom attribute · fe54fdb5
      Thomas Lefebvre (thle) authored
      
      Steps to reproduce:
      - create an attribute with "never" as the mode of creation;
      - create a product with this attribute;
      - add an optional products to this product;
      - go to ecommerce and add this product to the cart;
      - take care to change the value of the attribute;
      - click on the "Proceed to Checkout" button.
      
      Note: optional product allows to open the modal window on the ecommerce
      
      Issue:
      In the cart, the selected attributes are the default ones.
      
      Cause:
      We will look for the information in the modal window template.
      Unfortunately, the `getCustomVariantValues` and `getNoVariantAttributeValues`
      functions are not adapted to the modal window template.
      Therefore, the information is not found.
      
      Solution:
      As the information is searched on the template of the modal window,
      it is necessary to maintain the information on it.
      
      opw-3140859
      
      closes odoo/odoo#113763
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      fe54fdb5
    • Laurent Desausoi's avatar
      [FIX] base: decode wkhtmltopdf errors · 40212c16
      Laurent Desausoi authored
      
      In some cases, wkhtmltopdf might exit with an error (e.g.: a memory
      limit). In such cases, we want to show to the user the error returned by
      wkhtmltopdf. Previously, this message was only displayed in binary
      format (displayed as "Message: b'My error\n'") which is not user-friendly.
      We want this message to be decoded so that it is a bare string
      (displayed as "Message: My error").
      
      closes odoo/odoo#114549
      
      X-original-commit: 713a46cd
      Signed-off-by: default avatarVincent Schippefilt (vsc) <vsc@odoo.com>
      Signed-off-by: default avatarDesausoi Laurent (lade) <lade@odoo.com>
      40212c16
    • Soukéina Bojabza's avatar
      [FIX] website: increase the breakpoint of the 'Show on mobile' option · 639912f4
      Soukéina Bojabza authored
      
      When using the 'Show on mobile' option, we can see that there is a
      mismatch between the screen breakpoint at which the elements are
      displayed like in mobile view (=> under 992px or `lg`) and the one that
      is impacted by the 'Hide/Show' option (=> under 768px or `md`). This is
      a problem because between these two breakpoints, the display is like in
      mobile view but is not considered as such and so, hiding an element in
      the mobile view (for example, if it does not look good in it) has no
      effect until the screen reaches 768px.
      
      This commit increases the screen breakpoint at which the 'Show on
      mobile' option is applied, that is, up to 992px instead of 768px, in
      order to be consistent with the display.
      
      task-3110770
      
      closes odoo/odoo#114492
      
      X-original-commit: 791670db
      Signed-off-by: default avatarBenoit Socias (bso) <bso@odoo.com>
      639912f4
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] l10n_id_efaktur: use shipping address for Column "ALAMAT LENGKAP" · 885ce5a2
      Andrea Grazioso (agr-odoo) authored
      To generate an e-faktur
      
      1. Settings > Users & Companies/Compagnies:
      - Create a new company ‘ID Indonesia’:
      - Set the state (e.g Yogyakarta (ID))
      - Set the country ‘Indonesia’
      
      2. Accounting > Customers > e-Faktur
      - Set a range of numbers (which are supposed to be assigned by the
      Indonesian government)
      
      3. Accounting > Configuration > Settings
      - Fiscal Localization: select the Indonesian package
      
      4. Accounting > Customers > Customers
      - Create a new res.partner:
      - Set the country ‘Indonesia’
      - Check ‘ID PKP’ field
      - Fill Tax Address field
      - Fill NIK field
      - Under ‘Accounting tab’: set both accounting entries (Receivable +
        Payable)
      - Create a delivery address
      
      5. Accounting > Customers > Invoices
      - Create a random invoice with the res.partner set in point 5. as the
      Customer
      - Confirm the invoice
      - Action > Download e-Faktur
      
      Under column ALAMAT LENGKAP the tax Address will be used, but the
      delivery address should be used
      Follows the official documentation with translation
      https://www.pajakku.com/tax-guide/12490/PER_DIRJEN_PJK/PER
      
       - 03/PJ/2022
      (Article 6, paragraph 6)
      
      Translation:
      Paragraph 2 : The identity of the Buyer of Taxable Goods and Services or
      the Recipient of Taxable Goods and Services which includes name,
      address, NPWP, NIK, and passport number as referred to in Article 5
      letter b must be filled in accordance with the actual or actual name,
      address, NPWP, NIK, and passport number.
      
      Paragraph 6 : In the event that the delivery of Taxable Goods and/or
      Taxable Service is made to the Buyer of Taxable Goods and/or Receiver of
      Taxable Service which is the place where the VAT or VAT and STLG payable
      is concentrated, but the Taxable Goods and/or Taxable Service is sent or
      delivered to the place where the VAT or VAT and STLG payable is
      centralized, the following provisions shall apply:
      a. the name and NPWP as referred to in paragraph (2) shall be the name
      and NPWP of PKP where the VAT or VAT and STLG payable is centralized;
      and
      
      b. the address as referred to in paragraph (2) shall be the address of
      the place where the VAT or VAT and STLG payable that is centralized
      receives the Taxable Goods and/or Services.
      
      opw-2878096
      
      closes odoo/odoo#114048
      
      X-original-commit: df74fb68
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      Signed-off-by: default avatarGrazioso Andrea (agr) <agr@odoo.com>
      885ce5a2
    • Louis (loco)'s avatar
      [FIX] web_editor: remove the possibility to edit readonly image field · 36fb7654
      Louis (loco) authored
      
      Steps to reproduce the bug:
      - Add multiple images on a product page
      - Go to the shop and edit an image of this product by double clicking
      on a small image on the carousel thumbnail
      - Save
      -> Nothing happens and the image is not updated
      
      The goal of this commit is to ensure that a field of type image is not
      `readonly` before adding the `contenteditable` attribute to its image.
      
      task-3122670
      
      closes odoo/odoo#109465
      
      Signed-off-by: default avatarBenoit Socias (bso) <bso@odoo.com>
      36fb7654
    • Kevin Baptiste's avatar
      [FIX] hr_holidays: validation of multi-employee leaves for officer · 76f76200
      Kevin Baptiste authored
      
      An employee with time officer access right would receive the error "You
      must be False's manager to approve this leave" even if they were manager
      of all the employees.
      
      Now the error message will list all the employee's the user is not
      manager of, and it will properly check that the user is manager of all
      of them.
      
      task-3220920
      
      closes odoo/odoo#114542
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      76f76200
    • sofiagvaladze's avatar
      [FIX] hr_contract: proceed cron action even when ValidationError occurs · bce0d7d0
      sofiagvaladze authored
      
      The method update_state is called from cron. When the contracts are
      updated couple things are checked. There are constraints set that can
      throw ValidationError. As a result, none of the contract states are updated.
      
      In this PR we do the following:
      In case the ValidationError occurs when we run the cron, we update
      contracts that can be updated, and silently pass the invalid contracts.
      
      task - 3069480
      
      bloupbloup
      
      closes odoo/odoo#114287
      
      X-original-commit: 66ba7a1b
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      bce0d7d0
    • Solan Delvenne (sode)'s avatar
      [FIX] snailmail: Fix an error with invoice address · 851da9ef
      Solan Delvenne (sode) authored
      
      If an user tries sending a invoice using an invoice address and a
      delivery address through snailmail, it would result in a traceback.
      This is due to the invoice address record not having a name.
      
      closes odoo/odoo#114171
      
      X-original-commit: eceb23b1
      Signed-off-by: default avatarFlorian Daloze (fda) <fda@odoo.com>
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      851da9ef
    • Julien (jula)'s avatar
      [FIX] base_vat: support for 2020 Albanian Tax ID · 5c445bc1
      Julien (jula) authored
      __Description of the issue this PR addresses:__
      The first character of a Tax ID from Albania is a letter representing the decade in which it has been issued. The letter M represents the current decade. (This pdf explains in details how it is formated: https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Albania-TIN.pdf).
      
      Currently the way Albanian Tax IDs are validated is through the python library [`python-stdnum`](https://pypi.org/project/python-stdnum/).
      However, the regex that is used to validate them has not been updated since 2017. (I made a PR in its repo https://github.com/arthurdejong/python-stdnum/pull/402
      
       to fix that).
      
      The code from this commit is inspired by the one from that library, but the regex includes the letter M.
      
      __Current behavior before PR:__
      (`base_vat` must be installed)
      By going to Settings > Users & Companies > [A company]:
      - Set the country to Albania
      - Set VAT/Tax ID to “M12345678T”.
      
      => Error message
      
      closes odoo/odoo#114438
      
      X-original-commit: f0b6e4cc
      Signed-off-by: default avatarNicolas Viseur (vin) <vin@odoo.com>
      5c445bc1
    • Nasreddin Boulif (bon)'s avatar
      [FIX] auth_signup: escape double quotes in `email from` value · 0c4cb5e3
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce:
      
        - Install "Sales" module (for test purpose)
        - Change company name to `בונז " ור מונד` (notice the double quotes)
        - Go to "Settings > Users & Companies > Users"
        - Select any user and then click on "send an invitation email" button
        - Go to inbox and check the email
      
      Issue:
      
        No email received (at least not in main inbox).
      
      Cause:
      
        The email is not received in main inbox (Gmail or Outlook might flag
        them since email from is not well parsed) because the `email from`
        value is not escaped properly (by escaping the double quotes).
      
      Solution:
      
        Instead of using the company name (that is not escaped) and email to
        build the `email from` value, use the company email_formatted value
        instead (and fallback on user mail if not available).
      
      opw-3097910
      
      closes odoo/odoo#113901
      
      Signed-off-by: default avatarJulien Castiaux (juc) <juc@odoo.com>
      0c4cb5e3
  5. Mar 06, 2023
    • Walid HANNICHE (waha)'s avatar
      [FIX] base: wkhtml2pdf large documents load · 69d9bdf8
      Walid HANNICHE (waha) authored
      
      Step to reproduce:
      
          Edit documents layout in general setting to add logo and background
          select multiple documents (more than 5) e.g. Inventory> delivery slips
          print all documents.
      
      Bug:
      background and logo missing on the last documents because the pages
      were printed before the browser had time to render them
      
      Fix:
      wkhtml2pdf has a default delay of 200 ms (--javascript-delay)
      increasing the value will allow large document to load
      
      opw-2951594
      
      closes odoo/odoo#114493
      
      X-original-commit: ac2df93e
      Signed-off-by: default avatarJulien Castiaux (juc) <juc@odoo.com>
      Signed-off-by: default avatarWalid Hanniche (waha) <waha@odoo.com>
      69d9bdf8
    • Nasreddin Boulif (bon)'s avatar
      [FIX] base: fix partner merge wizard · 1f0710b1
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce:
      
        - Install `Contacts` module
        - Create 3 contacts with the same name
        - Archive one of the contacts
        - Go to list view
        - Edit search filter to display archived and non archived contacts
        - Select the 3 created contacts
        - Open `Action` menu and click on `Merge`
      
      Issues:
      
        - Archived partner is set by default as destination partner.
        - Archived partner is not displayed in the list of partners to merge.
      
      Cause:
      
        - The default destination partner set is the last record of the record
          set returned by `_get_ordered_partner` (where `Archived` partners
          are the last ones in the record set).
        - The field `partner_ids` does not allow archived records.
      
      Solution:
      
        - Sort the partners to have the archived ones on top (since we took
          the last one).
        - Set `active_test` to False in the context of the partner_ids field.
      
      opw-3205577
      
      closes odoo/odoo#114484
      
      X-original-commit: 8d0cec68
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      Signed-off-by: default avatarNasreddin Boulif (bon) <bon@odoo.com>
      1f0710b1
    • Nicolas Bayet's avatar
      [FIX] web_editor: show a default selection in collaboration · e90fce64
      Nicolas Bayet authored
      
      Before this commit, whenever a peer had no selection in the editor, no
      selection would appear to the other collaborators. It was therefore
      visually impossible to know excaltly to how many people someone is
      connected.
      
      Now, we set the default selection to be in the first node of the
      document.
      
      Additionnaly, some selection were not displayed because the call to
      `getClientRects` did not return any rect. By creating a deep range
      through the use of `getDeepestPosition`, we ensure to retrieve the
      selection rect.
      
      task-3217719
      
      closes odoo/odoo#114417
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      e90fce64
    • Nicolas Bayet's avatar
      [FIX] web_editor: comment about get_missing_steps return value · e4338bcc
      Nicolas Bayet authored
      The comment that describe the
      `missingSteps === -1 || !missingSteps.length` condition was wrong.
      
      task-3217719
      
      Part-of: odoo/odoo#114417
      e4338bcc
    • Nicolas Bayet's avatar
      [FIX] web_editor: process historyStepsBuffer · dff094c0
      Nicolas Bayet authored
      Before this commit, any history step received before the history is
      fully synchronised (`historySyncFinished`), would not be processed.
      
      As a fail safe, this commit adds a buffer that will be processed as
      soon as the history synchronization is finished
      (`historySyncFinished`).
      
      task-3217719
      
      Part-of: odoo/odoo#114417
      dff094c0
Loading