Commit Graph
145 Commits
Author SHA1 Message Date
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
oco-odoo 78a8e0a98e [FIX] l10n_fr_fec: alleviate memory error when exporting too many move lines
We now split the export of the FEC files per batch of move lines. This was necessary, as the fetchall() ran on the cursor to get the results could return a huge amount of data on big databases, saturating the RAM.

This fix is not exhaustive, and memory consumption could be lowered by removing the need to convert the whole file to base 64 and write it in attachment. Those changes are not doable in stable ; further improvements will come to master.

OPW 3442579

closes odoo/odoo#130884

X-original-commit: 86a221fa3773b5b23ae8f1ad653c1aaac607482e
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-08-04 16:35:05 +02:00
Nshimiyimana Séna 4393a03f4f [FIX] l10n_fr_fec: unlock UI after exporting FEC
Summary
-------
Currently, if you try to export FEC, download will work correctly, but
the UI will stay locked.

Steps to reproduce
------------------
* install l10n_fr_fec
* Accounting / Reporting / France FEC
* input a start/end date (ex: 01/01/2022 to 12/31/2022)
* click Generate
 => Report exports immediately, but the UI stays locked.

Cause
-----
This issue is caused by commit d291ef80b726c11486efe6e42d9dcf4968efa518
The intent is to make it so that if an `act_url` action with target
"self" is expected to reload the page, then the UI is blocked and
remains so, expecting the page reload to naturally unblock it. We
rely on the `beforeunload` event as a signal that the page is likely to
reload, usually followed by the `unload` event (actual reloading of the
page).
However, things are different when the new URL points to a file
download. Here, `beforeunload` is triggered, but not `unload`. As a
result, the `env.services.ui.unblock()` function isn't called, and since
the page doesn't reload, the UI stays blocked even after the download
starts.

opw-3344777

closes odoo/odoo#129918

X-original-commit: 23744ba3f992203e36dac59acfc905b018758e25
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-07-27 20:32:36 +02:00
william-andre 0479b2b594 [IMP] account,*: manage subsidiary companies
Allow sharing records between company
* accounts
* taxes
* fiscal positions
* products
* ...and some related models

These records can be read and used in children companies.

This can be used to
* have different branding for different businesses
* allow more complex security rules
* consolidate branches differently
* manage different tax reports with different tax ids in the same
  country

task-3371677

closes odoo/odoo#125642

Related: odoo/enterprise#43215
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-07-20 11:49:06 +02:00
Julien Carion (juca) 6c412be2ea [IMP] *: coherent hotkey uses
This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.

task-3370463

closes odoo/odoo#127469

Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 18:24:15 +02:00
Florent de Labarre 2855884f8d [FIX] l10n_fr_fec : can be downloaded by unallowed user
By RPC an other user in other company can access to an other fec.

closes odoo/odoo#125435

X-original-commit: 857f2e026dd9e4307adda786e2745aa7cb36a2c3
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-06-19 10:40:54 +02:00
Louis Wicket (wil) 04189318cc [I18N] *: update master translations
Currently, only stable releases see their translations updated. This has
resulted in master accumulating outdated stuff for years, which can be
confusing for users testing master on runbot.

This one-shot commit resynchronizes master translations based on the
content from 16.0 and removes empty PO files (i.e. no longer containing
translations).

closes odoo/odoo#121629

Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-22 17:52:07 +02:00
william-andre 0611d8311e [IMP] l10n*: apply automatic icon building
task-3166075

closes odoo/odoo#108617

Related: odoo/enterprise#35547
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-05-10 04:14:50 +02:00
wan 5125748616 [REF] account: remove chart template
Rewrite the whole chart template mechanism, removing the templates
stored in the database. The new format will mainly use CSV.

Speed up install time
---------------------

* About half of the time of installing a localization for the first time is
  taken by creating the template records. This new in code format gets
  completely rid of this.
* Creating the template records could often not be done in batch because
  of parent/children relations.
