Skip to content
Snippets Groups Projects
  1. Mar 15, 2023
    • Walid HANNICHE (waha)'s avatar
      [FIX] stock_landed_costs: apply correct accout on vendor bill · f36c5c8a
      Walid HANNICHE (waha) authored
      
      Steps to reproduce:
      -> Install Stock+Accounting+Purchase
      -> Enable landed costs on setting
      -> Anglo-Saxon accounting Active
      -> Create a service-type product with active landed cost.
      -> Product category: ( Standard/FIFO/Average - Automated )
      -> Confirm a PO with that product
      -> Create a vendor bill
      
      Bug:
      default accout for the landed cost is (600000 Expenses)
      
      Fix:
      apply the correct account (set on product category) when creating
      the invoice lines
      
      opw-3129528
      
      closes odoo/odoo#114449
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      f36c5c8a
    • David (dafr)'s avatar
      [FIX] stock_account: AVCO manual price change Rounding error · 6af7d682
      David (dafr) authored
      
      ## To reproduce:
      => Import 5 units of P1 at $5
      => Import 2 units of P1 at $2
      ----> Current valuation: Qty 7, Value $37, Std Price $5.29 (rounded)
      => Change standard Price to 7
      ----> Current valuation: Qty 7, Value $48.97, Std Price $7
      
      ## Solution:
      To compute the value delta, we don't use the current standard_price (which may be rounded), but the current value_svl.
      
      OPW-3233260
      
      closes odoo/odoo#115311
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      6af7d682
    • Andrius Laukavičius's avatar
      [CLA] oerp-odoo · def64958
      Andrius Laukavičius authored
      
      Signing CLA to be able to merge other pull requests.
      
      closes odoo/odoo#115301
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      def64958
    • Florent de Labarre's avatar
      [FIX] point_of_sale : add index · 59d3377e
      Florent de Labarre authored
      
      In large database, to compute picking_count on orders and sessions, can take lot of time.
      
      closes odoo/odoo#114553
      
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      59d3377e
    • Mahamadasif Ansari's avatar
      [FIX] stock: add blank domain to avoid log error in search view · 677118f0
      Mahamadasif Ansari authored
      "Non-stored fields like product.template.location_id/warehouse_id cannot
      be searched" log error is generated because the non-storable fields are
      not searchable, so it shows a log error for those fields.
      
      This commit added the blank filter_domain in the above fields to avoid
      the log error in search.
      
      This fix is for the "product.product" search view for the "product.template"
      search view has already been fixed in https://github.com/odoo/odoo/commit/a5835a160ea3f7aea37644ed4e1a49e2e4a6effd
      
      
      
      sentry-3933983991
      
      closes odoo/odoo#115018
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      677118f0
    • Mylyna Hy's avatar
      [FIX] pos_mercury: remove _gc_old_tokens · 41a82c33
      Mylyna Hy authored
      
      Problem:
       When point_of_sale and pos_mercury are both installed,
        _gc_old_tokens will get called by the scheduled action "Base: Auto vacuum internal data"
         and it will try to remove the Vantiv tokens from POS orders that are 6+ months old.
          However, there are fields named ref_no and record_no that exists for pos.order;
           so the AttributeError will get thrown.
      
      Solution:
       It is safe to remove the entire method since the Mercury API documentation
        does not explicitly mandate the tokens be removed from old POS orders.
         It was recommended by JOV to not modify the method to prevent the modification of
          potentially 8 years old POS orders from client's databases.
           Since the method is removed, the error will not be thrown when auto vacuum is called,
            pos_mercury is installed, and POS orders are 6+ months older.
      
      opw-3082616
      
      closes odoo/odoo#114620
      
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      41a82c33
    • Nshimiyimana Séna's avatar
      [FIX] website_sale: prevent users from modifying carts if a payment has been initiated · dbb0b743
      Nshimiyimana Séna authored
      
      Bug: Users are able to modify their eCommerce cart, while a payment for
      said cart is being processed. This means that the users can be charged
      an amount that is different from the total listed on the associated
      sales order. This also prevents the cart from being confirmed.
      
      Steps to reproduce:
      1. Install `website_sale` and `payment_test`.
      2. Go to the /shop page, add a product to the cart and process checkout
      3. On the payment page, select the `test` payment method and use the
         card number `4111 1111 1111 1111` with the expiry date 06/28 and the
         secret code `900`.
      4. Open a product's page in another tab
      5. Go back to the payment tab, click 'Pay Now' and quickly switch to the
         second tab and add the product to the cart
      6. Check the cart's chatter: the confirmation failed because the cart's
         and transaction's amounts mismatch.
      
      Fix: Force creating a new cart if the current one has started the
      payment process
      
      This commit is a backport of b261b85da0e8385a63efa4eeee883f92e3dcf58d
      
      opw-3122102
      
      closes odoo/odoo#114660
      
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      Co-authored-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      dbb0b743
    • Merel Geens (mege)'s avatar
      [FIX] point_of_sale: rollback failed account move transaction · 883600dc
      Merel Geens (mege) authored
      
      When closing a POS session, a journal entry is generated for it. By
      default, first we try to create that entry as the logged in user, and if
      that fails we try again with sudo.
      
      Suppose you only have the Point of Sale and Accounting apps installed,
      and the user has the Auditor role in Accounting. In that case they won't
      be able to create account moves. If the user closes a POS session, the
      creation of the account move in `_create_account_move` will fail with an
      AccessError and the creation will be retried with `sudo` by
      `_validate_session`. This works fine.
      
      Now suppose that you have the Purchasing app installed as well. By
      default that will give the User role in Purchasing. That role introduces
      a restriction on which account move types the user can write to. The
      permissions do not include 'entry', which is the move type of the POS
      journal entry. If the user again tries to close a POS session, the
      creation of the move is able to proceed further, because the role from
      Purchasing granted additional rights. The SQL statement inserting the
      account move data gets executed inside the transaction. When it
      validates the Python constraints afterwards, another AccessError is
      raised, because of the rule on `move_type` failing due to the move being
      an 'entry'.
      
      If at this point the operation is simply tried again with sudo, the
      original database changes inside the transaction will still there, and
      will be committed together with the journal entry created with sudo.
      This results in an empty draft entry showing up in addition to the POS
      journal entry.
      
      To prevent this from happening, the initial attempt is wrapped in a
      savepoint so that the transaction gets rolled back fully if the creation
      of the account move fails, no matter at which point.
      
      opw-3160140
      
      closes odoo/odoo#114443
      
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      883600dc
  2. Mar 14, 2023
  3. Mar 13, 2023
    • david's avatar
      [FIX] point_of_sale: blurred company logo on ticket · e9f5b3bd
      david authored
      
      The `/web/binary/company_logo` controller returns an image with a
      maximum of 180px wide, while the point of sale data loader tries to
      resize such image to 300px wide. The result is an image with blurry
      edges.
      
      A better option is to use the standard `/web/image` controller that
      recovers the original image from the proper attachment. This is a tiny
      overhead since it's done just once when session is loaded.
      
      closes odoo/odoo#98249
      
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      e9f5b3bd
    • Benoit Socias's avatar
      [FIX] website, *: define specific dynamic snippet name · d34925e3
      Benoit Socias authored
      *: web_editor, website_sale
      
      Since [1] when the Dynamic Snippet was first introduced, it also
      introduced a concept of "inherited" snippets. Specific snippets would
      all `t-call` the same template for their rendering.
      A mechanism was introduced to deduce the `data-snippet` from the caller
      template, but it stored the obtained value in the `t-called` template
      itself. Because of this if several "specific snippets" that used that
      template had to be rendered, they would all have the `data-snippet`
      value of the first one that got compiled.
      
      We could compile the snippet template into something having a
      dynamically obtained `data-snippet` value, but then that would be
      equivalent to just using a `t-attf-data-snippet`.
      All specific snippets already do set a `snippet_name` in the context
      because it needs to be added in the classes.
      
      This commit therefore adds a `t-att-data-snippet` attribute on the
      base template, and populates with that same value in `onBuilt` for
      stable versions.
      
      During forward ports across stable versions, each new caller must be
      patched as well - and all patches must be removed in master.
      
      [1]: https://github.com/odoo/odoo/pull/53175
      
      
      
      task-2922635
      
      closes odoo/odoo#98924
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      d34925e3
    • Xavier Morel's avatar
      [FIX] core: ability to run tours in Chrome 111 · 0b0b7464
      Xavier Morel authored
      Chrome 111 enabled checking of websocket origin: if the WS connection
      sends an Origin head which is not whitelisted with the new
      `--remote-allow-origins` switch it is rejected.
      
      Turns out websocket-client (amongst others) *does* send an `Origin`,
      which trips the check, and means tours immediately break when trying
      to run them as Odoo's test harness is unable to connect to (and
      control) the devtools.
      
      Suppress sending `Origin` to fix the issue.
      
      Note: this also prevents using the remote developer tools by opening
      the devtools URL, user needs to go through chrome://inspect from the
      client and find / select the headless browser from there.
      
      Chrome 111 changeset: https://chromiumdash.appspot.com/commit/0154caeefc74530d5cb57ce71608beb1b77bca39
      
      Chrome tracker issue: https://crbug.com/1422444
      
      
      
      closes odoo/odoo#115021
      
      X-original-commit: d12d292c
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      0b0b7464
  4. Feb 20, 2023
  5. Mar 12, 2023
  6. Mar 10, 2023
    • kais-odoo's avatar
      [FIX] hr_timesheet: remove the `Awesome Timesheet` in res setting · 66bf586a
      kais-odoo authored
      
      This commit removes all links to the `Awesome Timesheet` app since
      this app has been recently removed.
      
      closes odoo/odoo#114890
      
      Related: odoo/enterprise#38004
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      66bf586a
    • Benjamin Vray's avatar
      [FIX] web_editor: fix shape flipping · 256ff539
      Benjamin Vray authored
      This commit fixes an issue that causes thin spacing to appear between
      two snippets containing shapes. This bug had already been fixed in this
      commit [1] but the theme snippets have not been adapted to the changes.
      
      With this commit, the shapes of theme snippets are automatically adapted
      when they are dropped on the page.
      
      Steps to reproduce the bug:
      
      - Choose the "Clean Theme" for a website.
      - Drag and drop a "Call to action" snippet on the page.
      - Drag and drop a "Text" snippet with a dark background before it.
      - Resize the window to change the window width.
      - At some points, the gap will appear.
      
      [1]: https://github.com/odoo/odoo/commit/42b3ad10e0b32b7fc72f801e2c67d6baf938c566
      
      
      
      task-2824607
      opw-3069213
      opw-3057533
      
      closes odoo/odoo#108847
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      256ff539
    • Tiffany Chang (tic)'s avatar
      [FIX] stock: do not allow direct deletion of quants · 75a3885c
      Tiffany Chang (tic) authored
      
      Some users were updating their access rights to allow for direct
      deletion of quants. This could lead to the infamous:
      
      "It is not possible to unreserve more products of %s than you have in stock."
      
      error since directly deleting a quant bypasses the flows of correctly
      unreserving the amounts you are deleting. Therefore we now restrict
      the unlinking to:
      - when in sudo mode, since the automatic unlinking of zero quants always
        occurs in sudo mode.
      - stock manager when unlink access right = True. Normally we would allow
        any user with the unlink access to do it, but since we are using the
        existing `inventory_quantity` to ensure that reserved qtys of the
        quant are correctly unreserved before the unlinking, only stock
        managers will correctly do this unreservation.
      
      It is expected that some custom code may break due to this restriction,
      but if custom code is directly unlinking quants without a sudo or with a
      non-stock manager, then the code in these cases probably need to be
      fixed anyways since this will cause inconsistent db data and lead to
      the error above.
      
      closes odoo/odoo#113349
      
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      75a3885c
    • Tiffany Chang (tic)'s avatar
      [FIX] mrp: correct error for 0 unbuild qty · 6f317f21
      Tiffany Chang (tic) authored
      Incorrect error (ValueError) was being thrown instead of the proper
      ValidationError.
      
      Fixes: odoo/odoo#92799
      Part-of: odoo/odoo#113349
      6f317f21
    • Tiffany Chang (tic)'s avatar
      [FIX] stock: allow scrap uom editing in list view · da2e6cb3
      Tiffany Chang (tic) authored
      Due to the domain dependancy of `product_uom_id` on
      `product_uom_category_id`, a JS error was occurring since the field
      wasn't available in the view.
      
      Steps to reproduce:
      - create a scrap
      - select scrap in list view
      - try to edit the UoM
      
      Client Error occurs instead of allowing user to edit the UoM.
      
      Fixes: odoo/odoo#92800
      Part-of: odoo/odoo#113349
      da2e6cb3
    • Benjamin Vray's avatar
      [FIX] web_editor: fix shapes that disappear · 7fb4f114
      Benjamin Vray authored
      
      This commit fixes a bug where in some cases a shape disappears after
      applying a flip to it. This bug has been present since commit [1].
      
      Steps to reproduce the bug:
      
      - Choose the "Clean Theme" for a website.
      - Drag and drop a "Call to action" snippet on the page.
      - Click on one of the two buttons to flip the shape of this snippet.
      - Bug => The shape disappears.
      
      This was due to shape colors set by theme variables in some theme
      snippets (e.g. 'o-color-1'). When the background image url was recreated
      to apply the "flip", the color was not converted to hexadecimal.
      
      [1]: 42b3ad10
      
      task-2824607
      opw-3069213
      opw-3057533
      
      closes odoo/odoo#114684
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      7fb4f114
    • Julien Van Roy's avatar
      [ADD] l10n_lu_peppol_id: add peppol_identifier for Luxembourg · 4b1b9b49
      Julien Van Roy authored
      Some Luxembourg public institution do not have a VAT number but have
      been assigned an arbitrary number (see:
      https://pch.gouvernement.lu/fr/peppol.html
      
      ).
      
      This requires a new field: `l10n_lu_peppol_identifier`. For Luxembourg,
      the flow is then as follows: when exporting an electronic invoice, if
      the field exists and is set, we read it. Otherwise, we read the VAT.
      
      opw-3186147
      
      closes odoo/odoo#114822
      
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      4b1b9b49
  7. Mar 09, 2023
  8. Mar 08, 2023
Loading