Skip to content
Snippets Groups Projects
  1. Feb 19, 2021
  2. Feb 18, 2021
  3. Feb 17, 2021
  4. Feb 18, 2021
    • Christophe Monniez's avatar
      [IMP] tests: add data_dir support in test_module_operations · 781c9178
      Christophe Monniez authored
      
      In some situations, like during tests on runbot, the data-dir location
      may vary.
      
      With this commit, the `data-dir` CLI argument is added to the
      test_module_operations script.
      
      closes odoo/odoo#66422
      
      Signed-off-by: default avatarAdrian Torres (adt) <adt@odoo.com>
      781c9178
    • Nasreddin (bon)'s avatar
      [FIX] website_sale, *: display error message in "Extra Info" step · eb937352
      Nasreddin (bon) authored
      
      *: google_recaptcha, website_form
      
      Issue
      
              - Install 'Ecommerce' module
              - In settings, fill the "reCAPTCHA: Easy on Humans, Hard
                on Bots" option with random wrong site key and secret key
              - Open your ecommerce (go to /shop )
              - Add any product to cart and and open cart
              - Activate "Customize -> Extra Step Option"
              - Process to "Extra Info" step
              - Click on next
      
              Stuck at this step since next button does not react.
      
      Cause
      
              There is an error due to re-captcha feature that
              does not allowed to go to next step.
      
              The second issue is that the error is not displayed
              because missing message area in form.
      
      Solution
      
              Do not check recaptcha if 's_website_form_no_recaptcha' class
              present in form.
              Add span 's_website_form_result' to display error messages.
              Replace 'public' by 'site' in error message to fit google
              'field' name.
      
      opw-2456098
      
      closes odoo/odoo#66382
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      eb937352
    • Goffin Simon's avatar
      [FIX] project: Creating project via service product deletes contact's data · f3631036
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Let's consider a customer C1 with email address A1 and phone P1
      - Let's consider a project PR with C1 as customer
      - Let's consider a service product P with:
         - Milestones (manually set quantities on order) as Service Invoicing Policy
         - Create a new project but no task as service tracking
         - PR as project template
      - Create a sale order SO with C2 as customer with A2 as email address and P2 as phone
      - Confirm the SO
      
       Bug:
      
       The email address and phone of C2 were changed into A1 and P1 instead of keeping A2 and P2
      
       opw:2439459
      
      closes odoo/odoo#66307
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      f3631036
  5. Feb 15, 2021
    • Anh Thao Pham (pta)'s avatar
      [FIX] sale_timesheet: fix (re-)invoiced amount computed as other revenue · 4d9305d1
      Anh Thao Pham (pta) authored
      
      - Install sale_timesheet and hr_expense
      - Create a Service Product with "Create a task in sales order's project" as Service Tracking (i.e. Service X)
      - Create a Product with "Can be Expensed" and "At cost" as "Re-Invoice Expenses" (i.e. Expense X)
      - Create a SO with Service X (i.e. Unit Price: 50.0) and confirm it
      - Go to Expenses and create an Expense:
        * Product: Expense Y
        * Unit Price: 25.0
        * Customer to Reinvoice: [select the created SO]
      - Create Report, Approve and Post journal entries
      - From SO, create an Invoice (Service Y + Expense Y) and confirm it
      In Project Overview, the expense is computed in Other Revenues and
      Re-invoiced costs. Therefore, the amount of the expense is added twice
      in the Profitability total.
      In Project > Reporting > Project Costs and Revenues, for Project linked
      to SO, Untaxed Amount Invoiced and Untaxed Amount Re-Invoiced are also
      computed in Other Revenues.
      
      opw-2444237
      
      closes odoo/odoo#66186
      
      Signed-off-by: default avatarAnh Thao PHAM <kitan191@users.noreply.github.com>
      4d9305d1
  6. Feb 18, 2021
    • Laurent Smet's avatar
      [FIX] account: Set memo to ref if not payment_reference · 7a7dc212
      Laurent Smet authored
      
      Issue
      
      	- Install "Accounting" module
      	- Create a new bill :
      	- Set vendor
      	- Set no payment reference
      	- Set a bill reference
      	- Add products to bill
      	- Confirm and click on Register Payment
      
      	Memo field has no value.
      
      Cause
      
      	The memo field is based on lines name.
      	Lines name is computed in `_onchange_payment_reference`
      	and depends only on payment_referecence.
      
      Solution
      
      	If no `payment_reference`, fallback on `ref` to set line name.
      
      opw-2440389
      
      closes odoo/odoo#66158
      
      Co-author: nboulif <bon@odoo.com>
      X-original-commit: 10274903
      Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      7a7dc212
    • Romeo Fragomeli's avatar
      [FIX] web: client report action mounted called twice · d3854dbf
      Romeo Fragomeli authored
      
      Before this commit, the 'mounted' method of the ControlPanel in
      the client report action  was called twice.
      
      It happened because the client report action updated the ControlPanel
      before being actually mounted, so mounted was called once when the
      traceability report was mounted, and once when the update was applied.
      
      Ideally, this should not be an issue (this isn't an issue with owl).
      However, in Odoo, we mix layers of Owl Components and legacy
      widgets. In these situations, the above scenario isn't properly
      handled (and can't be).
      
      As a consequence, in mobile (enterprise), it crashed because an
      handler bound in mounted (thus twice) was only unbound once.
      
      This commit avoids the issue as the update was actually useless.
      
      Steps to reproduces (Mobile):
      * Go to Inventory (Stock)
      * Open the "burger menu"
      * Select "Products" -> "Products"
      * Select one product in the list
      * Click on the "Forecasted" ("stat button")
      * Select one "SO line" (sale order) to go to the form view
      * Go back to the previous view using breadcrumb
      * Optional: Go to another app if the screen can't scroll (e.g. go to Sales)
      * Scroll the view => Bug
      
      closes odoo/odoo#65522
      
      Related: odoo/enterprise#16033
      Signed-off-by: default avatarAdrien Dieudonné (adr) <adr@odoo.com>
      d3854dbf
    • Romeo Fragomeli's avatar
      [FIX] stock: traceability report mounted called twice · bbcd8ce0
      Romeo Fragomeli authored
      Before this commit, the 'mounted' method of the ControlPanel in
      the traceability report was called twice.
      
      It happened because the traceability report updated the ControlPanel
      before being actually mounted, so mounted was called once when the
      traceability report was mounted, and once when the update was applied.
      
      Ideally, this should not be an issue (this isn't an issue with owl).
      However, in Odoo, we mix layers of Owl Components and legacy
      widgets. In these situations, the above scenario isn't properly
      handled (and can't be).
      
      As a consequence, in mobile (enterprise), it crashed because an
      handler bound in mounted (thus twice) was only unbound once.
      
      This commit avoids the issue as the update was actually useless.
      
      Steps to reproduces (Mobile):
      * Go to Manufacturing (MRP)
      * Open the "burger menu"
      * Select "Products" -> "Lots/Serial Numbers"
      * Select one product in the list (unfold group first)
      * Click on the "Traceability" ("stat button")
      * Select one line to go to the form view
      * Go back to the previous view using breadcrumb
      * Optional: Go to another app if the screen can't scroll (e.g. go to Sales)
      * Scroll the view => Bug
      bbcd8ce0
  7. Feb 15, 2021
    • Nasreddin (bon)'s avatar
      [FIX] account_facturx: Parse pdf attachment · 0f6ad2a6
      Nasreddin (bon) authored
      
      Solution is different in the case of the foward-port, see bellow.
      
      Issue
      
      	- Init an instances of Odoo v13.0 'A' and v14.0 'B'.
      	- Install "Accounting" app on instance A & B.
      	- Set your email server on instance A & B.
      	- Activate 'External email server' in settings of instance A.
      	- Set an email alias for "Vendor Bills" on instance A.
      	- Send a "Customer Invoice" from instance B to alias of instance A.
      	- Fetch for new mail (in case new vendor bill don't appear) on instance A.
      	- Open the new Vendor bill on instance A.
      
      	Data are not parsed from pdf attachment.
      
      Cause
      
      	No managing all attachements types:
      	- list(tuple(str,str), tuple(str,str, dict) or int) attachments : list of attachment tuples in the form
                ``(name,content)`` or ``(name,content, info)``, where content is NOT base64 encoded
      	- list id attachment_ids: list of existing attachement to link to this message
                - Should only be setted by chatter
                - Attachement object attached to mail.compose.message(0) will be attached
                  to the related document.
      
      Solution
      
      	In this fw-port, we override `_message_post_after_hook` instead of
      	`_message_post_process_attachments` because the later is also called
      	from portal and with sudo rights. We don't want to update invoices with
      	files coming from portal, since it could cause a security issue.
      	Also, because of the way attachments are parsed for invoice, this could
      	cause the OCR not to work any longer because at the time
      	`_message_post_process_attachments` is called,`move.message_main_attachment_id`
      	is not set yet, and OCR relies on it.
      	The solution is rather to override `_message_post_after_hook` because
      	it ensures that all the attachments have been properly treated and are
      	present in `new_message.attachment_ids`, and `message_main_attachment_id`
      	is properly set.
      
      opw-2411002
      
      closes odoo/odoo#64286
      
      X-original-commit: 9076b1ba
      Signed-off-by: default avatarbon-odoo <nboulif@users.noreply.github.com>
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      0f6ad2a6
  8. Feb 18, 2021
  9. Feb 17, 2021
    • Benjamin Vray's avatar
      [FIX] website_forum: remove o_we_selected_image class on post images · 5051e890
      Benjamin Vray authored
      
      Before this commit, the o_we_selected_image class was not removed from
      forum post when saving.
      
      task-2312878
      Part of #66316
      
      closes odoo/odoo#66384
      
      X-original-commit: 876bb9cb
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      5051e890
    • Benjamin Vray's avatar
      [FIX] website_forum: fix selector in event of the submit btn of a post · 2363a32b
      Benjamin Vray authored
      A comma was removed in the following commit for no reason
      912996fe . Because of this, the click
      event of the forum post submit button was not working.
      
      task-2312878
      Part of #66316
      
      X-original-commit: 3509d438
      2363a32b
    • Tiffany Chang (tic)'s avatar
      [FIX] stock: make package level package consistent · 2b04f862
      Tiffany Chang (tic) authored
      
      Currently a package level is created and has the newly created package
      assigned to it when "Put In Pack" is used. Unfortunately if a move line
      has its result_package_id changed after having a package assigned via
      the Put In Pack, then the package level's package_id isn't correctly
      updated. This leads to incorrect data in the db. This incorrect data
      doesn't affect much since result_package_id from an entire package move
      cannot be changed in any views, but it does mean that the created
      package associated with the package level can never be deleted even if
      it's never used.
      
      Steps to reproduce:
      1. active (delivery) packages in settings
      2. create a picking and create some done values
      3. use "Put In Pack" to put done move lines into a package
      4. change the newly created Destination Package to another package
      5. Go to Packages and try to delete the package created by Put In Pack
      
      Expected result: able to delete the package
      Actual result: Server error that package is still required by Stock
      Package Level.
      
      This is a short term fix. In the long run it would be better to fix the
      package_level logic so it isn't unnecessarily assigned to moves/move
      lines and/or updates in a cleaner way.
      
      Task ID: 2418907
      
      closes odoo/odoo#66391
      
      X-original-commit: e5ab8cf9
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      2b04f862
    • Nicolas Lempereur's avatar
      [FIX] stock: variant price on report Product Label (ZPL) · 7822b5bc
      Nicolas Lempereur authored
      
      With this change, we show the variant price when printing ZPL
      product.product report and not the template as we did before.
      
      This way it is the same as what we see in Odoo as well as when printing
      PDF label of the product.
      
      targetting only 14.0 for now (but could be backported in stock_zebra)
      
      opw-2455291
      
      closes odoo/odoo#66385
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      7822b5bc
    • Joseph Caburnay's avatar
      [FIX] pos_hr: loading crash when employee record is deleted · 17604630
      Joseph Caburnay authored
      
      To reproduce:
      0. Login as admin.
      1. Install pos_hr.
      2. Open a pos session without activating the Authorized employees feature.
      3. Make an order as Mitchell admin but **don't** validate, order is just
      in the localStorage.
      4. Go back to the backend (without closing the browser).
      5. Close the session.
      6. Edit the pos config and activate authorized employees.
      7. Delete the employee record linked to the admin user.
      8. Open a new session using the modified pos config.
      9. [Crash] Because of missing employee.
      
      Solution:
      We just make sure to prevent field access on missing undefined object.
      
      closes odoo/odoo#66319
      
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      17604630
  10. Feb 15, 2021
  11. Feb 02, 2021
    • bit-odoo's avatar
      [FIX] project: filter when not required · b13fc817
      bit-odoo authored
      
      Before this commit:
      
      A method action_subtask is including the other actions context if have which
      reflects while clicking on the Sub-tasks stat button. For examples:
      
      - When click on the stat button 'Sub-tasks' of any task which one is clicked by
        systray activity icon results
      - When click on the task menu in project there a default search filter 'My task'
        which also passes when click on 'sub tasks' stat button
      
      After this commit:
      
      Remove the context that startswith `search_default'.
      Hence, now subtask will display with the correct context.
      
      Task-2413127
      
      closes odoo/odoo#65395
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      b13fc817
  12. Jan 25, 2021
  13. Feb 17, 2021
    • Mohammed Shekha's avatar
      [FIX] web: do not display cover images in sample data · f7b2a582
      Mohammed Shekha authored
      
      Before this commit, in sample mode, cover images might be displayed
      in kanban views. It isn't what we want as those images are real
      images from the database, not sample ones, but randomly linked to
      the sample records (the id of many2one fields is randomly generated).
      
      This commit tweaks the SampleServer to always set many2one fields
      pointing to model 'ir.attachment' to false.
      
      task-2368505
      
      closes odoo/odoo#66350
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      f7b2a582
    • Arnold Moyaux's avatar
      [FIX] stock: couldn't unreserve mixed tracking stock · 572ba1be
      Arnold Moyaux authored
      
      - Install stock
      - Go to Inventory > Configuration > Settings and enable "Lots" and "Storage Locations"
      - Create a Product tracked By Lots (i.e. Product X)
      - Go to Inventory > Operations > Inventory Adjustments
      - Create an Inventory Adjustment for Product X:
      
           Product   |   Location   |   Lot/SN   |   Real Quantity
       -------------------------------------------------------------
          Product X  |   WH/Stock   |   LOT 01   |       20
          Product X  |   WH/Stock   |            |       10
      
      - Validate Inventory
      - Go to Inventory > Operations > Transfers and create one:
        * Source Location: WH/Stock
        * Destination Location: WH/Stock/Shelf1
        * Operation Type: Internal Transfers
        * Operations:
          [Product: Product X, Initial Demand: 25]
      - Save Transfer, Mark As Todo and Check availability
      - Click on list icon of Operation line for Product X to display Detailed Operations
      - 20 units of LOT 01 and 5 units without lot have been reserved
      - Set LOT 01 for the 5 reserved units without lot and confirm
      - Open Detailed Operations again
      - There are now 20 units of LOT 01 and 5 units of LOT 01
      - Remove the row with 5 units and confirm
      - Check availability and open Detailed Operation
      - There is now only a row with 25 reserved units of LOT 01
      - Unreserve
      The following errror is raised:
      "It is not possible to unreserve more products of P than you have in stock."
      
      It happens because the system is not able to manage quants with lots and
      wihtout lots at the same time. When modifying the move line to 25
      reserved units. It's composed of 20 quants with lot and 5 quants without
      lot. And when unreserving it will check if there is a quants with 25
      units with the lot and if it's not found 25 units without lot. But never
      25 units of quants with lots and without lots.
      
      opw-2419444
      
      Close #64497
      
      closes odoo/odoo#66347
      
      X-original-commit: 3b59d0b1
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      572ba1be
    • wan's avatar
      [FIX] account: wrong batching to compute the name · f816c326
      wan authored
      
      Reproduce:
      * Create one move in a journal
      * Create another move in another journal but in the same year
      * Both journals should have a yearly sequence reset
      * Post both moves at the same time
      
      Bug:
      They both are using the same sequence.
      
      Expected:
      Both should be using their own sequence.
      
      closes odoo/odoo#66341
      
      Signed-off-by: default avatarQuentin De Paoli (qdp) <qdp@openerp.com>
      f816c326
  14. Feb 16, 2021
    • Nicolas Lempereur's avatar
      [FIX] base: mail signature CSS inlined for icons etc · 5e093b7a
      Nicolas Lempereur authored
      
      The mail signature of an user did not inline the CSS like the body of a
      message, so for example icons seemed to work but would not be seen
      (unless the mail reader had the same font-awesome system).
      
      With this change we inline the signature too.
      
      On edition there was also an issue since the original icon was saved as
      data-class which was stripped: so eg. when editing a mail.message with
      working icon, the icons would disappear.
      
      opw-2453912
      
      closes odoo/odoo#66264
      
      X-original-commit: a723bcbe
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      5e093b7a
  15. Feb 15, 2021
    • Nicolas Lempereur's avatar
      [FIX] point_of_sale: select employee with pin by barcode · d056feb4
      Nicolas Lempereur authored
      
      When switching employee on point of sale, we may have a PIN to enter.
      
      If we enter the barcode and there is a PIN, we get an "Invalid Password"
      error.
      
      Why:
      ====
      
      When we switch with a barcode 12, the barcode system will catch events
      and prevent their propagation:
      
      - {'type': 'keypress', 'key': 49}
      - {'type': 'keypress', 'key': 50}
      - {'type': 'keypress', 'key': 13}
      
      For respectively '1', '2', 'Newline'.
      
      If it match an employee, the PIN number modal is opened which will
      listen to KEYUP events => it receives very shortly:
      
      - {'type': 'KEYUP', 'key': 13}
      
      which is the newline character which follows the KEYPRESS.
      
      With a "Return" key received, the PIN modale closes with empty value
      and an error "Invalid Password" is shown.
      
      Solution:
      =========
      
      Ignore the newline character if no number has been selected.
      
      opw-2448585
      
      closes odoo/odoo#66117
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      Co-authored-by: default avatarJoseph Caburnay <jcb@odoo.com>
      d056feb4
  16. Feb 16, 2021
    • Goffin Simon's avatar
      [FIX] hr: Officer Access Right - Gamification · 02d32aa9
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Let's consider a user U with employee officer access rights
      - Log with U and go to Employee in debug mode
      
      Bug:
      
      The following menus
      
      - Configuration/Challenges
      - Configuration/Departments
      - Configuration/Goals history
      
      were not accessible
      
      opw:2450931
      
      closes odoo/odoo#66284
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      02d32aa9
Loading