* The instanciation of the accounts on the company has been entirely
  reworked too, by
  - optimizing the order of creation of records to avoid UPDATE queries
  - using precomputed fields to avoid UPDATE queries
  - updating the translation in batch
  - deactivating logging in the chatter
  - avoiding access rights checks by checking the rights at the start

Overall, when installing a chart template for the first time, it is 4
times faster because half of the time spent on saving the template in
the database is not done at all anymore, and the instanciation on the
company is more than twice as fast.

Reduce technical debt
---------------------

There is no need to synchronize the templates with the real records
anymore. No need to use hooks to copy the data from one to the other.

It is easier to change a template in a stable version, which can often
be necessary due to legal reasons (i.e. a change of tax rates, reporting
tags,...)

Two modules have been removed:
* `l10n_generic_coa`: since there is nothing left datawise in this
  module, it can be integrated in `account` for free. It is just code
  and CSV.
* `l10n_multilang`: the fields that this module modified to be
  translatable are now always translatable:
  - there was an issue when updating modules that deleted all the
    translations because the fields were not translatable at some point
    during the loading of the registry, then they because translatable
    again but lost all translations because of the column type change.
  - most devs are not able to understand all the languages needed for
    all the localization available. Therefore, english has been added in
    the sources in most localization to understand better issues while
    debugging.
  - no need to call post init hooks anymore, doing the sync with the
    templates.
  - more: see "Translations" section

Because most of the data is now in CSV, it is also easier for product
owners to edit, audit, modify files themselves, removing one layer
during trivial development processes when only data should be changed.

More flexibility for declaration
--------------------------------

The data declaration can now be done easily in python or CSV.
A nice feature is that you can declare everything at once, even for some
more complex chart of accounts:
* if you have to set default taxes on accounts, would need to
  - declare the accounts because accounts are required on the taxes
  - declare the taxes
  - declare the taxes to put on the accounts
  This would lead to scatter information in multiple files. Now,
  everything can be declared in the same place and the loading of the
  chart of accounts will do the 3 steps automatically.
* if you have a relation of child/parent, you would first need to
  declare the parents then the children, and the loading would not be
  efficient because done one by one. Now, everything is done in batch
  automatically without having to think about it.

It is also easier to update fields on records where there was no field
for that on the templates, like
* setting a restriction for journals on accounts
* setting specific values on the company
* modifying journals and linking them easily by using the xml_id instead
  of having to compute it manually

Translations
------------

