Skip to content
Snippets Groups Projects
  1. Jul 06, 2018
  2. Jul 05, 2018
    • Christophe Simonis's avatar
    • Christophe Simonis's avatar
    • Christophe Simonis's avatar
    • Christophe Simonis's avatar
      45329c0c
    • wangting's avatar
      [CLA] signature for tanghulu0608 · d4578794
      wangting authored
      Closes #25625
      d4578794
    • Christophe Simonis's avatar
    • Christophe Simonis's avatar
    • Martin Trigaux's avatar
      [FIX] mail: multi-company access to TZ · a978a364
      Martin Trigaux authored
      - Create 2 Companies A & B
      - Set User B in Company B
      - Record some `mail.activity` for User B on a lead belonging to Company
        B.
      - With a manager user in Company A, go to Kanban view of leads and
        remove filters => all leads, including leads in Company B, are
        displayed
      
      An access error occurs.
      
      `read_progress_bar` method, tries to access the field `activity_state`
      which is: `states = record.activity_ids.mapped('state')`. The state of
      a `mail.activity` is using the tz of the partner. To read the
      `activity_state` of a lead, one needs to access
      `record.activity_ids.user_id.partner_id.tz`
      => multi-company security rules raised
      
      opw: 1850984, 1859470
      a978a364
    • Quentin De Paoli's avatar
      73d664f7
    • Christophe Simonis's avatar
      92e5da6b
    • len-odoo's avatar
      [FIX] web: handle onchange on a on2many with an embedded one2many on multiple pages · 7764db7a
      len-odoo authored
      Suppose there is a one2many field embedded in a one2many,
      (say we are viewing record A with one2many field B itself with a one2many C).
      Furthermore, there is a second page of the one2many field B.
      If an onchange is applied on B, then the server replies with a 1 command for all
      B records attached to the currently viewed object A.
      This includes a list of commands [[5], [4, C_id]*] for each B record,
      in particular B records that are on the second page.
      Since they are on the second page, they might not have been fetched by the
      frontend; in that case the corresponding C_ids are thus unknown.
      As a consequence, on save the frontend sends a command 0 to create the records
      for all unknown C_ids.
      Since it doesn't have any value to give to the 0 command, the row creation
      usually crash in the backend.
      
      Another wrong behaviour is fixed at the same time: if the server sends an update
      on the list of C ids with 4 commands.
      In that case, if the record has not been prefetched, we have no way to know
      if the list changed or not.
      
      To solve this, when we receive the 4 commands by the server, we send back 4
      commands.
      
      coauthored by @aab-odoo
      
      opw 1835936
      7764db7a
    • Christophe Simonis's avatar
      26e7d5d8
    • Géry Debongnie's avatar
      [FIX] web: make the kanban view wait on async field widgets · a1778ed5
      Géry Debongnie authored
      Before this commit, the kanban view ignored the fact that a field widget
      could be asynchronous.  Worse, some preliminary support was done in
      kanban record, but this would crash if an async widget was used.
      
      With this commit, we properly synchronize the kanban
      records/columns/renderer.  If for some reason a widget needs to be
      added to the DOM before it is ready, it can simply returns an empty
      value in the willStart/start methods.
      a1778ed5
    • Alexandre Kühn's avatar
      [FIX] web: no concurrent reload on basic model · 7af09db8
      Alexandre Kühn authored
      Before this commit, there was a traceback in the following scenario:
      
      Let's have a kanban view with groupby and a domain.
      If we clear the domain then clear the groupby, there could be a crash.
      
      This crash occurs because when we clear the groupby, it performs a `reload`,
      and assumes that the datapoint contains grouped data. However, if this
      computation takes some time, it is possible to overwrite the datapoint so that
      there is no longer grouped data.
      
      This commit fixes the issue by enforcing at most 1 execution of the method
      `reload` active at any time. Consequently, successive reloads operations are
      now much slower.
      
      Note that it uses the single non-reentrant mutex on the basic_model to enforce
      this rule, which means:
      
        - No more concurrent `reload` and `save`.
        - If an execution having the mutex in `reload` come accross the same mutex,
          it is blocked forever. This is hopefully not the case at the moment,
          however a reentrant mutex should be considered in the future.
      7af09db8
    • Nicolas Lempereur's avatar
      [FIX] barcodes: documentation in description · b27d009a
      Nicolas Lempereur authored
      The barcodes modules had documentation only available on apps.odoo.com,
      following a recent change, odoo modules are not displayed on
      apps.odoo.com anymore.
      
      Thus this commit merges the documentation onto the module description so
      it is available on the module page.
      
      opw-1846035
      closes #25621
      b27d009a
    • Romain Derie's avatar
      [FIX] website: new content links not triggered · 21f1a593
      Romain Derie authored
      Clicking outside the new content options should close the overlay.
      Every options are triggering a JS event (mostly opening a modal) that works
      fine.
      
      But the 'New Job offer' options is simply a href link which is not going
      through anymore since there was a call to `preventDefault`.
      
      opw-1860196
      21f1a593
    • Christophe Simonis's avatar
      [FIX] core: set up registry before running migration scripts · b5c50fa8
      Christophe Simonis authored
      As `pre-` migration scripts may use the registry, we must ensure that
      all fields are set up before execution in order to have a consistent
      registry.
      
      This is required when loading a registry which contains modules to
      install/upgrade without `-u` flag. In this case, the setup was only done
      *after* module loading.
      b5c50fa8
    • Pierre Masereel's avatar
      [FIX] stock: fix api multi method · 6bdc6541
      Pierre Masereel authored
      Method was using self instead of line in the loop for.
      
      introduced in rev: https://github.com/odoo/odoo/commit/ba5918ffcbe5fe9155308c53e014e5e93c588ca6
      6bdc6541
    • Jérome Maes's avatar
      [FIX] hr_timesheet: dynamic domain when encoding timesheet · ceaa6562
      Jérome Maes authored
      To have a better encoding timesheet, we want for the user:
      1/ when selecting project first, the task proposed will be
      the ones in the project. When changing project, it reset the
      task to empty.
      2/ when selecting the task first, the project will be the
      one from the task
      ceaa6562
    • Gert Pellin's avatar
      [imp] fleet: Allow to filter/group by Make on vehicles · b7bcbddc
      Gert Pellin authored
      Add grouping possibility on model make for vehicles in the fleet.
      Deleted redundent controll on make image for vehicles if model changed.
      fixed _name_search for FleetVehicle
      
      project : RD for Dummies
      task : [Fleet] Allow to filter/group by Make on vehicles
      b7bcbddc
    • Fabien Pinckaers's avatar
      [IMP] product: Unify/Clean product demo data · bed29a4a
      Fabien Pinckaers authored
      PURPOSE
      =======
      
      1. Unified product demo data
      2. Less demo: one per use case
      3. Demo data for all models
      
      Specification
      =============
      
      1. Refactor all the brol in the demo data
      2. Adapt the tests to make them green, as some products are
         renamed, removed, created in python instead of as demo data
         ...
      bed29a4a
  3. Jul 04, 2018
    • RomainLibert's avatar
      [DOC] web_cohort: documents mode attribute · 0f487013
      RomainLibert authored
      Closes #25512
      0f487013
    • Florent de Labarre's avatar
      [FIX]product: force_company doesn't work to get property · 4206aba4
      Florent de Labarre authored
      When forcing the company C in the context, the company C was not
      taken into account in function _get_partner_pricelist
      
      opw:1861989
      4206aba4
    • Shubham Johar's avatar
      [FIX] website: leave 'create screen' when click outside · 26d384ef
      Shubham Johar authored
      The purpose of this commit is to hide the Create menu when the user click on
      any area other than the link icons.
      
      Note: It was already the case in V10.0 since the options were inside a modal.
            Natively bootstrap would close the modal when clicking outside of it.
            We lost that behavior while refactoring in V11.0 with 29729769 that
            replaced the modal by a pseudo-dropdown
      
      opw-1860196
      Closes #25389
      26d384ef
    • sed-odoo's avatar
      [IMP] base,*: Improve the res.partner form view UX · f56ad6da
      sed-odoo authored
      Purpose
      =======
      
      The Contact form is one of the most used/important view. It is quite
      important to find the piece of information easily and to navigate in
      a few clicks to the related views.
      
      Specification
      =============
      
      Stat buttons
      ------------
      
      - Restructure stat buttons with the following order:
      Opportunities  -> sales user
      Meetings    -> sales users
      Sales    -> Sales users
      POS Sales -> pos users
      Subscriptions   -> Subscription users
      Events    -> event user
      Tasks -> project user
      TIckets -> helpdesk user
      Purchases   -> purchase user
      Due -> billing: user
      Invoiced     -> billing: user
      Vendor Bills -> billing: user
      Customer/Vendor Partner Ledger -> accounting: billing
      Analytic Accounts -> accounting: billing
      Credit Cards -> sales user
      Direct Debit Mandates -> accounting: billing user
      Publish
      - Use better/more relevant icons
      - Check that the proper access rights are set
      - Remove the bank accounts stat buttons and replace it by a one2many
        tree on the Invoicing page.
      
      Fields
      ------
      
      Move some res.partner fields from the "Accouting" page to the
      "sale & Purchase" page:
      - Fiscal positions
      - Payment terms
      
      Miscellaneous
      -------------
      
      - Remove dead code.
      - Display nothing instead "Please complete customer's informations and email"
        on the popup when sending an email to a contact without email address.
      f56ad6da
    • Pierre Masereel's avatar
      [FIX] stock: package location only in multi location · 4edcc1f3
      Pierre Masereel authored
      When we open the form view of a package_level, the location_id and
      location_dest_id fields are visible evene if multi location is not
      enabled on the database. We add the corresponding groups to avoid such a
      behavior.
      4edcc1f3
    • Pierre Masereel's avatar
      [FIX] stock: move lines attributes on package_level · eae6ce7b
      Pierre Masereel authored
      When you see move lines in a package level, the lots and owner are not
      displayed, we added them in the view.
      eae6ce7b
    • Ankit Joshi's avatar
      [FIX] stock, delivery: picking fields readonly when cancelled · 47384a42
      Ankit Joshi authored
      When a picking is cancelled, most of fields must be readonly it was
      remaining some that were not. We fixed them here.
      47384a42
    • Pierre Masereel's avatar
      [FIX] stock: move lines readonly when in entire package · 94dec613
      Pierre Masereel authored
      When a move line is in an entire package and the entire package option
      is enabled, you shouldn't be able to modify them in the move form view.
      
      So we make all fields of the move lines readonly when it has a
      package_level_id and its picking_type has 'Show entire package' option
      enabled
      94dec613
    • Pierre Masereel's avatar
      [FIX] stock: quant_package unpack · 63a98846
      Pierre Masereel authored
      When you unpack a quant package, you have to invalidate the reservation
      on the move lines reserved on this package and then remove the quants
      from it. We need to do it as sudo because, no one has rights on quants.
      63a98846
    • Pierre Masereel's avatar
      [FIX] stock, delivery: packaging_id displayed in delivery · 64b67c7f
      Pierre Masereel authored
      The field 'packaging_id' of quant package was displayed in tree view,
      even if it was impossible to fullfill it because it is added in the form
      in module delivery. So the field in the tree view is moved in the module
      delivery to be shown whan you can set it.
      64b67c7f
    • Pierre Masereel's avatar
      [FIX] stock: error message typo · 4308c5fa
      Pierre Masereel authored
      4308c5fa
    • Pierre Masereel's avatar
    • Darshil Trivedi's avatar
      [IMP] stock: improve backorder message. · 1b9ec904
      Darshil Trivedi authored
      This commit is related to task ID 1860538.
      1b9ec904
    • Darshil Trivedi's avatar
      [IMP] stock: remove useless filter · 436c95ba
      Darshil Trivedi authored
      Inventory report list all products in stock and the available quantity.
      By default, the list is filtered on "stockable product". This filter is
      useless as only stockable product are listed in the report.
      
      This commit is related to task ID 1860538.
      436c95ba
    • Goffin Simon's avatar
      [FIX] pos_sale, sales_team: Timezone problem in dashboard graph · 30ede6a1
      Goffin Simon authored
      The function _get_graph computing the dashboard graph must take the timezone of the user
      into account to compute the right start_date S and the right end_date E.
      
      The query  made on model 'report.pos.order' by read_group in _graph_data must take the
      timezone of the user into account to substract the right offset to compute the start_date S
      and end_date E in UTC because the result returned by read_group is formated in the timezone
      of the user afterwards.
      
      Example:
      
      In function _get_graph:
      
      Start_date in 'Asia/Ulaanbaatar' timezone = 2018-06-05
      End_date in 'Asia/Ulaanbaatar' timezone = 2018-07-04
      
      So End_date - Start_date + 1 = 30
      
      In function _graph_data:
      
      Start_date in 'Asia/Ulaanbaatar' timezone = 2018-06-05 00:00:00
      End_date in 'Asia/Ulaanbaatar' timezone = 2018-07-04 23:59:59
      
      So in UTC -9 hours:
      
      Start_date in UTC = 2018-06-04 15:00:00
      End_date in UTC = 2018-07-04 14:59:59
      
      SELECT min("report_pos_order".id) AS id,
             count("report_pos_order".id) AS "date_count" ,
             sum("report_pos_order"."price_total") AS "price_total" ,
             date_trunc('day', timezone('Asia/Ulaanbaatar',
             timezone('UTC',"report_pos_order"."date"))) as "date:day"
      FROM "report_pos_order"
      WHERE (((("report_pos_order"."date" >= Start_date)  AND
            ("report_pos_order"."date" <= End_date))  AND
            ("report_pos_order"."config_id" in (1,2,3)))  AND
            ("report_pos_order"."state" in ('paid','done','invoiced')))
      GROUP BY date_trunc('day', timezone('Asia/Ulaanbaatar', timezone('UTC',"report_pos_order"."date")))
      ORDER BY "date:day"
      
      And the result of this request will be between 2018-06-05 00:00:00 and 2018-07-04 23:59:59 but
      before the fix the result was between 2018-06-05 00:09:00 and 2018-07-05 08:59:59 and then
      End_date - Start_date + 1 was equal to 31. That's why a "IndexError: list index out of range"
      can be raised in _get_graph.
      
      In this way, no mismatch is possible between the datas computed by _graph_data and the dict
      "values" allocated by _get_graph.
      
      opw:1862996
      30ede6a1
    • Goffin Simon's avatar
      [FIX]purchase: A duplicated shipment is not associated with the original PO · ab5fcb29
      Goffin Simon authored
      When duplicating a shipment, the shipment was not linked to the original PO.
      
      opw:1854387
      ab5fcb29
    • Mykhailo Panarin's avatar
      [CLA] create mpanarin · 80b325bb
      Mykhailo Panarin authored
      Backport to 9.0 of #23708
      
      Closes #25595
      80b325bb
    • Olivier Dony's avatar
      [IMP] mass_mailing: add missing indexes · 43e4d63d
      Olivier Dony authored
      These two columns are used to compute the mailing statistics, to be
      displayed in the kanban dashboards. Adding them makes the dashboards
      a lot faster on large databases (e.g. a few milliseconds instead of
      several seconds)
      Unverified
      43e4d63d
Loading