Task 2124952
Extract all the demo data from `l10n_generic_coa` to a new way of
generating the demo data for accounting modules.
Because the data needs to be created multiple times, and right after the
chart template instanciation, it cannot be done the usual way. Instead,
we use python generators to declare the data. It allows us to reference
data that was not created yet at the start of the creation of the demo.
An xml_id is given, prefixed with the id of the company it is created
for (just like the instanciation of the chart template)
To find the correct accounts, a helper method has been added to
`account.account`. It will look for an account with the correct xml_id
(which is the one of the l10n_generic_coa, that we have to put on the
other l10n modules too, in the future). If it didn't find the xml_id, it
will look for an account with the correct type. If it still didn't find
one, just take any account.
Task 2230635
Add _populate implementation for:
* Bank Statements
* Journals
* Journal Entries / Invoices
* Payments
* Reconcile Models
Load a chart of account for the first 3 companies, and load data only
for companies with a CoA installed.
This part of the tour can't work with the new online synchronization
module (account_online_synchronization) due to the fact that we are
using an iframe to display the list of institutions and therefore
those steps won't work within the iframe.
Also remove account_plaid & account_yodlee from _auto_install_l10n as
those modules don't exists anymore.
closesodoo/odoo#50267
Related: odoo/upgrade#1780
Related: odoo/enterprise#8200
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Bug description:
Installing Invoicing on a database whose company is configured in the
SEPA zone, results in installing Accounting
Steps to reproduce on the Runbot:
- Start from a base enterprise database
- Go to Settings > Users & Companies > Companies and configure the
address of MyCompany to the SEPA zone (e.g. Belgium)
- Go to Apps and install Invoicing
- The Accounting application has been installed
Explanation:
The module account_sepa depends on account_batch_payment, which depends
on account_accountant.
The post_init_hook of account, _auto_install_l10n, adds the account_sepa
module to the installation if the country_code of the company is in the
SEPA zone.
The same side-effect is observed with account_bank_statement_import_camt
which depends on account_bank_statement_import, which depends on
account_accountant.
The fix is to remove the installation of these modules from the
post_init_hook of the module account, and add them to a new
post_init_hook of the module account_accountant, that will be in a PR in
the enterprise project.
closesodoo/odoo#58073
X-original-commit: db4ce56641c75403be935efa072687bff65c7bb2
Related: odoo/enterprise#13362
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
This config parameter was used in order to choose another country than the company's to select the tax report. It is now replaced by a new account_tax_fiscal_country_id field in account_reports.
closesodoo/odoo#55308
Related: odoo/enterprise#12156
Related: odoo/upgrade#1624
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
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.
closesodoo/odoo#55384
Related: odoo/enterprise#12179
Related: odoo/upgrade#1568
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Done in commuity so that other modules can inherit from it, but only
used in enterprise's l10n_au_reports for now.
closesodoo/odoo#49581
Related: odoo/enterprise#9907
Signed-off-by: Josse Colpaert <jco@openerp.com>
The module l10n_generic_coa was installed in every single case when
loading a new db from the console because the country is US by default.
If we have a `-i l10n_*`, we dont need to install another CoA based on
the country.
The fact that it is installed was messing with the demo data because we
were searching for a type of account not necessary present in the CoA
installed on the company.
closesodoo/odoo#52190
X-original-commit: d3ad353c86f7b148946f9e36457f6b002cc118c1
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
Since commit 4d23d241bf, there is only one
CoA left for China. No need to have 2 separate modules.
Also, the translation in english was broken.
closesodoo/odoo#41826
Signed-off-by: Josse Colpaert <jco@openerp.com>
{ As the SEPA BIC is no longer mandatory we simplify bank creation removing constrains about BIC }
As of 01/02/2016, the BIC is no longer mandatory, you can see the page 25 ==> https://www.febelfin.be/sites/default/files/2019-04/standard-xml-sdd-initiation-_v4.1a-en.pdf
As a result, in order to simplify both the code and the process, we don’t want anymore constrains about that.
task : https://www.odoo.com/web#id=2056370&action=327&model=project.task&view_type=form&menu_id=4720
> We don't need BIC for both the company iban bank account or customer/vendor iban bank account
> If a vendor bill is linked to a valid IBAN bank account without BIC, show the QRcode (remove the BIC constrains )
> CREATE A SDD mandate should be possible without BIC (for both the company iban bank account or customer/vendor iban bank account)
> Create a SCT payment should be possible without BIC (for both the company iban bank account or customer/vendor iban bank account)
> Add a country group for SEPA zone
> Add IBAN country codes for each country in base_iban module
> Only display qr code when making a payment to an IBAN account whose country code corresponds to a SEPA member
> in account's post init hook, install SEPA modules if the country of the company belgons to SEPA zone (instead of Europe, as it is now)
closesodoo/odoo#40356
Related: odoo/enterprise#6738
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
The goal is to be coherent with the user property.
Actually, company_id and company_ids on the environment are no fields.
Calling env.company_id returns a browse record, not an id.
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
closesodoo/odoo#32341
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
To comply with Mexican laws, this l10n_mx_edi should always be installed when
both l10n_mx and the accounting modules are installed.
It should ease the onboarding process a bit too.
opw-1960982
closes#32566
Signed-off-by: Christophe Simonis <chs@odoo.com>
Before this commit, if import from tests directory was not in the __init__ file,
it was not possible to launch it with --test-file cli.
Now we only check in test directory if file exists.
This commit closes#26500
With this change,
* some modules are now set to be automatically installed by default
* the setup bar of accounting has been changed in order to allow more easiliy the configuration of bank accounts/journals (and the step to oversee the opening entry has been removed)
* the kanban view in the dashboard has been enhanced (mostly for bank journals, but not only)
Was task: 32668
Was PR #23049
Allow the user to set taxes on lines when creating manually a new journal entry, and tax lines will be computed automatically thanks to an onchange based on new unstored fields.
Was task: 33802
Was PR #19029
* localized checks layout of US and CA introduced in enterprise
* account settings now install account_check_printing instead of the US checks layout
Wsa PR #18791. Was task 33298
* CoA up to date
* Taxes up to date
* SKR03 installed by default but users can easily switch to SKR04 while no accounting entries exists for the company
* removed unneeded things
* set tags accordingly on accounts and taxes for the reports to work (new reports in enterprise)
Was task 31826. Was PR #17447. Discussion related on #18571
As already done for sale, customer portal for account is moved to account
module directly. Account now depends on portal module and website module
is not necessary anymore to display the account customer portal.
Localizations depend on the module "base_vat". It is therefore
impossible to remove base_vat without the localization. This causes
issues for users who simply want to deactivate the VAT check.
opw-743260
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
automatically in all countries thanks to Berne Convention + WTO rules,
and a reference to the applicable license is clear enough.