Some countries have multiple languages (i.e. Belgium uses officially
French, Dutch and German, and the CoA also has an official English
version) and we must support the languages in all these countries.
All these translations are known, and hard coded without using out
translation platform (Transifex). We also like to have the English
version (even if an official one doesn't exist) so that support can be
done more easily in databases using chart templates in other languages
(especially using a non roman alphabet).

Because the translations were not on Transifex for these records, it was
really hard to maintain: the translation templates (`.pot` files) were
not easy to extract as the automatic export would give values mixing
both the CoA and the menuitmes, the fields' strings,... But we don't
want to translate the CoA as we already know the value.
Managing the translations in the `.po` files was also annoying:
- it is easy to forget that the translations need an update too
- it requires a special editor, special terminal commands that everyone
  is not familiar with
- it is easy to make mistakes in the source string

The new format is the following: `field@en_US` where `field` is the
translatable field (usually `name`) and `en_US` is the locale code.
This allows to have the whole declaration on one line, everything in one
file. It also makes the process easier when debugging: instead of
searching for the translation in the `.po` files, it directly appears
next to the configuration of the account/tax/... .

Update of the code
------------------

The code can be updated using this script
https://github.com/william-andre/transform_coa
Forward ports can be managed too by stashing/resetting/checkout the new
modules or the changes in the modules updated in the same PR.

task-2687567

Part-of: odoo/odoo#110016
2023-02-17 19:30:40 +01:00
jbw-odoo d050b8e8a0 [FIX] l10n_fr_fec: allow exclusion of journals in FEC export
In French accounting, they need to provide a FEC file to the auditors/tax authority to control their accounting. So far it's fine in Odoo.
While a company is managing IFRS accounting, the usual way to do it in Odoo is to use a specific journal "IFRS adjustments" for example. This way of working allows you to have a balance in local GAAP (excluding IFRS entries) and in IFRS GAAP (including the IFRS entries).  So far it's fine in Odoo.
The issue that we met is once a customer need to send his FEC file to the auditors/tax authority, he needs to send only local entries (then excluding IFRS entries). Therefore, it would be great to have an option to exclude some journals from the FEC export.

closes odoo/odoo#110655

Task: 3133678
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-02-09 18:07:12 +01:00
jbw-odoo 3148ec8c8e [FIX] l10n_fr_fec: fix account names
Account names are now in english since : https://github.com/odoo/odoo/commit/f8c2b02abe60ec4860e9472fe3b1e259fb35a1d2
Fix the expected results in test.

Task: 3133678
Part-of: odoo/odoo#110655
2023-02-09 18:07:11 +01:00
Florian Vranckxandxmo-odoo 7dc2190fa4 [IMP] test_lint, * : SQL injection detection
This commit brings a new way to detect sql injection.

Previously, this test was meant to push developers to use the second argument of cr.execute(query,args) for parameters.

However, this also meant that the test will always be green as soon as the second argument is used.

This commit aims to change that by tracking the source of information of all variables used to build a query. Parsing of the AST in reverse, starting from the query variable itself.

However these are some current limitations:
  -The hierarchy of Odoo modules is currently not taken into account. If two functions have the same name, they will both be evaluated to find if their return value is part of the query
  -Object mutation is not supported and is not evaluated
  -Whitelisted values are too wide in order to reduce the amount of false positives.

Even if this test is blocking, it can be disabled by adding #pylint: disable=sql-injection at the end of the line.

closes odoo/odoo#101237

Related: odoo/enterprise#35697
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Co-authored-by: xmo-odoo <xmo@odoo.com>
2023-01-26 14:19:00 +01:00
aliya 6278eaeb32 [FIX] l10n_fr_fec: fix unaffected earnings account check
Before account types refactoring, fec wizard would check whether company has accounts for unaffected earnings and only call `_do_query_unaffected_earnings` in that case. Now it would always call it.
This commit adds a check for `equity_unaffected` accounts back

closes odoo/odoo#110408

X-original-commit: f9bdc589450514c3e240efb2297ded1f1a4c5879
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-01-19 17:49:11 +01:00
Florent de Labarre 29d4179c71 [FIX] l10_fr_fec : multicompany error when fetching unaffected earnings account
- create a company A
- create a company B with French accounting
- Select A and B in the company selector, with B being the active company
At export, the A's unaffected earnings account can be used instead of B's.

closes odoo/odoo#109421

X-original-commit: 17a7390ad8cd0b09ccad609febc9ccb0bea1aa3a
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-01-09 14:24:26 +01:00
Josse Colpaert ec172b74fe [FIX] l10n_*: fix tests + don't decorate test class with freeze_time
*: l10n_fr_fec, l10n_account_edi_ubl_cii_tests

Fix two failing tests in: - l10n_fr_fec: Add missing factor_percent in
the creation of a tax in the test for FEC - account_edi_ubl_cii: The
invoice name supposed the old convention per month while this was
changed to on a per year basis anyways for customer invoices.

These two tests were ignored by runbot for a while and began to fail
only after the runbot exception was removed (see:
https://runbot.odoo.com/runbot/build/22172258).

In addition, tests in `TestItEdi` started to fail as well when the
exception was removed ! In particular, if an exception was raised in the
`setUpClass` of `TestAccountFrFec`, the tests in `TestItEdi` were
failing.

This is because `TestAccountFrFec` is decorated with
`freeze_time('2021-05-02')`. Indeed, when one decorates a subclass of
`unittest.TestCase` with freeze_time, if the `setUpClass` raises an
Exception, `_freeze_time.stop()` is not called, and the frozen date is
propagated in the other test classes. As a consequence, when an
exception was raised in the `setUpClass` of `TestAccountFrFec`, the
freeze_time set in `TestAccountFrFec` (2021-05-02) was kept in
`TestItEdi`, thus causing tests to fail in `TestItEdi`.

As a conclusion, `freeze_time` should never decorate an Odoo test class.

closes odoo/odoo#109324

X-original-commit: 531270666ec5a6582d4a0a68ea534f2a3a6852ff
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-01-06 18:41:38 +01:00
Julien Alardot (jual) ef6e3b668d [FIX] l10n_fr_fec: Fix missing colspan
Since the recent css change the text of the description field was no taking all the place he could, so it was impossible to read, thanks to the colspan it's now the way it was intended

closes odoo/odoo#108714

Task: task-3103640
X-original-commit: b35485ddbb0567ff129e9da863a29bdc66df34eb
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
2022-12-27 13:18:10 +01:00
Julien Van Roy d23bece093 [FIX] l10n_fr_fec: make tests independent from tax template
Currently, changing the french default_tax_sale's name or account will make the
`test_generate_fec_sanitize_pieceref` fail (for instance: with task-3087037).
Make the l10n_fr_fec test independent from any account.tax.template change by creating a
new tax in the setup of this test.

closes odoo/odoo#107319

X-original-commit: 5128c8dfe75aa943a47e939776804dd878c0e378
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2022-12-06 15:32:55 +01:00
Julien Van Roy 3034f1d0db [FIX] l10n_fr: clean Tax Groups, CoA, Taxes, Fiscal Positions, Tax report
This commit cleans the tax groups:
- it removes the negative tax groups
- it makes sure that there is only one tax group per tax rate
- all the taxes with the same rates are attached to a single tax group

This commit splits the taxes to make the distinction between the goods and services.
In addition, the fiscal positions are also updated accordingly (make sure to map to another
one having the same scope: goods/services and type: sale/purchase).

These changes are based on the reliable feedback of LPDE (Didier Six). No tax were removed
from the old version. Only some were split, the others were kept (but modified).

In addition, the tax report is updated to the 2022 version and the new tax report lines
are linked to the taxes.

task-2674047

closes odoo/odoo#102749

X-original-commit: a4c5171e1a79242bba201affba9d94bb9e137e94
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2022-10-08 17:02:51 +02:00
Chong Wang (cwg) f8c2b02abe [FIX] *: adapt code to jsonb translations
Website: the context install_filename='dummy' is used to prevent
arch_updated from becoming True while updating translations of
ir_ui_view.arch_db (if arch_update becomes True, test_inherit_specific
fails)

Fuzzy search for jsonb translated fields has been adapted in the case of
website.  It may require some refactoring later.
2022-09-15 22:37:50 +02:00
aliya 26b2472f49 [IMP] account: refactor account types
Task: 2856281

- Remove user_type_id, account.account.type model, internal_type
- Add account_type that is a simple selection field
- Move internal_group and include_initial_balance to account.account
- Because of these changes, type_control_ids on account.journal is also removed

closes odoo/odoo#93212

Related: odoo/documentation#2223
Related: odoo/upgrade#3595
Related: odoo/enterprise#28205
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
2022-07-08 19:52:15 +02:00
Andrea Grazioso (agr-odoo) 64106ba7c7 [FIX] l10n_fr_fec: use invoice/bill date when generating FEC
Install FR accounting and have a FR company setup with VAT
Create a bill with bill date different from accounting date
Export FEC under Accounting>Reporting>FEC

For the created bill the accounting date will be used, while it should
be taken first the bill date

opw-2680288

closes odoo/odoo#88319

X-original-commit: 2b1fc6a9b48e423e8f299ebeb723c95302aa13ea
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2022-04-08 18:31:41 +02:00
Nicolas (vin) d9ee3a019e [FIX] l10n_fr_fec: allows exporting FEC without TVA number.
Not all company needs a French TVA number but still needs to provide
FEC file.
Improve that by making the TVA number optional, allowing to export the
FEC file without it. The only difference is that in such case, the vat
number won't be appended to the file name.

Task id #2801629

closes odoo/odoo#87620

X-original-commit: 59937bbea86a9d01bb7038f7e307fd88fbb82976
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
2022-03-31 07:55:40 +02:00
Martin Trigaux 99901f003e [I18N] l10n_fr_fec: synchronise translations
msgmerge with .pot file

Fixes odoo/odoo#83457

closes odoo/odoo#84802

X-original-commit: 462982d8c3ad4df3ceef8787492ea7737c0d68d1
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-02-17 16:41:51 +00:00
Julien Van Roy b94bfa039c [FIX] l10n_fr_fec: fix the translations files
Based on the po/pot files generated from odoo,
reorder the translations + remove the unused one.

closes odoo/odoo#84677

X-original-commit: 08c7503c7a0d25e00f26ec1fc0b6eede23fe71dd
Signed-off-by: William André (wan) <wan@odoo.com>
2022-02-15 19:21:48 +00:00
william-andre dd9c5e04de [FIX] l10n_fr_fec: test shouldn't be dependent on the date
The test was failing because of the hardcoded date in the expected test
values, whereas the real values gotten were using today's date.

The test should also be running when installing only `l10n_fr_fec`, so
we should be installing a chart template from `l10n_fr`, not the generic
one.

closes odoo/odoo#84196

X-original-commit: d9b56e9eda5ce1d93e4f8cfe16233850a3b39de9
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-02-08 19:11:25 +00:00
Julien Van Roy e44f866853 [FIX] l10n_fr_fec: remove duplicated translations
closes odoo/odoo#83677

X-original-commit: 466327d4e79434d06d37ef5f2db700cafaa66c5b
Signed-off-by: Laurent Smet <las@odoo.com>
2022-02-01 09:54:21 +00:00
jbw 0f4cc6dcce [IMP] account_fr_fec: fix SQL Memory error when FEC too big
Set fec_data to attachment True to avoid storing data in DB and generating memory alloc errors.

closes odoo/odoo#83620

Task: 2453453
X-original-commit: e2d4a6bd03361188f7454015574896b52aa797ef
Signed-off-by: William André (wan) <wan@odoo.com>
2022-01-28 18:58:47 +00:00
Julien Van Roy 9f12a39396 [FIX] l10n_fr_fec: prevent error for non-french vat
As the FEC can be downloaded by non-french companies, the length of a given vat number might be different than the french's vat.
Currently, if the vat length was lower than 13, it raised an error.

For french companies -> include the SIREN in the name of the FEC file (legal requirement)
For non french companies -> include the complete vat number in the FEC file

closes odoo/odoo#83054

X-original-commit: c3c05bf073a521a662d83c3382e77cb25c59bc3c
Signed-off-by: Laurent Smet <las@odoo.com>
2022-01-20 09:11:01 +00:00
Julien Van Roy 4e18c501b8 [FIX] l10n_fr_fec: solve some issues with the french FEC
This commit:

1. Allows exporting the FEC without any VAT number. Indeed, a company can have to submit its FEC without being submitted to VAT regulation.

2. Allows non french companies to export FEC file.

3. The FEC now includes the journal items == 0 and/or journal entries which total is 0.
Initially, french tax administration rejected the journal items which balance is 0.
But after several requests from tax payers, they agreed because they prefer continuous sequences and some tax payers post entries which total amount is 0.

task-2717676

closes odoo/odoo#82456

X-original-commit: e6206b03ba245ece3d8f765644d71f2d2008398d
Signed-off-by: Laurent Smet <las@odoo.com>
2022-01-11 08:36:38 +00:00
Xavier Morel a6c29c44f4 [IMP] l10n_fr_fec: fix report 2020-12-15 11:31:34 +01:00
Paolo (pgi) 10632d8ce3 [FIX] l10n_fr_fec: test wizard must have test_file = True
closes odoo/odoo#80668

X-original-commit: 3ae0b21f4b269859dc41ab6851e2e6e52b6b2e11
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2021-12-01 11:50:42 +00:00
Paolo (pgi) c6c41f359e [FIX] l10n_fr_fec: Cleanup spaces in FEC export
The fields of the FEC export must be sanitized.
All tabs, carriage returns and newlines must be excised.

Ticket link: https://www.odoo.com/web#id=2672261&model=project.task

opw-2672261

closes odoo/odoo#80366

X-original-commit: 5869376a95ea2d500bda687ec944354171988a79
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2021-11-25 09:14:13 +00:00
alt-odoo 404ec3d44d [FIX] l10n_fr_fec: correct translation of journal name in FEC export
Before this commit, when exporting the FEC report, we were using the account journal
name in the initial language set. As it could be confusing for the French administration
to see names in a foreign language, we should use the user language instead to allow the
export of FEC report in French even if another default language was used.

closes odoo/odoo#79908

X-original-commit: 8ba4b76017a92c63e369877f30583485bedbd57a
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Alex Thuyls (alt) <alt@odoo.com>
2021-11-17 08:26:28 +00:00
remi-filament 0bcb940511 [I18N] l10n_fr_fec: translate in French
Fixes odoo/odoo#78932
Closes odoo/odoo#79274

closes odoo/odoo#79389

X-original-commit: ec5ac114405e936af1b04be74176f919adb8ec71
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-04 16:51:44 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
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#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Kevin Baptiste 86aa7b78aa [IMP] *: introduce data-hotkey on form and modal views
Define `data-hotkey` on most used action buttons.

For the modals, the following keys are dedicated for "special"
actions:
 - Alt+G: add
 - Alt+V: save
 - Alt+Z: cancel

closes odoo/odoo#73275

Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-15 08:39:49 +00:00
Paolo (pgi) b39a5806d0 [ADD] l10n_fr_fec_import: added a module for import data from FEC
A FEC file (Fichier des Ecritures Comptables) contains all the accounting data and entries recorded
in all the accounting journals for a financial year. In order to make the onboarding of new users
easier, Odoo Enterprise's French fiscal localization includes access to the ``l10n_fr_fec_import``
module, that enables the import of existing FEC files from older software to the Odoo database.

The imported data are:

    * accounts
    * journals
    * partners
    * journal entries

Every entity is imported with a generator that reads the values from each line, ready to be loaded.
The entity (only accounts for the moment) is then completed with data from the CoA's templates
and imported in the database. Journal entries are posted and reconciled.

The Odoo branch implements the install checkbox in the Settings > Accounting page for an easy install.

Task 2515785: https://www.odoo.com/web#id=2515785model=project.task
Documentation PR: odoo/documentation#979

closes odoo/odoo#71290

Related: odoo/enterprise#16704
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-05-31 09:54:11 +00:00
oco-odoo 17610e8ca9 [IMP] account, account_edi, l10n_*, purchase, sale: Generalize the use of account_fiscal_country_id
Before, account_fiscal_country_id was only use for tax operations; and country_id was used for all the other accounting stuff. Now, with the new ability to use foreign tax reports (with foreign VAT fiscal positions), we can generalize the fiscal country, sot that it is the one that needs to be used for the whole accounting. Since foreign tax reports were not supported before, account_fiscal_country_id is already set on existing database as the country for the "main" accounting, so the impact of this change is small.

closes odoo/odoo#68349

Related: odoo/upgrade#2322
Related: odoo/enterprise#17299
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-04-01 12:09:20 +00:00
bat-odoo feca3ad527 [IMP] base: update l10n icons
Purpose of the task is to update all l10n modules icon with new icon that i have
found in task attachment.

So in this commit, Updated all l10n modules icon with new icon.

closes odoo/odoo#65329

Taskid: 2442631
Related: odoo/enterprise#16054
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-25 15:01:43 +00:00
wan bb04c655e1 [FIX] l10n_fr_fec: follow CompAuxNum for CompAuxLib
Thos two fields shoulb be the same, following
https://github.com/odoo/odoo/pull/43985

closes odoo/odoo#62788

X-original-commit: 902dbd1fe1bf50d7c3e00c8f9c6405f76d139daf
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-12-03 09:28:51 +00:00
Florian Gilbert 2c926abcb3 [IMP] l10n_fr_fec: Set lock date when user ask for official FEC file.
Add the possibility to download a test FEC file.
Set the fiscal year lock date when the user ask an official FEC file.
Add some basic checks.

Task ID: 2297407

closes odoo/odoo#55311

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2020-08-07 07:00:48 +00:00
william eaa7f93c0f [IMP] l10n_*: update the module categories
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: Cedric Snauwaert (csn) <csn@openerp.com>
2020-08-07 08:30:41 +00:00
Jeremy Kersten 76b2de42f4 [FIX] *: handle null value for boolean in sql queries
It has always been a best effort until the v13 to have false as default value
for boolean field.
Until v13: https://github.com/odoo/odoo/blob/12.0/odoo/models.py#L3645

During ORM refactoring in v13 it has been replaced by a default value in sql
From v13: https://github.com/odoo/odoo/blob/13.0/odoo/tools/sql.py#L79

But with a typo since columntype for boolean is bool and not boolean.
What's mean that in v13 we have a lot of null value for boolean (~=False)

In all cases, we try to be aware and check Falsy boolean with 'null or False'
(https://github.com/odoo/odoo/blob/13.0/odoo/osv/expression.py#L1230)

So we should do the same when we write pure sql in method bypassing the ORM.

closes odoo/odoo#53391

closes odoo/odoo#54458

Related: odoo/enterprise#11319
Related: odoo/enterprise#11838
X-original-commit: 118c9f6aafd423f415b2bbfcf8a9cfcd676d9b92
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-07-14 15:52:59 +00:00
Martin Trigaux ba244cef01 [IMP] *: replace to new _() syntax
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.
2020-06-18 13:03:34 +02:00
wan f0b752bb71 [FIX] l10n_fr_fec: give write access to account.fr.fec
account.fr.fec model needs to have write access as it
explicitely calls write() on its records.

closes odoo/odoo#50149

X-original-commit: ffef4a4361c6e817872defae504f002629a1a0e4
Related: odoo/enterprise#10196
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-04-24 12:41:46 +00:00
Ravi Gohil 126d6f5694 [FIX] l10n_fr_fec: added missing model access
Let FEC report be generated by users having access to
full accounting feature or who are Accountants.

Task: 2210808
X-original-commit: 89fd50e47dcd4c6fda9342fce872283c18dc39b1
2020-03-09 15:50:39 +00:00
Martin Trigaux 3534e9ed4d [I18N] *: remove outdated pot format
Was still using the old "selection:" form instead of ir.model.field.selection

closes odoo/odoo#44322

X-original-commit: fdf9b06d76f95965ed173b1631305f8c8c3a8d9d
Related: odoo/enterprise#8050
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-01-30 14:43:11 +00:00
wan 7efff597e5 [FIX] l10n_fr_fec: CompAuxNum changes
opw-2122776
* CompAuxNum should be the code of the account concatenated with the id
of the client
* It should be popuated only if it is a receivable/payable

The problem is the export of the partner ID in the column G
"CompAuxNum". We only export the ID of the linked customer/vendor. When
they import the FEC into their software to make tax declarations and
annual accounts. The system will notice if an account is filled in in
the column G and will override the account in column E with the ID of
the partner. As the ID is not a real account, they cannot use the FEC to
import correctly.

closes odoo/odoo#44297

X-original-commit: 955eec233f2a3129dfddca06ad43a426b3cd4061
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-01-30 12:34:06 +00:00
Yenthe666 7876af3ad0 [IMP] *: set name on page elements
page is an element that is often used for xpath

closes odoo/odoo#41718

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-16 15:10:24 +00:00
Christophe Simonis d74b451805 [MERGE] forward port branch 13.0 up to f4105eb9c7 2019-10-09 02:08:17 +02:00