Skip to content
Snippets Groups Projects
  1. Mar 20, 2022
  2. Mar 18, 2022
    • Florian Damhaut's avatar
      [IMP] payment_ingenico: add possibility to use sha256 · a11094dd
      Florian Damhaut authored
      
      SHA1 is going to be deprecated by ogone.
      This change try to keep current behaviour while adding
      the possibility to use SHA256 and SHA512
      
      As this change as to be done in stable version,
      We use the length of the key to know which version of SHA
      we should use.
      
      The goal is to switch add an selection to master to ensure
      better code modularity.
      
      The change was requested by PDE/ANV.
      
      opw-2766648
      
      closes odoo/odoo#86642
      
      X-original-commit: 759411fa
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      Signed-off-by: default avatarDamhaut Florian (flda) <flda@odoo.com>
      a11094dd
    • Goffin Simon's avatar
      [FIX] sale: Wrong currency conversion with pricelist · c009704e
      Goffin Simon authored
      
      Steps to reproduce the issue:
      
      - Let's consider a company C in $ and the rate conversion from $ to € is 0.5
      - Let's consider a product P
      - Let's consider a pricelist PL1 in € such as P is set to 100€
      - Let's consider a pricelist PL2 in $ such as P id set to 100$
      - Create a sale order SO with PL1
      - Create a line with P
      
      Bug:
      
      The unit price of P was 200€ instead of 100€ because field currency_id was not set on the line
      when trying to pass it to function _get_tax_included_unit_price
      
      opw:2789324
      
      closes odoo/odoo#86483
      
      Signed-off-by: default avatarSimon Goffin <sig@odoo.com>
      c009704e
    • dbkosky's avatar
      [FIX] l10n_it_edi: Tax calculation fails edi constraint if tax price included · def954e8
      dbkosky authored
      
      When using price included taxes, the xml contained data that failed to
      meet the constraints of the edi. This is due to the local rounding on
      the lines of the invoice.
      For example:
      
      	A product costing 321€, on two lines of the invoice, with
      	a price included tax of 22%
      	Rounded per line:
      	float_round(
      		321 - (321/122 * 100),
      		2 # To two decimal places
      	)
      	evaluates to 57.89, the total tax will be 2 * 57.89 = 115.78
      
      	In the case of global rounding
      	float_round(
      		321 + 321 - (321/122*100) - (321/122*100),
      		2 # To two decimal places
      	)
      	evaluates to 115.77,
      
      	so we have a difference of one cent.
      
      This can be exacerbated by more lines.
      
      The constraints on the EDI that this conflicts with are on the tax
      summary section for each tax.
      The constraints (roughly reworded):
      00422:  The base taxable amount for the tax must be equal to the sum of
      	the base product prices (for which we have already used the
      	rounded computed values, calcuated in the invoice) +
      	<Arrotondamento> (rounding).
      
      00421:  The value provided for the <importo> that is the value of the
      	vat is equal to the taxable base multiplied by the tax rate.
      
      The problem is that because of our local roundings, the taxable base
      is equal to our products, but the tax rate * taxable base is not equal
      to the tax amount (as present in the invoice).
      
      This commit adds to the rounding field and subtracts from the
      taxable base of the tax summary a value rounding value that
      should make tax rate * taxable base equal to the value of the vat.
      
      closes odoo/odoo#86052
      
      Task: 2789290
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      def954e8
    • Enric Tobella's avatar
      [FIX] point_of_sale: properly reconcile receivable lines · cbcd8a8b
      Enric Tobella authored
      
      Description of the issue/feature this PR addresses:
      Fixes an error raised by #84827
      
      Current behavior before PR:
      The following error was found
      
      Add the option Print invoices on customer requeston a Pos Config.
      Open a session
      Create 2 orders for the same customer and invoice them
      Return one of the orders and invoice it
      Two account moves will have amount_residual != 0 (the credit note and one of the orders) (tested on runbot)
      
      Desired behavior after PR is merged:
      
      The result is that all moves are reconciled.
      
      In order to not loose it, I added tests for this issue and the issue fixed on #84827
      
      closes odoo/odoo#86656
      
      X-original-commit: c66d708a
      Signed-off-by: default avatarGrazioso Andrea (agr) <agr@odoo.com>
      cbcd8a8b
    • Samuel Degueldre's avatar
      [FIX] web_editor: use strict equal instead of =like in shape controller · d2ef9c62
      Samuel Degueldre authored
      
      Currently, the shape controller uses =like when looking for an
      attachment with a matching URL, but what is compared against is the
      request's path. While this is not a security issue as we know the path
      starts with the controller's route and only look for public attachments,
      it's still undesirable as the end of the url may contain underscores or
      percent and we do not want those to be interpreted as a pattern.
      
      closes odoo/odoo#86623
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      d2ef9c62
    • Adrien Widart's avatar
      [FIX] sale_purchase: adapt POL description · 766964e4
      Adrien Widart authored
      
      When confirming a sale order, if a purchase order is generated, the
      descriptions of the PO's lines won't be adapted to the vendor
      
      To reproduce the issue:
      1. Create a vendor V
      2. Create a product P:
          - Type: Service
          - In Purchase, add a line L01:
              - Vendor: V
              - Vendor Product Name: Name01
              - Vendor Product Code: C01
          - Purchase Automatically: True
      3. Create and Confirm a SO with 1 x P
      4. Open the generated PO
      
      Error: The description is incorrect (it's the standard name of P instead
      of "[C01] Name01")
      
      OPW-2777702
      
      closes odoo/odoo#86256
      
      closes odoo/odoo#86547
      
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      766964e4
    • Davan CHIEM DAO's avatar
      [FIX] l10n_it_edi: Product matching from invoice import · b7d45808
      Davan CHIEM DAO authored
      
      This fixes erroneous matching of product when the product code in an invoice is ambiguous and fixes a missuse of the label from a product rather than the one on the invoice
      
      Previously, a product would be set on an invoice line even if several products share the product code and when a product is set the label is the one of the matched product
      Now, a product is set if the code matches one and only one product and the label used is always the one from the invoice
      
      closes odoo/odoo#86590
      
      Task: 2764978
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      b7d45808
  3. Mar 17, 2022
    • dbkosky's avatar
      [FIX] l10n_it_edi: Mismatching IdCodice · e961ff22
      dbkosky authored
      
      When codice fiscale is not the same as the partita IVA, the template was
      utilising the wrong value for IdCodice in <IdTrasmittente>. It should
      use the value of codice fiscale, and if it's not found, then use the vat
      value (e.g. when it's not an Italian company).
      
      closes odoo/odoo#86441
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      e961ff22
    • dbkosky's avatar
      [FIX] l10n_it_edi: PrezzoUnitario 100% discount · 23e84145
      dbkosky authored
      
      PrezzoUnitario causes an error when the discount is 100% as it tries to
      divide by zero. Fix this by just using the unit price when the discount
      is 100%.
      
      closes odoo/odoo#86569
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      23e84145
    • dbkosky's avatar
      [FIX] l10n_it_edi: edi rejects IdDocumento · 2c76293c
      dbkosky authored
      The EDI rejects the xml if the <IdDocumento/> is longer than 20
      characters long.
      
      Part-of: odoo/odoo#86569
      2c76293c
    • Katherine Zaoral's avatar
      [FIX] l10n_ar: share sequences compute sequences · 11551f36
      Katherine Zaoral authored
      
      Before this change, we have the errors that documents generated on
      pre-printed sales journals mark as unified book were wrongly
      named using the wrong doc prefix code.
      
      This was visible thanks to the demo data were we notices that the credit
      notes were having FA- doc prefix instead of NC-
      
      This was because we are reusing the shared sequence directly, now we
      check and fix the doc prefix for those cases and all documents generated
      on shared sequences are properly named.
      
      closes odoo/odoo#85170
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      11551f36
    • dbkosky's avatar
      [FIX] account_edi_proxy_client: don't update the demo state · 1d3cd7ee
      dbkosky authored
      
      The issue is that the config param is data, which means that when the
      module is updated, the config parameter will be updated (i.e. reset to
      the 'demo' state), which will cause havoc on client databases. Even if
      we set the record to 'noupdate=1', the existing clients will have the
      record updated.
      
      The solution is to remove the config param from the data entirely, thus
      preventing it from being updated when updating the module, and instead
      have a 'post_init_hook' that sets the parameter to 'demo' (this will
      only happen when the module is installed, and never again).
      
      closes odoo/odoo#86535
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      1d3cd7ee
    • Wolfgang Taferner's avatar
      [FIX] delivery: update_prices does ignore shipping rate · c888fe08
      Wolfgang Taferner authored
      
      As sale does not know about special lines it will always update
      the price based on product and price list instead of applying the correct
      shipping rate, so we do skip those lines by using a newly introduced hook method
      
      closes odoo/odoo#85884
      
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      c888fe08
  4. Mar 16, 2022
    • Nicolas (vin)'s avatar
      [IMP] account: allow trying to upload the same file · 2b4e4e1f
      Nicolas (vin) authored
      Since https://github.com/odoo/odoo/commit/cb6c6224be4eaa80091f51f957059de889332e68
      
      
      we are now raising possible errors when uploading an invoice.
      In 14.0+ we are allowing via a redirect warning to change the status of
      the currency without changing the page but the upload only starts when
      you change the uploaded file.
      So the following flow does not work:
          - Try to upload a bill with MXN currency
          - With MXN being inactive, it raises an error. Using the redirect warning action
            we activate the currency, clos the modale window and try to upload
            again.
          - The upload won't work until we refresh the page, because the value
            of the input file does not change (or we need to select another
            one, then the first one again)
      This change reset the file input if there is an error raised during the
      upload allowing to select the same file more than once without reloading.
      
      closes odoo/odoo#86504
      
      X-original-commit: 4bfc7507
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      2b4e4e1f
    • roen-odoo's avatar
      [FIX] stock_picking_batch: Add multicompany rule for batch picking · 6fd81a1e
      roen-odoo authored
      
      Current behavior:
      All batch transfers are shown in the tree view. But only the one for the allowed companies should be in the list
      
      Steps to reproduce:
      - Be in a multicompany environnement
      - Activate batch picking
      - Go in Inventory/Batch transfers
      
      opw-2752617
      
      closes odoo/odoo#86498
      
      X-original-commit: 8415b48c
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      Signed-off-by: default avatarEngels Robin (roen) <roen@odoo.com>
      6fd81a1e
    • rhe-odoo's avatar
      [FIX] point_of_sale: cash rounding refund · 421e9d91
      rhe-odoo authored
      
      Cash rounding value were not added with negative amount.
      For example if you made an order:
        - amount of the order: 1.98
        - rounding value: 0.05
        - amount to pay: 2.00
      The refund of this order should be:
        - amount of the order: - 1.98
        - amount to pay: - 2.00
        - amount to pay before the fix: - 1.98
      
      Because when we added the latest fix that allowed payment lower than the cash rounding value (for example an order amount of 0.03 with a cash rounding for 0.05), the negative amount were not taken into account.
      Whenever a negative amount had to be paid, the condition was triggered and return a 0 as rounding to apply (-1.98 < 0.05 => true).
      Now we check the absolute value of the total amount to consider if we need to apply a rounding.
      
      closes odoo/odoo#85280
      
      Signed-off-by: default avatarMasereel Pierre <pim@odoo.com>
      421e9d91
  5. Mar 15, 2022
  6. Mar 14, 2022
    • Munaf Khan's avatar
      [FIX] digest: fix digest mail failure due to blank "From" field · 64af6473
      Munaf Khan authored
      
      Currently while sending a digest, if a company does not have an email
      address set, the "From" field for the mail is blank and so trying to
      send digest fails.
      
      With this commit, if a company does not have an email address set, it
      will fallback to logged in user's email address as a "From" value.
      In most cases, it will be the Odoobot email address (if the digest is
      sent with the CRON) but if the admin send manually the digest, we will
      use the admin email address.
      
      TaskID-2729780
      
      closes odoo/odoo#83808
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      64af6473
    • Adrien Widart's avatar
      [FIX] purchase_stock: include "to approve" PO in forecasted report · 6f1d750c
      Adrien Widart authored
      
      When a PO is in the "To Approve" state, it disappears from the
      forecasted report
      
      To reproduce the issue:
      1. In Settings, enable "Purchase Order Approval" with a minimum amount
      equal to 0
      2. Create a storable product P
      3. With Marc Demo:
          - Create a PO with 50 x P
          - Consult the forecasted report of P: there are 50 x P "Forecasted +
      Pending"
          - Confirm the PO (its state becomes "To Approve")
          - Consult the forecasted report of P
      
      Error: The 50 x P disappeared: 0 On Hand, 0 Forecasted, 0 Forecasted +
      Pending. We should still see 50 Forecasted + Pending
      
      OPW-2774586
      
      closes odoo/odoo#86161
      
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      6f1d750c
    • anhe-odoo's avatar
      [FIX] stock_account: don't update inventory valuation for negative quantity · 673a6b69
      anhe-odoo authored
      
      Expected Behaviour
      
      When updating the cost of a product with a negative quantity and then
      making an inventory adjustment, the final value should be corrected according
      to the current cost of the product
      
      Observed Behaviour
      
      In the case we had a negative quantity when changing the cost, the compensation
      layer will be ignored when doing an inventory adjustment afterward, leading to
      an incorrect total value in the inventory valuation
      
      Reproducibility
      
      This bug can be reproduced following these steps:
      - Create Storable product with costing method = AVCO Automated, Update cost to 100$
      - Sell 10 units of this product (Inventory valuation at -1000 $ for -10 units)
      - Update cost of the product to 10 $ (Inventory valuation at -100 $ for -10 units)
      - Create an inventory adjustment to set the quantity of the product to 0.
      ==> Inventory valuation is a 900 $ for 0 unit of our product
      
      Related Issues/PR
      
      - opw-2635692
      
      closes odoo/odoo#86328
      
      X-original-commit: 2e4fdcb8
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      Signed-off-by: default avatarHendrickx Anthony (anhe) <anhe@odoo.com>
      673a6b69
    • Florian Damhaut's avatar
      [FIX] sale_management: confirmation mail for unregistered users · 8ece0413
      Florian Damhaut authored
      
      Step to reproduce:
      - Create a Quotation Template QT and set in in the sale settings
      - In the confirmation Tab of QT add a confirmation email
      - As a portal user, purchase an item in ecommerce
       The payment must be confirmed. (tested using payment_test module)
      
      Current Behaviour:
      - Traceback on confirmation email rendering, portal user do not
       have access to the full data.
      
      Behaviour after PR:
      - Email is rendered as superuser to ensure data is correctly
       fetched
      
      opw-2749804
      
      closes odoo/odoo#85186
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      8ece0413
    • Artem's avatar
      [FIX] base: use current company when rendering report · 3c626331
      Artem authored
      
      Fixes odoo/odoo#86216
      When printing qweb report use the current company.
      For example, the company logo printed was always from user company
      default instead of the current company.
      
      closes odoo/odoo#86220
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      3c626331
    • Artem's avatar
      [CLA] signature for shurshilov · 572122b3
      Artem authored
      Part-of: odoo/odoo#86220
      572122b3
    • Kevin Baptiste's avatar
      [FIX] lunch: show correct order price · a0185c17
      Kevin Baptiste authored
      
      THe price shown on the order line was not taking into account the
      quantities ordered.
      
      closes odoo/odoo#85846
      
      Taskid: 2678064
      X-original-commit: f9243560
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      a0185c17
  7. Mar 13, 2022
  8. Mar 11, 2022
    • Brice bib Bartoletti's avatar
      [FIX] l10n_eu_services:apply tag from localization · 88021358
      Brice bib Bartoletti authored
      This commit aims to allow assigning tags to the taxes
      created by the OSS feature by providing the xml_id of their
      report.line in the eu_tag_map.py file.
      
      Before this commit:
      In l10n_be, the taxes created by OSS (l10n_eu_services) didn't set
      the tag +47 on invoice_repartition_lines nor +49 on
      refund_repartition_lines.
      This make the VAT report for Belgium wrong.
      
      After this commit:
      Taxes created by OSS for a company using the belgian CoA will get
      their tags set properly and thus will the taxes impact the
      belgian tax report correctly.
      
      task: 2770182
      ticket: 2768622
      
      Community-PR: https://github.com/odoo/odoo/pull/85607
      
      
      
      Design choices:
      This fix is currently solving the issue for l10n_be but we have
      no doubt that it will be raised for other EU countries too.
      
      In order to provide the tags, we decided to be consistent with
      what as been done regarding the tax mapping. Thus we decided to
      create and maintain a simple mapping file and to test it.
      
      several other methods were explored:
      - create a global variable and update it from all localization
      modules. This method would work but is ugly and error prone.
      
      - create a templating method and override it from localization
      modules.
      The problem is where to set the root of the template method?
      The naïve solution would be to create a bridge module between
      l10n_eu_services and l10n_be but that would lead to an explosion
      in the number of bridge modules which we don't want.
      
      In order to keep things simple and generic, we could put the
      template method directly into the account module. But it is kind
      of ugly because account shouldn't know anything about the oss
      feature and it would encourage such a leaky design to happen
      again in the future.
      
      closes odoo/odoo#86295
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      Signed-off-by: default avatarBrice Bartoletti <bib@odoo.com>
      88021358
    • Brice bib Bartoletti's avatar
      [IMP] l10n_eu_services: makes code more readable · 61249a43
      Brice bib Bartoletti authored
      Improves l10n_eu_services code readability
      
      Part-of: odoo/odoo#86295
      61249a43
    • William Braeckman's avatar
      [FIX] hr_attendance: fix wrong widget being used · fb6b683e
      William Braeckman authored
      
      The smartbutton for the number of hours in the attendance smart button
      on employees and user did not use the right widget and could display
      invalid data like '1.8 hours last month'.
      
      TaskId-
      
      closes odoo/odoo#86247
      
      X-original-commit: 230f9185
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      Signed-off-by: default avatarWilliam Braeckman (wbr) <wbr@odoo.com>
      fb6b683e
  9. Mar 10, 2022
  10. Mar 11, 2022
    • Raphael Collet's avatar
      [FIX] fields: ondelete being None on many2many field · 816ba6f5
      Raphael Collet authored
      
      The issue is simply creating a related stored many2many field, which is
      pretty easy to do with Studio.  When creating the field, Odoo crashes
      with a traceback caused by ondelete being None on the field.
      
      The source of the bug is the fact that the attribute field.ondelete is
      set to a sensible default ('cascade') on non-related fields only.  The
      fix consists in setting the default value on the attribute itself, so
      that the setup of the field never falls on a case where field.ondelete
      is unset.
      
      closes odoo/odoo#86255
      
      X-original-commit: 2bb126c5
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      816ba6f5
    • Guillaume (guva)'s avatar
      [FIX] account: currency writeoff suggestion · 40bbca97
      Guillaume (guva) authored
      
      When having a bank statement line in foreign currency, the writeoff line is display with the right sign but with the amount in company currency.
      
      This is happening in two scenarios :
      
      1 - With a bank journal in foreign currency, and a reconciliation model
      with 'rule_type' 'invoice_matching' and 'match_total_amount' at 90 for example.
      Create an invoice in the foreign currency for price 100, and create a bank
      statement on the journal with a line amount of 90 (payment_ref set with the
      invoice name). Then confirm and reconcile -> the writeoff amount is display with
      the right currency sign, but in company currency
      
      2 - With a bank journal in company currency, and a reconciliation model
      with 'rule_type' 'writeoff_suggestion'. Create a bank statement with a line
      with amount X, amount_currency Y, foreign_currency set. Confirm and reconcile
      -> writeoff amount is the amount with the foreign currency sign, instead of the amount_currency.
      
      opw-2695846
      opw-2731737
      
      closes odoo/odoo#85475
      
      Related: odoo/enterprise#24739
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      40bbca97
    • Paolo (pgi)'s avatar
      [IMP] account: display access button in notification emails for users and customers · 1ef5fa47
      Paolo (pgi) authored
      If applied, this PR will enable button_access for all users and portal_customers, letting them
      access the documents directly. The button "View Journal Entries" will appear on the notification
      email, and by clicking this the user will be directed to the portal page of the invoice/refund.
      All users and portal_customers subscribed to the thread should be able to see this button.
      
      A following refactor by TDE (#82167) has addressed this problem in master (for 15.2).
      For stable versions, in this PR, we agreed to keep changes limited to the accounting scope.
      
      Ticket link: https://www.odoo.com/web#id=2645653&model=project.task
      
      
      
      opw-2645653
      
      closes odoo/odoo#86214
      
      X-original-commit: de8d1632
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      Signed-off-by: default avatarPaolo Gatti (pgi) <pgi@odoo.com>
      1ef5fa47
    • David Tran's avatar
      [I18N] mail: add missing func _ for messages · a7d68627
      David Tran authored
      
      closes odoo/odoo#86227
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      a7d68627
    • Victor Feyens's avatar
      [FIX] sale_margin: conflicting view ids · 6fff9ac8
      Victor Feyens authored
      
      Finetuning of #85774
      Fixes #86174
      
      closes odoo/odoo#86198
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      6fff9ac8
  11. Mar 10, 2022
Loading