Skip to content
Snippets Groups Projects
  1. Jul 09, 2020
    • william's avatar
      [IMP] base: _check_with_xsd from ir.attachment · 06a35f2e
      william authored
      Search the xsd files from in the database.
      To enable this option, the Environment should be passed to the optional
      `env` parameter. Both the XSD root and the XSD imported by the root and
      the recusrively imported files will be searched in the database.
      06a35f2e
  2. Jul 10, 2020
    • Romain Tartière's avatar
      [FIX] packaging: List all package versions in APT repositories · 03bfff8d
      Romain Tartière authored
      
      When building the package list of the APT repository, dpkg-scanpackages
      reports the following and only output the latest package information in
      the Packages file:
      
      ```
      dpkg-scanpackages: warning: Packages with multiple instances but no --multiversion specified:
      dpkg-scanpackages: warning: ./odoo_13.0.20191002_all.deb
      dpkg-scanpackages: warning: ./odoo_13.0.20191003_all.deb
      [...]
      dpkg-scanpackages: warning: ./odoo_13.0.20200630_all.deb
      ```
      
      Having only the latest version listed in the Packages file makes it
      impossible to tell apt to use a specific version through apt-pinning.
      It also makes it impossible to revert to a previous version if a
      regression is caused by an update.
      
      For these reasons, tell dpkg-scanpackages to include all versions of the
      odoo package in the Packages file it generates.
      
      closes odoo/odoo#54297
      
      X-original-commit: f41c00a8
      Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
      03bfff8d
    • Romain Tartière's avatar
      [CLA] Sign CLA for Vittoria Conseil · 28902cf2
      Romain Tartière authored
      X-original-commit: 05d616d9
      28902cf2
    • jvm-odoo's avatar
      [FIX] web: fix optional columns list dropdown · 9afd7b7e
      jvm-odoo authored
      
      Issue
      
      	- Accounting > General ledger
      	- Have 2-3 lines in the table
      	  I added filters to have them
      	- Toggle optional columns: (...) on the right
      
      	There is an y scroll but you can't scroll
      	more than half of the scrollbar.
      
      Cause
      
      	The cause is that the dropdown height is greater
      	than the table height.
      
      Solution
      
      	Use data-display: static this way the element doesn't
      	scroll with parent scroll and scrolling is working
      	as expected on the dropdown
      
      OPW-2291531
      
      closes odoo/odoo#54256
      
      Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
      9afd7b7e
    • jvm-odoo's avatar
      [FIX] web: fix zoomodoo attachToTarget/dashboard compatible · 89f206ca
      jvm-odoo authored
      
      Issue
      
          - Install Employees & Dashboard
          - Add employees to kanban
          - Dashboard
          - Hover an employee picture
      
          There is only the picture visible
          on the page, the remaining space is white.
      
      Cause
      
          I found several issues.
      
          1. The pictures are not shown on hover in employees
              But they are on dashboard.
      
          2. $attach = all `.content` and on dashboard there is
              2 `.content` so the flyout is append 2 times
      
          3. The move method is trigerred on hover too, it hides
              the flyout if we are not in it. But with attachToTarget
              we are not in it so it's hidden all time.
      
          4. If everything above is solved, the image is shown but
              not at the correct position because the flyout base
              position is not top 0, left 0
      
      Solution
      
          1. Reduce the minimum required size to 128px
          2. use closest instead of parents
          3. Don't hide if we have the option attachToTarget
          4. Calculate the flyout offset and replace it correctly
             and set it to position fixed to handle scrolling
      
      OPW-2291493
      
      closes odoo/odoo#54273
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      89f206ca
    • Anh Thao Pham (pta)'s avatar
      [FIX] payment: use currency precision when comparing amounts in Payment Link wizard · a7034b75
      Anh Thao Pham (pta) authored
      
      In Sales, in Payment Link generation wizard, when entering manually the total of the quotation
      as Amount, it can happen that the Validation Error asking to set an Amount smaller than the total
      is triggered.
      
      opw-2287794
      
      closes odoo/odoo#54278
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      a7034b75
  3. Jul 09, 2020
    • Yannick Vaucher's avatar
      [IMP] l10n_ch: clearer validations for bank fields and vendor bills (ISR ref) · 966c6520
      Yannick Vaucher authored
      
      On res.partner.bank, we check that:
      - l10n_ch_postal contains a valid postal number
      - l10n_ch_isr_subscription_chf contains a valid ISR subscription number
      - l10n_ch_isr_subscription_eur contains a valid ISR subscription number
      
      ISR subscriptions numbers are postal numbers but starting with 01 or 03.
      Those codes are reserved to ISR issuance.
      
      When the bank account on a Vendor Bill is detected as
      an ISR Issuer, check the reference is actually an ISR.
      
      The 27 digits ISR Reference is error prone when typed by hand
      and an error at this stage would break the payment process later.
      
      This is required to avoid batch payment error with SEPA.
      
      We prefer using the pretty form xx-yyyyy-z of a postal account.
      The Swiss users will identify it more easily.
      
      We always want to auto fill the field l10n_ch_postal when possible from
      acc_number, which includes only 2 cases of filling acc_number:
      
      1. a 9 position postal account number
      2. an IBAN from PostFinance which includes clearing 09000
      
      Original prs: Closes #51645, #51544, #51560
      
      closes odoo/odoo#53815
      
      Signed-off-by: default avatarQuentin De Paoli (qdp) <qdp@openerp.com>
      966c6520
    • Nicolas Martinelli's avatar
      [FIX] rating: count and average · 4f7981f8
      Nicolas Martinelli authored
      In an app using rating (e.g. eLearning), get 3 ratings:
      - A 5-star review
      - A 3-star review
      - A 0-star review
      
      The average is 2.5 stars, while it should be 4 stars.
      
      This happens because the 0-star review is taken into account in the
      average computation, while it shouldn't. Indeed, zero star means no
      review.
      
      We apply the same login than:
      https://github.com/odoo/odoo/blob/0028a602bea6a48aaa2747127ec075394732b324/addons/rating/models/rating_mixin.py#L205
      
      
      
      opw-2290617
      
      closes odoo/odoo#54266
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      4f7981f8
  4. Jul 08, 2020
    • Nicolas Martinelli's avatar
      [FIX] website_slides: use email_from on new content notif · 8bf68e40
      Nicolas Martinelli authored
      
      - Seta a value for the `ir.config_parameter` `mail.catchall.domain`
      - Enroll user A to a course
      - Add new content to the course
      - Publish it
        => an email is sent to the users enrolled
      - Reply to the email
      
      The reply is considered as a review of the course.
      
      It is not intended that users reply to such email; they are 'one-way'
      notifications.
      
      A solution is to be able to set the `reply_to` field on the mail
      template. This way, it's possible to set it to a `noreply` value.
      
      opw-2290521
      
      closes odoo/odoo#54148
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      8bf68e40
  5. Jul 07, 2020
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] account: fix composition mode change on template change · 0028a602
      Andrea Grazioso (agr-odoo) authored
      
      Go to invoice list view.
      Select several invoices, click on 'Send and print', switch template to a
      different one (possibly a duplicate of the default).
      Send
      
      On each selected record there will be a pair of attachment:
      - one belonging the the record (ok)
      - one duplicate from the first record selected (not ok)
      This occur because when switching template the default composition
      mode for the wizard is 'comment' (single send), which causes the wizard
      to compute and store the attachment of the first record it found.
      Later, this get assigned to the list of attachment to send so it
      duplicated (and sent) in all other records
      
      opw-2291274
      
      closes odoo/odoo#54180
      
      Signed-off-by: default avatarJorge Pinna Puissant (jpp) <jpp@odoo.com>
      0028a602
  6. Jul 08, 2020
    • jvm-odoo's avatar
      [FIX] web: fix zoomodoo flyout width · c89b4c25
      jvm-odoo authored
      Issue
      
      	- Install eCommerce
      	- Modify a product image with one which
      	  has more than 1024px width/height to
      	  enable zoom (I used: https://bit.ly/2VETQZS
      
      )
      	- Go on the website preview & hover the image
      
      	Depending on the screen size, a part of the
      	flyout is hidden because of overflow-x
      	if you want to see it, you should scroll
      	right width right arrow key.
      
      Cause
      
      	The flyout has 100% width and is put
      	right (position absolute, left: 100%)
      
      Solution
      
      	To avoid this error on all screen size,
      	the solution is to compute the max-width
      	of the flyout depending on the available
      	space on the right.
      
      OPW-2283648
      
      closes odoo/odoo#53989
      
      Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
      c89b4c25
  7. Jul 01, 2020
    • jvm-odoo's avatar
      [FIX] web_editor: fix restored selection when closing link dialog · 460bc102
      jvm-odoo authored
      
      Issue
      
      	- Runbot 13.0
      	- Website > Contact Form
      	- Double click on send button
      
      	Link dialog opened, ok
      
      	- Discard
      	- Double click on send button
      	- Click link button
      
      	Traceback
      
      Cause
      
      	The next double click doesn't work
      	because in rte.js RTEWidget._onMousedown
      	we remove the target's contenteditable
      	attribute and it's never added back.
      
      	This is because we break if the element
      	is not editable.
      
      	The traceback is a side effect,
      	since we can't select the button
      	anymore, our selection is incorrect
      	and getLinkInfo use range.create()
      	try to use it.
      
      Solution
      
      	Break only if the target is not
      	a '<a>' & non-editable element
      
      OPW-2268595
      
      closes odoo/odoo#53792
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      460bc102
  8. Jul 08, 2020
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] crm: prevent having portal user as salesman · a3fdff3d
      Andrea Grazioso (agr-odoo) authored
      
      1. set a Sales team and add an alias
      2. create a contact (customer) with an email and grant them portal
      access (under the action)
      3. Odoo creates a portal user
      4. use the email of the contact to send an email to the alias set under
      the sales team
      
      An opportunity is created but the sales person assign to that
      opportunity is the customer.
      
      This will revert user if the user has no access to crm.lead
      
      opw-2288442
      
      closes odoo/odoo#54197
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      a3fdff3d
  9. Jul 07, 2020
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] website_sale: form data lost when applying coupon · 960c8baf
      Andrea Grazioso (agr-odoo) authored
      
      Go to eshop with public user
      Add items in cart
      Checkout, reach shipping and billing address page
      Fill the form
      Add a coupon
      
      Page will refresh and added content will be lost
      This will prevent user from adding a coupon when a form needs to be
      filled
      
      opw-2287428
      
      closes odoo/odoo#54101
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      960c8baf
    • Loan (lse)'s avatar
      [FIX] website_sale: Improve shop item search performances · ec743deb
      Loan (lse) authored
      
      The idea is to avoid useless SQL request as the searching process is heavy (have to look the word in several field and can be in translation tables).
      As we at some point fetch all the searched product we do it at the beginning and use its information to gain performance on other queries.
      
      Execution time in e-shop for "test" on client database (160 000 product with 4500 published):
       - Before: ~ 7 sec
       - After:  ~ 2 sec
      
      OPW-2256662
      
      closes odoo/odoo#54196
      
      X-original-commit: 9103c889e9858d370680612a48a79b4a615e9b58
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      ec743deb
  10. Jun 29, 2020
    • Anh Thao Pham (pta)'s avatar
      [FIX] mail,test_mail: fix some incorrect language translations in mail template · 554be6f4
      Anh Thao Pham (pta) authored
      - Install Calendar
      - In Settings, activate another languange (e.g. French)
      - Configure language of another user (User A) than the current one with the French language
      - At this point, the language of the users are:
        * Current User: English
        * User A: French
      - Go to Calendar and create a Meeting
      - Edit the Meeting and in Invitations tab, add User A and click on "Send mail" button
      - In debug mode, go to Settings > Technical > Emails
      The email sent to User A is in French, except for the first sentence of the body that is in English
      ("Your Calendar Attendee Information")
      That sentence is the model description that is not translated to the recipient language.
      
      opw-2269155
      
      closes odoo/odoo#53406
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      554be6f4
  11. Jul 07, 2020
    • jvm-odoo's avatar
      [FIX] website_slides: fix video not loaded in fullscreen web content · 0f93240e
      jvm-odoo authored
      
      Issue
      
      	- Create a content in a course with type "web page"
      	- Access it frontend and add a "text - image" block, edit the image as a video - save
      	- The video is displayed correctly
      	- Go into full-screen
      
      	The video is not displayed at all.
      
      Cause
      
      	The content is added after the page and page widgets are started
      
      Solution
      
      	Trigger the widgets start method
      
      OPW-2290233
      
      closes odoo/odoo#54135
      
      Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
      0f93240e
  12. Jul 06, 2020
    • Denis Ledoux's avatar
      [FIX] models: prevent fields inherited from `delegate=True` to be deleted · 75515d0d
      Denis Ledoux authored
      Use case:
       - `./odoo-bin -d mydb -i website`
       - `./odoo-bin -d mydb -i base_automation`
       - `./odoo-bin -d mydb -u website,base_automation`
       ```
       odoo.addons.base.models.ir_model: Deleting 2652@ir.model.fields (base_automation.field_base_automation__website_published)
       odoo.addons.base.models.ir_model: Deleting 2651@ir.model.fields (base_automation.field_base_automation__website_url)
       odoo.addons.base.models.ir_model: Deleting 2650@ir.model.fields (base_automation.field_base_automation__website_path)
       ```
      
      The issue comes from the fact:
      - `website` adds multiple website related fields on `ir.actions.server`
        https://github.com/odoo/odoo/blob/30e94d305f9cffa816ddc213e0b9329c0263c145/addons/website/models/ir_actions.py#L16-L18
      - `base.automation` inherits by delegation of the `ir.actions.server` fields
        thanks to `delegate=True` on its field `action_server_id`
        https://github.com/odoo/odoo/blob/30e94d305f9cffa816ddc213e0b9329c0263c145/addons/base_automation/models/base_automation.py#L37
      - when `base_automation` is installed after `website`
        when `_reflect_model` is called,
        the website related fields on `ir.actions.server` are well in the `_fields` of the `base.automation` model,
        and there an xmlid for these fields is created
        e.g. `field_base_automation__website_published`
        https://github.com/odoo/odoo/blob/30e94d305f9cffa816ddc213e0b9329c0263c145/odoo/addons/base/models/ir_model.py#L881-L882
      
      
      - during the `-u website,base_automation`, `_reflect_model` on `base.automation` is called before
        the website related fields coming from its inherits on `ir.actions.server` are added in its `_fields`,
        and is not recalled after they are added, when the `website` module is loaded and these website related fields
        are added on `ir.actions.server`.
      
      Because of this, at the end of the upgrade, in the `ir.model.data` `_process_end`,
      as the xmlids of these fields have not been loaded,
      they are being deleted, because the ORM considers these fields were dropped
      from the source code because their xmlids have not been loaded during the upgrade.
      
      Adding the model `base.automation` in the `inherits_children` of `ir.actions.server`
      when the delegate field `action_server_id` is added make sure
      `_reflect_model` is called on `base.automation`
      after the website related field are loaded on the model `ir.actions.server`,
      and therefore ensure the xmlids are properly loaded,
      therefore preventing the fields deletion.
      
      Additionaly, `delegate` and `inherits` are supposed to be equivalent,
      it's just two ways to do the same thing.
      
      Before this revision,
      when using `delegate`, `base.automation` is not in the `inherits_children` of `ir.actions.server`:
      ```
      In [1]: env['ir.actions.server']._inherits_children
      Out[1]: set()
      ```
      
      while, by converting the `delegate` to an `inherits`:
      ```diff
      diff --git a/addons/base_automation/models/base_automation.py b/addons/base_automation/models/base_automation.py
      index 196ebe9965f..c073150386a 100644
      --- a/addons/base_automation/models/base_automation.py
      +++ b/addons/base_automation/models/base_automation.py
      @@ -30,11 +30,12 @@ class BaseAutomation(models.Model):
           _name = 'base.automation'
           _description = 'Automated Action'
           _order = 'sequence'
      +    _inherits = {'ir.actions.server': 'action_server_id'}
      
           action_server_id = fields.Many2one(
               'ir.actions.server', 'Server Actions',
               domain="[('model_id', '=', model_id)]",
      -        delegate=True, required=True, ondelete='restrict')
      +        required=True, ondelete='restrict')
           active = fields.Boolean(default=True, help="When unchecked, the rule is hidden and will not be executed.")
           trigger = fields.Selection([
               ('on_create', 'On Creation'),
      ```
      it is:
      ```
      In [1]: env['ir.actions.server']._inherits_children
      Out[1]: {'base.automation'}
      ```
      
      closes odoo/odoo#54119
      
      X-original-commit: 3fd162db
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      75515d0d
  13. Jul 07, 2020
    • jvm-odoo's avatar
      [FIX] base_import: fix re-importing same file · 4ef5a0d4
      jvm-odoo authored
      
      Issue
      
      	Chrome
      
      	- Sales > Product
      	- Select a file
      	- Change something in the file
      	- Re-select it
      
      	Nothing changed
      
      Cause
      
      	Chrome doesn't trigger change on
      	input if the file is the same
      
      Solution
      
      	Clear the input value after the
      	parse_preview so we can load a new
      	file even if the preview failed.
      
      OPW-2288191
      
      closes odoo/odoo#54165
      
      X-original-commit: f7d2bdf6
      Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
      4ef5a0d4
  14. Jul 06, 2020
    • lejeune quentin's avatar
      [FIX] hw_posbox_homepage: Remove format condition for refresh after uograde IoT Box · 0b27dc79
      lejeune quentin authored
      
      When we upgrade the IoT we wait that the version of box match with
      the last version of IoT Box before to refresh.
      We make a request to '/hw_proxy/get_version' to get the actual version.
      In Jinja this response give a float.
      We compare this value with a string using '===' who want that the format match.
      So we doesn't compare the format of values but only the value by putting only '=='.
      
      closes odoo/odoo#54138
      
      X-original-commit: 06f9baae
      Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
      0b27dc79
    • Olivier Dony's avatar
      [FIX] website: restore CDN for lazy assets · 6d4b5fcd
      Olivier Dony authored
      
      The CDN implementation for resources works by matching well-know attributes
      (`href`, `src`, `action`) that hold URLs matching the CDN filters and injects
      the CDN prefix. However 13.0 introduced lazy loading for assets in #32181,
      so the attributes are now prefixed with `data-` and replaced at runtime.
      
      This PR updates the tag matching in order to cover both variants of
      attribute names.
      
      closes odoo/odoo#54144
      
      Signed-off-by: default avatarToufik Benjaa (tbe) <tbe@odoo.com>
      6d4b5fcd
  15. Jul 03, 2020
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] sale_coupon: fix step like programs discount · b2a4ee95
      Andrea Grazioso (agr-odoo) authored
      
      Create four promotion programs:
      
      if the order > 1500 than 10% discount
      if the order > 1750 than 15% discount
      if the order > 2000 than 20% discount
      if the order > 2500 than 25% discount
      
      Take a product with a price of $300 and add 5 to cart > the 10% discount
      is correctly applied.
      Add 1 more product (6) > it should now qualify for 15% discount, but it
      stays at 10%
      Add 1 more product (7) > it (correctly) gets the 20% discount
      The 25% discount does not get applied until 11 of the product is in the
      cart, even though it should qualify at 9
      If you then decrease the quantity, the right discount will
      sometimes display.
      
      This occur because when the order amount change and the new total is
      used to match the right promo the previously applied discount is not
      removed from the amount.
      This occur as side effect of
      1d59785 in which the amount has to be
      kept in order to avoid discount line removal on cart update.
      
      opw-2285656
      
      closes odoo/odoo#54034
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      b2a4ee95
  16. Jul 06, 2020
    • jvm-odoo's avatar
      [FIX] payment: fix portal can click pay when js not loaded · 0e7071f2
      jvm-odoo authored
      
      Issue
      
      	- Go to Accounting / Customers / Invoices
      	- Pick any invoice not paid
      	- Action: Generate a Payment Link
      	- Open the link
      	- Refresh the page having Javascript disabled
      	- Click the Pay Now button
      
      	Traceback
      
      Cause
      
      	If JS is not loaded, the values in the form fields are
      	not bound as expected.
      
      	It can also happen with slow connections and fast click
      	on the button at the loading. Before the JS is entirely
      	loaded (as it is lazy-loaded).
      
      Solution
      
      	Button disabled by default, wait the page to be loaded
      	and then activate the button
      
      OPW-2255760
      
      closes odoo/odoo#53904
      
      Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
      0e7071f2
    • Odoo's Mergebot's avatar
      [FW][FIX] web: unsafe access to config property & extract lib's input setter · a62cce58
      Odoo's Mergebot authored
      
      During TempusDominus autobinding to fields matching its default classes
      (like `.datetimepicker-input` used by our DatePicker widget) and no
      config was previously provided to the library (like when we disable it
      on mobile), an unsafe access to the config's `_options` property results
      into an error as the config is `undefined`.
      
      This PR fixes it by first checking for config existence before
      attempting to access its property.
      
      It also extracts the DatePicker widget's input setter to allow
      overriding it and preventing from calling the `datetimepicker` lib when
      not initialized (like on mobile).
      
      opw-2242880
      
      closes odoo/odoo#54032
      
      Forward-port-of: odoo/odoo#54005
      Related: odoo/enterprise#11635
      Signed-off-by: default avatarAdrien Dieudonné (adr) <adr@odoo.com>
      Signed-off-by: default avatarPierre Paridans <pparidans@users.noreply.github.com>
      Unverified
      a62cce58
  17. Jul 05, 2020
  18. Jul 03, 2020
    • Pierre Paridans's avatar
      [FIX] web: TempusDominus unsafe access to config · 746cff5f
      Pierre Paridans authored
      During TempusDominus autobinding to fields matching its default classes
      (like `.datetimepicker-input` used by our DatePicker widget) and no
      config was previously provided to the library (like when we disable it
      on mobile), an unsafe access to the config's `_options` property results
      into an error as the config is `undefined`.
      
      This commit fixes it by first checking for config existence before
      attempting to access its property.
      
      Note: as this is a fix inside a library, a comment is added to make
      clear. Also similar fixes where already done in the same file.
      
      opw-2242880
      
      X-original-commit: c05982c2
      746cff5f
    • Pierre Paridans's avatar
      [FIX] web: extract date picker's input setter · 3e82caf6
      Pierre Paridans authored
      This commit extracts the DatePicker widget's input setter to allow
      overriding it and preventing from calling the `datetimepicker` lib when
      not initialized (like on mobile).
      
      Note: this change will be used on enterprise.
      
      opw-2242880
      
      X-original-commit: ca84753f
      3e82caf6
    • Martin Trigaux's avatar
      [FIX] hr_attendance: format hour according to locale · 47707e1b
      Martin Trigaux authored
      
      The time to display the check in/check out time was hardcoded to
      HH:mm:ss while other locales may use different formats.
      Use the appropriate time utils to retrieve the right format that uses
      the time format from the res.lang record.
      
      Fixes odoo/odoo#50527
      
      closes odoo/odoo#54018
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      47707e1b
    • Aaron Bohy's avatar
      [FIX] web: editable list: correctly edit in readonly · 25266342
      Aaron Bohy authored
      
      Some widgets allow the edition in readonly (e.g. boolean_toggle,
      priority...). In this case, the changed value is saved directly.
      Before this commit, this didn't work in (main) list views: the
      widget was updated with the new value, but it wasn't saved in db,
      so the change was lost at reload.
      
      This was due to the list controller not being correctly aware of
      its mode ('edit' or 'readonly'), on which the basic controller
      relies to determine whether a change must be saved directly or
      not.
      
      With this commit, a list is always in 'readonly', except when a
      row is being edited, in which case it is in 'edit'.
      
      Issue reported on task 2288963
      
      closes odoo/odoo#54049
      
      Signed-off-by: default avatarJulien Mougenot (jum) <jum@odoo.com>
      25266342
    • Nasreddin (bon)'s avatar
      [FIX] stock: Display translated picking description in delivery slip · fee4e78a
      Nasreddin (bon) authored
      
      Issue
      
      	- Install English and French languages
      	- Create a customer contact and assign french as his language
      	- Create a product with correct names in both languages.
      	  For example 'French product name' and 'English product name' for easy reference.
      	- Create an inventory transfer with the french customer as contact
      	- Add the product that you created
      	- Print > Delivery Slip
      
      	The report will show in the lines:
      	"""
      	French product name
      	English product name
      	"""
      
      Cause
      
      	Getting product description without checking partner language.
      
      Solution
      
      	If partner is set, get product description with partner language in context.
      
      opw-2280490
      
      closes odoo/odoo#53977
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      fee4e78a
  19. Jul 02, 2020
  20. Jul 03, 2020
  21. Jul 02, 2020
Loading