Skip to content
Snippets Groups Projects
  1. Jun 29, 2023
  2. Apr 06, 2023
  3. Mar 31, 2023
  4. Jul 07, 2022
  5. Jan 25, 2022
  6. Nov 04, 2021
  7. Nov 02, 2021
  8. Sep 17, 2021
  9. Aug 23, 2021
  10. Jul 23, 2021
  11. Jul 26, 2021
    • Xavier-Do's avatar
      [FIX] *: add explicit license to all manifest · 4f683968
      Xavier-Do authored
      
      The license is missing in most enterprise manifest so
      the decision was taken to make it explicit in all cases.
      When not defined, a warning will be triggered starting from
      14.0 when falling back on the default LGPL-3.
      
      closes odoo/odoo#74231
      
      Related: odoo/enterprise#19850
      Related: odoo/design-themes#43
      Signed-off-by: default avatarXavier Dollé (xdo) <xdo@odoo.com>
      4f683968
  12. May 22, 2021
  13. Apr 17, 2021
    • Adrien Widart's avatar
      [FIX] l10n_fr_pos_cert: reset session start date · f7048c1d
      Adrien Widart authored
      
      When resuming a POS session, if the latter has been opened in the past
      and if its state is 'Opening Control', a incorrect UserError is raised
      and prevents the session to be started.
      
      To reproduce the error:
      1. Use a French company
      2. Create a POS
          - Enable "Advanced Cash Control"
      3. Start a new session
      4. Close it
      5. Set the computer's date in the future
      5. Open the POS session > Continue Selling
      
      Error: A UserError is raised ("This session has been opened another day.
      To comply with the French law, [...]"), but the user does not have the
      possibility to close the session. Moreover, since its state is "Opening
      Control", no sales have been made yet.
      
      This fix suggests to reset the start date in such a situation.
      
      OPW-2488952
      
      closes odoo/odoo#69253
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      f7048c1d
  14. Aug 07, 2020
    • william's avatar
      [IMP] l10n_*: update the module categories · eaa7f93c
      william authored
      
      Task 2309613
      
      We have a new hierarchy:
      * Accounting
        * [Generic, not changed]
        * Localization
          * Account Chart
          * Check
          * EDI
          * Point of Sale
          * Purchase
          * Reporting
          * Sale
      
      This helps in displaying only the chart of accounts when clicking on
      "Install more Packages" from the accounting settings in the Fiscal
      Localization section.
      We can also refine the search in the _auto_install_l10n post init hook
      of account.
      
      closes odoo/odoo#55384
      
      Related: odoo/enterprise#12179
      Related: odoo/upgrade#1568
      Signed-off-by: default avatarCedric Snauwaert (csn) <csn@openerp.com>
      eaa7f93c
  15. Jun 30, 2020
    • Martin Trigaux's avatar
      [FIX] *: correct all or improve code translation lookup · 400cc4f1
      Martin Trigaux authored
      
      This commit fixes all issues detected by the new pylint
      gettext-variable test.
      It converts some calls to the new syntax
        _("Foo %s", bar)
      
      to progressively migrate the code to the new syntax.
      
      A few calls were not technically incorrect but still detected by the
      linter.
      
        _("Foo" +
          "Bar")
      
      has been converted to
      
        _("Foo"
          "Bar")
      
      as it has the same effect and make sure the argument is of type
      asteroid.Const instead of BinOp).
      
      closes odoo/odoo#53683
      
      Related: odoo/enterprise#11467
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      400cc4f1
  16. Jun 26, 2020
  17. Jul 28, 2020
  18. Jun 18, 2020
    • Martin Trigaux's avatar
      [IMP] *: replace to new _() syntax · ba244cef
      Martin Trigaux authored
      Using a few regex like
      \((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\)
      ($1, $3))
      
      Old syntax is still compatible but starts the migration to the new
      syntax that catches error.
      ba244cef
  19. May 12, 2020
  20. Apr 28, 2020
  21. Mar 20, 2020
    • Victor Feyens's avatar
      [IMP] *: declare ir.rule in noupdate · a3ded904
      Victor Feyens authored
      ir.rule are default values but can be customized based on the
      company's policy and needs.
      This is typically a record that is in noupdate as should be
      customization-friendly.
      a3ded904
  22. Mar 05, 2020
  23. Jan 22, 2020
    • wan's avatar
      [IMP] account: add a readonly group · d8c5cc13
      wan authored
      
      Task 2092079
      Accounting firms that want to give access to their customers avoiding
      mistakes and risks will love this profile that can't do anything
      wrong... Maybe as well as companies auditors..?
      
      closes odoo/odoo#39860
      
      Related: odoo/enterprise#6576
      Signed-off-by: default avatarQuentin De Paoli (qdp) <qdp@openerp.com>
      d8c5cc13
  24. Jan 17, 2020
  25. Oct 01, 2019
  26. Sep 25, 2019
  27. Sep 16, 2019
  28. Aug 09, 2019
    • Joseph Caburnay's avatar
      [IMP] point_of_sale: create one account move by session · b234e97f
      Joseph Caburnay authored
      Main goal of this task is to create single accounting entry
      (AE) when closing a pos.session instead of individual AE for
      each order in the session.
      
      This significantly minimizes the number of created journal
      entries by point_of_sale which also results to faster closing
      of session when there is large numbers (order of thousands)
      of orders. It also eases the reconciliation of payments because
      on one hand, cash payments are automatically reconciled and on
      the other, other payments are combine in a receivable line
      based on the payment method.
      
      **Important points to note**
      
      1. Two new models (pos.payment.method and pos.payment) are
      introduced replacing the functionalities of account.journal
      (and account.bank.statement) and
      account.bank.statement.line, which served before as payment
      methods and payments.
      
      2. The creation of single AE relies on the receivable_account_id
      defined in each pos.payment.method. This receivable_account_id
      is supposed to be different from the account module's receivable
      account, thus, a new receivable account for pos is introduced
      in each localization.
      
      3. A simple example below can illustrate this change.
      
      Given the following orders:
      
          +---------+----------+----------+-----+-------+-------+
          | order   | payments | product  | qty | price | total |
          +---------+----------+----------+-----+-------+-------+
          | order 1 | cash     | product1 |  10 |    10 |   100 |
          |         |          | product2 |   5 |    20 |   100 |
          +---------+----------+----------+-----+-------+-------+
          | order 2 | bank     | product2 |   7 |    20 |   140 |
          |         |          | product3 |   1 |    30 |    30 |
          +---------+----------+----------+-----+-------+-------+
          | order 3 | bank     | product1 |   1 |    10 |    10 |
          |         |          | product2 |   3 |    20 |    60 |
          |         |          | product3 |   5 |    30 |   150 |
          +---------+----------+----------+-----+-------+-------+
      
      Instead of generating 3 accounting entries, a single
      accounting entry (linked to the pos.session) will be created.
      This accounting entry will have the following lines:
      
          +---------------------+---------+------------+
          | account             | balance | reconciled |
          +---------------------+---------+------------+
          | sale                |    -590 |    -       |
          | pos receivable cash |     200 |    yes     |
          | pos receivable bank |     390 |    no      |
          +---------------------+---------+------------+
          | Total balance       |     0.0 |            |
          +---------------------+---------+------------+
      
      Note that the cash receivable line is already reconciled
      because it can assumed that the payment is already received.
      The unreconciled receivable line can be reconciled manually
      using the reconciliation widget.
      
      More examples can be seen in the tests.
      
      TASK-ID: 1862388
      b234e97f
  29. Aug 07, 2019
    • Martin Trigaux's avatar
      [IMP] *: use res.lang methods · 85ee046b
      Martin Trigaux authored
      
      get_installed and _lang_get_id are both ormcached and correctly check
      the context
      
      Retrieving a res.lang from a code is a frequent action that can be
      achieved with _lang_get (cf previous commit).
      Using _lang_get ensure the active_test in the context is correct and
      is not poluted with another context propagation issue.
      odoo/odoo#35490 discussion is an example of bad context propagation
      
      closes odoo/odoo#35504
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      85ee046b
  30. May 29, 2019
  31. Aug 01, 2019
  32. Jul 17, 2019
    • Adrian Torres's avatar
      [REM] *: calls to @api.multi · 4b38cc65
      Adrian Torres authored
      Multi is the default api for methods, it is not necessary to explicitly
      decorate methods with it, adds clutter and most people use it because
      they see that the rest of the code uses it.
      
      Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
      Unverified
      4b38cc65
  33. May 13, 2019
    • Yannick Tivisse's avatar
      [IMP] base: Contextualize the multi company · a5b6f31c
      Yannick Tivisse authored
      Purpose
      =======
      
      Allow the user to select the allowed companies for which he wants to see records
      on top of selecting his current company.
      
      It is confusing for users to see the records from the company he is connected to
      and the records of the children companies.
      
      Instead of using the hierarchy of companies to access records across companies,
      the user can now select (from his set of allowed companies) the companies for
      which he wants to access records.
      
      /!\ This means that the user will interact with records from company A when in
      company B.
      Example: a SO has been created and confirmed in A. When in B, I create the
      invoice from it.
      
      Specifications
      ==============
      
      1/ Deprecate the parent/children hierarchy on the res.company model. The fields are
      kept on the res.company model to ensure the retro-compatibility, but won't be used
      accross the standard code anymore. The only functional usage for this mechanism
      was to allow to see records from several companies by creating a virtual parent
      company, which will be possible with the new mechanism.
      
      2/ By default, a user will only see the records of the company he is connected
      to (or records without a company). (It is still editable by the user if needed).
      For that, put this information in the user context, to allow having different
      configurations on different browser tabs. Instead of having domains like
      ['|',
      ('company_id', '=', False),
      ('company_id', 'child_of', user.company_id.id)]
      you'll have something like
      ['|',
      ('company_id', '=', False),
      ('company_id', 'in', company_ids)]
      Note that the 'company_ids' is a value that is passed in the evaluation
      context on the record rule, as we already have user, or time.
      company_ids is a list of the ids of all the enabled companies in the
      user's context.
      
      3/ Out of the generic improvements brought by this task, this will illustrate
      issues that could exist since several versions. For example, it should not be
      possible to create a scrap order for the company A with a package of the company
      B, or it should not be possible to create an invoice on the company A with
      payment terms from the company B. Before the version 12.0, it was easy to
      encounter this kind of issues as the admin was the SUPERUSER_ID. A positive side
      effect of the fact that the SUPERUSER_ID has become an inactive user was to
      make it more difficult to introduce mismatch on the records, but haven't solved
      the issue, as it was still possible to do it with parent companies
      configuration. Some of these issues have been fixed in this commit, but all the
      business flows should be re-tested to check if an ir.rule should be introduced
      (eg: a multi company rule for stock.quand.package), if the company of a record
      is correctly transfered to another record created from the first record (eg:
      From a SO, create an invoice and a payment, the company of the sales order
      should be transfered on the invoice and the payment, even if the company of the
      sales order is A and I'm logged into the company B with the company A enabled.
      
      4/ Currently, if I click on a button on a notification email (example 'View
      Task'), I face a traceback if I'm not logged into the company of the record.
      Now, if you click on a button and if you have access to the record, the correct
      company will be automatically set.
      
      5/ If I display a kanban view with several records from several companies (and
      an image), all the images should be displayed.
      
      6/ Currently if you copy paste an url, this will crash if you're not in the
      correct company. This won't be fixed because it's quite impossible to do it in
      a clean way. This task brings a workaround. Copy/Paste -> Traceback -> Log into
      the correct company, re-copy/paste -> Ok.
      
      7/ 2 property methods have been added on the environment to retrieve the company
      on which the user is logged in and the companies the user enabled, on a specific
      tab.
      That way, when creating a record, instead of doing
      default=lambda self: self.env.user.company_id
      do
      default=lambda self: self.env.company_id
      On the other hand, to retrieve the enabled companies, do
      companies = self.env.company_ids
      
      8/ Modify the Company Switcher widget to allow to log into another company
      WITHOUT writing on the res.users (and thus bringing cache invalidation issues
      and so on). Also allow to enable several companies and see records from several
      companies, and independantly of the other browser's tabs.
      
      9/ When focusing on a tab, save the current company configuration on the local
      storage. That way, when doing 'CTRL+T' or a middle click, the context is
      propagated to the new tab.
      
      10/ Improve the error message in case of multi company access errors. Now, when
      the user is in debug mode, display the related names of the records and the name
      of the user who brings the issue.
      
      11/ Remove the context erasing when writing on a res.users
      This is probably coming from the migration to new API of the base module.
      The context was not propagated at this moment, which was a common mistake at
      that time. When migrating the module, probably by using the 'black box' method,
      as the context was not propagated, it was erased on the new version. This is
      now an issue because the context (i.e. the enabled companies) was erased when
      writing on a res.users, leading to tracebacks.
      See: https://github.com/odoo/odoo/commit/7eab8e26d3d46c53f4be924d6a34e80a66e74960#diff-4c2e738ee8f64f11806c889ea097b5e7R624
      
      
      
      12/ Fix the crash manager on redirect warnings. The issue is the following
      - Create an invoice on a company without a configured CoA.
      - Set a partner
      - On the onchange_partner_id, a redirect warning is raised to propose you
      to configure a CoA
      - Click on 'Go to the configuration panel'
      - A generic warning says something like 'Do you want to discard your changes?'
      - Click on yes, the page refreshes, but not on the redirect action.
      Now, set correctly the action on the hash, and reload instead. The breadcrumb is
      lost for example, but you reach the correct action at least.
      
      13/ Introduce a res.group to enable/disable the multi company per tab
      feature.
      
      14/ To help the users to know which tab is in which company, add the
      possibility to have a favicon per company. When creating a company,
      the classical 'O' icon is colored by default in a random color.
      
      15/ Remove the company switcher on the frontend. This was mainly there
      to allow a user to swicth to the company linked to the website.
      This behavior is now transparent to the user. If the website A is
      activated, then the company set on the context is the company of the
      website.
      
      16/ Deprecated the _company_default_get method on the res.company
      model. Remove the method _get_company on the res.users model.
      
      17/ Add 'allowed_company_ids' and 'current_company_id' on the pyeval
      context. You can now use those variables on domains in the views to
      access directly to the activated company.ies on the current tab.
      
      TaskID: 1960971
      
      closes odoo/odoo#32341
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      a5b6f31c
Loading