Wednesday, October 2, 2019
3 changes · master
New functionality added to Odoo
Odoo now better supports employees working across multiple companies at the same time, showing relevant records from all companies they are allowed to access. It also adds safeguards so related business documents stay aligned to the correct company throughout processes such as sales, warehousing, invoicing, and payment.
Original PR description
***The business requirement*** We are currently engaged in a project where a company needs to operate simultaneously on various companies. Employees operate across the multiple companies, and want to…
***The business requirement*** We are currently engaged in a project where a company needs to operate simultaneously on various companies. Employees operate across the multiple companies, and want to access fast to data relevant to their job role, irrespective of the company that this data belongs to. Users expect that the company is derived in the flow correctly, possibly from other organizational elements (e.g. sales team, warehouse,...). Some examples: * An accounting clerk reconciles the bank accounts for 10 companies daily. She wants to see all bank accounts in the same dashboard, and reconcile each one. It is assumed that inherently when she reconciles payments from bank of a given company, she should only be able to match with invoices from the same company! * A warehouse manager is in charge of 10 warehouses of 10 different small companies. He wants to quickly see all pickings for his warehouses. He will then prepare and ship. He is not concerned at all about what company do they belong to. He should assume that it is the same as the originating sales order. * ... By the way, this is how SAP has worked forever, and users loved that (well, just assumed it was the correct way do operate). So, as a summary, the system must: * Quickly provide all data that is relevant to a user, regardless of the company (as long as he has permissions for that company). * The overall business process must be inherently consistent company-wise (e.g. same company in lead→sale order→picking→invoice→payment). ***The technical approach*** We have been analyzing the current status of multi-company in Odoo, and here are the high-level areas that in our opinion need addressing: 1. **Security rules**: A user should be able to display all the data for the companies he is allowed to operate on, not on the basis of the current company. 2. **Provide correct domain information**: If you create an invoice, for company A, obviously you should not be see or be able to select a tax from company B. 3. **Company-wise consistent processes**: e.g. same company in lead→sale order→picking→invoice→payment. 4. **Company-wise consistency of the relational data model**. You cannot change the company of a journal, if it would introduce an inconsistency with the company of the invoices that the journal is assigned to. Odoo needs a system of checking to ensure that Odoo develops but with multi-company in mind. ***Current solution (WIP)*** We have been working in this issue for some time in v10 (you can view our work in https://github.com/Eficent/multicompany-fixes/tree/10.0) that attempts to address for now points 2, 3 and 4. For example, we have in that branch an approach in property fields, that allows the user to maintain the property fields without need to change the company. While addressing this, we realized that there exists some generic patterns that could be reduced and simplified by adding few methods in the base, and thus a lot of work would be saved. **Description of the issue/feature this PR addresses:** For updated info on this project, see https://github.com/Eficent/multicompany-fixes/wiki/The-next-Odoo-multi-company. This PR attempts to resolve points 2 (partly), 3 and 4 in a more generic way, from the framework perspective. Bear in mind that tests on this PR will fail, due to inconsistencies in data (point 4). **What this PR includes:** - Enables functions in `api.onchange()` and `api.constrains()` just to make possible the following. - Adds some methods in `base` model: - `name_get` method is updated to show the company when needed. - the `onchange` method put to False some company-dependent fields that don't have a proper `onchange` for them. Thus, this method should be overridden in some models by a most suitable one depending of the desired behavior. - The constrains are the ones that are detecting the wrong test cases and thus providing a red Runbot. BTW, may exist some few models or fields where one would not want this constrains and instead force a company in some fields. In this few cases, in the proper model, the constrains should be overridden and maybe passing a boolean field by the context. **Our request to Odoo** We would like to explore the possibility to work together with you to fix the approach to multi-company in the future. cc: @rco-odoo, @nim-odoo, @gurneyalex, @jbeficent, @etobella -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Introduces a new Mollie payment integration so businesses can accept payments through Mollie in Odoo 13. This is presented as a proof of concept and still needs cleanup, review, and dependency decisions before being production-ready.
Original PR description
Description of the issue/feature this PR addresses: Adding the official Mollie app into Odoo V13. Notice that this PR is just a proof of concept to show off the behaviours in Odoo V13. Things that would need to be changed before this gets merged (atleast): - App rename to `payment_mollie` - See if we can remove the dependency of `phonenumbers` - To decide if we add the dependency for `mollie-api-python` in the `requirements.txt` file or if we add `try/except` clauses - Code testing and cleanup as this is a minimal migration from V12 to V13 from https://github.com/mollie/mollie-odoo (https://github.com/mollie/mollie-odoo/commit/2bce226d4bef850fc7afafbb93ea11b47d5b7a7b) - Remove the `readme` and other images - Code reviewing / refactoring Current behavior before PR: No Mollie support Desired behavior after PR is merged: Mollie support -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Enhancements to existing features
This change introduces a redesigned Peruvian chart of accounts, tax structure, and related setup needed for local electronic invoicing requirements. It also adds location and identification data so Peruvian companies can prepare accounting records in the format expected locally.
Original PR description
- Added group on move lines to show account moves as Peru is used to see them:  - Completely new CoA structure and tax structure. - Minimal fields for l10n_pe_edi module - Auto set the groups. - Districts and Cities, mandatory by format on EDI for Peru. TODO: Tests and few adaptations -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr