Commit Graph
66 Commits
Author SHA1 Message Date
Claire Bretton (clbr) 4a8099a1f9 [FIX] l10n_ch: Fix return tax type
The return tax should only be used through its parent tax,
we don't want it to be accessible directly on bills or invoices.

opw-3347425 (2nd issue)

closes odoo/odoo#126803

X-original-commit: a87bb033a3b02bf91f0958e8ee8a5202b297cd68
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-06-30 00:21:21 +02:00
John Laterre (jol) 6ba77562c0 [REV] account,l10n_*: remove company currency symbol in reports
This reverts commit d39396c728.

The feature was implemented in a rather rigid way,
and we think something more dynamic would be better.

closes odoo/odoo#115332

Related: odoo/enterprise#38208
Related: odoo/upgrade#4740
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-06-15 17:35:42 +02:00
Claire Bretton (clbr) 3acaed16a4 [IMP] l10n_ch: adds new tax rates for 2024
Switzerland changes its rates at the beginning of next year,
this change already has some implications on client's flow so
we add them to the localization so they can coexist with old rates till
the end of the year.
Changes:
- Added new taxes (2.5% -> 2.6%, 3.7% -> 3.8%, 7.7% -> 8.1%)
- Added tax fiscal positions to match those taxes
- Added tax groups
- Adds migration script to l10n_ch to apply those changes

Task: 3162286
X-original-commit: acd14e6f7f91755ea9b058eb7ab957b133266145
Part-of: odoo/odoo#121580
2023-05-17 10:34:07 +02:00
Maximilien (malb) 505691e5de [IMP] l10n_ch: taxes
We want to invigorate a Tax Name Taxonomy so that tax names are as codified as possible. This allow for a better display on Invoice Description, and allowed us to implement a smart name_search.

In this PR, we change the taxes names so that it's more clear for users

closes odoo/odoo#114673

Task-id: 3052677
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-05-10 18:16:14 +02:00
Claire Bretton (clbr) 82e1a2b1cb [IMP] account, l10n_*: add field invoice_label, field description back to initial purpose
Taxes have a `description` field that has been hijacked to
represent tax label on invoices. We want the description field
to be used for its original purpose, thus created a dedicated field
`invoice_label` in which we transferred `description` content.
We also make description translatable.
This is part of the Tax Taxonomy 2 rework.

Task: 3052677
Part-of: odoo/odoo#113236
2023-03-07 10:06:13 +01:00
william-andre d782b8b925 [IMP] l10n_*: convert CoA in new format
Converted using https://github.com/william-andre/transform_coa

closes odoo/odoo#110016

Related: odoo/enterprise#35836
Related: odoo/documentation#3336
Related: odoo/upgrade#4276
Signed-off-by: William André (wan) <wan@odoo.com>
2023-02-17 19:30:40 +01:00
Mohammed Erradi (moer) 94d6e8b474 [FIX] l10n_ch: Correct export fiscal position for LI
The aim of this commit is to fix the export fiscal position for invoices between Switzerland and the Principality of Liechtenstein in the Swiss localization.

context:
This commit corrects the Swiss national fiscal position, in accordance with legislation that considers Switzerland and Liechtenstein to be a common fiscal territory of application for VAT.

Previous to this commit:
- When the use create an invoice with a customer from Liechtenstein, the correct VAT is not applied because transactions to Liechtenstein were considered as export transactions.

After this commit:
- When the use create an invoice with a customer from Liechtenstein, the correct VAT is applied because transactions to Liechtenstein are considered as domestic transactions.

closes odoo/odoo#111578

Task-id: 3151891
X-original-commit: 773ad35af4b4d6d8ec608875ded6b5f22ecad1dd
Signed-off-by: Erradi Mohammed (moer) <moer@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-02-01 14:38:18 +01:00
Nicolas (vin) d39396c728 [IMP] account,l10n_*: remove company currency symbol in reports
There is a lot of use case where reports are exclusively in the company
currency, or have columns only in this currency. In these case, showing
the currency symbol is redundant, takes space and makes the reading
slower.

With this change, we will avoid displaying the symbol in a variety of
use case where it is not needed.

Task id #2868674

closes odoo/odoo#109666

Related: odoo/enterprise#35671
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-01-17 19:55:50 +01:00
Claire Bretton (clbr) 9a20271a2a [FIX] l10n_ch: translate tax report line to English
One line of the tax report was still in plain French while the code should always be in English
Translate the data and update pot/po files.

closes odoo/odoo#109480

X-original-commit: bc8ff80b84d650c34224315097742cb878404f5b
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-01-10 09:12:44 +01:00
Thomas Lefebvre (thle) 3e3defed94 [IMP] hr_maintenance, maintenance, l10n_ch, l10n_generic_coa, l10n_il: equipments renamed equipment
Modules:
- hr_maintenance;
- maintenance;
- l10n_ch;
- l10n_generic_coa
- l10n_il.

The plural of "equipment" is "equipment" and not "equipments"

changes in the enterprise version: odoo/enterprise#31498

Remark:
Runbot test log:
Two fields (equipment_count, equipment_ids) of maintenance.equipment.category() have the same label: Equipment. [Modules: maintenance and maintenance]
Two fields (equipment_count, equipment_ids) of hr.employee() have the same label: Equipment. [Modules: hr_maintenance and hr_maintenance]
Using "Equipment Count" to differentiate them

opw-2981186

closes odoo/odoo#100558

Signed-off-by: Adrien Widart <awt@odoo.com>
2022-10-21 11:09:14 +02:00
Camille Spiritus 78dfa2a07d [IMP] account : cash discount: set up default accounts and configs
The early payment cash discount functionality was merged in 16.0.

This PR allows for the behavior to be as localization specific as possible.

This concerns :

The tax computation (some countries leave it untouched after the discount, some countries discount it, and Belgium has a mixed behaviour)
The account in which the cash difference resulting of the cash discount should be put.
task- 2983913
related to #99572

closes odoo/odoo#102032

X-original-commit: 591757902dcdf1e3609d9c5ae23e2b134ee8e4da
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
2022-10-04 13:29:08 +02:00
Nicolas (vin) 77f3953e1a [IMP] account,l10n_*: cleanup reports menu items.
Following reportalypse, reorder the menu items in order to bring
some consistency to the report menu.
Also clean the menu items by removing all the menu items no longer
used since most reports are now selectable by going  on the generic
reports and then switching to localized ones.

Task id #2965755

closes odoo/odoo#99210

Related: odoo/enterprise#30854
Related: odoo/upgrade#3831
Signed-off-by: William André (wan) <wan@odoo.com>
2022-09-13 13:53:04 +02:00
Laurent Smet bedf191134 [IMP] account,l10n_*: Set 100 as default value for factor_percent in tax repartition lines
closes odoo/odoo#94125

Related: odoo/enterprise#28648
Related: odoo/upgrade#3695
Related: odoo/documentation#2557
Signed-off-by: Laurent Smet <las@odoo.com>
2022-08-25 19:56:56 +02:00
oco-odoo b7232b14b7 [IMP] account, l10n_*: Introduce unified reporting engine
This commit adapts account's model to the new report engine introduced for v16, and updates the data files accordingly.

account.report model is now declared in community, together with the other models used by the reporting. This is done so that the tax tags can properly be created by the tax report and used on tax templates. All the actual computation logic stays in enterprise.

See enterprise commit for full details.

Task 2524389

Part-of: odoo/odoo#94125
2022-08-25 19:56:55 +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
Brice bib Bartoletti 57346c85f8 [FIX] l10n_ch,l10n_dk,l10n_fi: 0% tax fix
Every tax should have a tax repartition line even 0% tax

closes odoo/odoo#85990

X-original-commit: 17e3bd58e519bd40fdc0c7fd431cd1a8f90cf33e
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
2022-03-07 19:15:03 +00:00
william-andre dc88be7019 [REF] l10n_*: use xml hierarchic fields for tax report data
closes odoo/odoo#76675

Related: odoo/enterprise#21464
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-11-25 00:31:17 +00:00
Mathieu Duckerts-Antoine 85b8a95116 [REF] *: clean some useless %% in xml files
The commit https://github.com/odoo/odoo/commit/1b40e9265f88f57aaaf311bb8fae3d1fd1966d7d
allows to get rid of most escapings %% in xmls but there were still occurences
of useless %% in some of them. We remove them.

closes odoo/odoo#78069

Related: odoo/enterprise#21553
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-11 12:34:47 +00:00
Paolo (pgi) bcb1bd2212 [FIX] l10n_*: Localization tax group localization data normalization
"account_tax_group.xml" and "account_data.xml" data files
have been renamed to "account_tax_group_data.xml"
when containing only tax groups, for compliance with the standard.

AE, AR, AT, BE, BO, BR, CA, CN, CR, CZ,
DE SKR03, DE SKR04, DO, ES, FI, FR, GR,
GT, HN, IL, IN, LT, MA, MX, NL, NO, PA,
PL, PT, RO, SG, SY, TH, TR, UA, UY, VE,
VN.

Part-of: odoo/odoo#77295
2021-10-01 12:40:54 +00:00
Paolo (pgi) e21331c1eb [FIX] l10n_*: Review of tax groups, tax templates and their countries
Many changes involved several localizations.

Tax groups data files that were missing the country_id:
AR, AU, EC, ET, HR, HU, IT, JP, LU, MN, NZ, SI, UK, ZA

Account_data.xml files being renamed or split to account_tax_group.xml
AT, CH, CL, PE, SK

Tax templates that were missing tax group information:
CH

Tax groups missing that were added:
EC

Part-of: odoo/odoo#77295
2021-10-01 12:40:54 +00:00
Nicolas (vin) d2d900d043 [IMP] l10n_ch: move a tax group to noupdate
One of the tax group in l10n_ch was not set as noupdate
like the others.
This will move it with the others to keep things consistent.

closes odoo/odoo#62833

Related: odoo/upgrade#2004
Related: odoo/enterprise#15140
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-05-26 10:51:29 +00:00
Nicolas (vin) adfb20537b [IMP] account: add country_id on tax groups
In order to not show unnecessary tax groups when configuring a tax,
we'll now filter them to only shows the tax groups that are either
linked to no country, or that are linked to the same country as the tax.

Task id #2206280
2021-05-26 10:51:29 +00:00
Ravi Gohil 27e72a9bbd [IMP] l10n_ch: added English and updated translation
- records in XML files are now in English language instead of French
- translation for the same will be loaded through *.po files for French, German and Italian
- improved translation for French, German and Italian languages

closes odoo/odoo#67512

Task: 2391988
Related: #67512
Related: odoo/enterprise#16944
Enterprise: https://github.com/odoo/enterprise/pull/16944
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-04-15 08:58:16 +00:00
oco-odoo 7922e5d102 [IMP] l10n_*: set newly-introduced country_id field on chart templates 2021-04-01 12:09:20 +00:00
root 76a969e1fd [FIX] l10n_ch: map tax report to right country
Before this commit the tax report links to Brazil while the chart of account is Switzerland.

By changing the ref it now installs the tax report with the right country set.

closes odoo/odoo#61806

X-original-commit: 93e44b6d85564b6fde99053ccb16399e224477e3
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-11-16 17:51:35 +00:00
Andrea Grazioso (agr-odoo) 470f7f1b4b [FIX] l10n_ch: No amount on section titles
The tax report should not display any amount on Section Titles

opw-2329278

closes odoo/odoo#58845

X-original-commit: 1367d12102aebc56f8c89d3011bfc183a954609d
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-09-29 15:16:16 +00:00
oco-odoo 9383f4c9ac [FIX] l10n_ch: improve the definition of "dédouanement" taxes so that they can be used with tax closing features
Tax closing requires the use of tax_line_id field on the lines it needs to take into account. This new config ensures such a line is created for 100% taxes. An empty, 0-balanced line is also created for the base line, but this is acceptable.

[IMP] l10n_ch: add new 100% tax for investments and other expenses

OPW 2333144

closes odoo/odoo#58014

X-original-commit: 0cc190ad302f98f7ae198166983ac40532d1d5ee
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-09-18 09:43:04 +00:00
Denis Ledoux 0f966196fb [FIX] l10n_*: no chart template should be set to noupdate
In a general manner,
the chart templates should not be set to noupdate,
that way, if a new company starts in an existing database,
it starts with an up-to-date chart of accounts.

For instance,
if the chart of template is not updated from
12.0 to 13.0, the `default_pos_receivable_account_id`
is not added in the chart template,
and when a new company is created,
the default pos receivable account is not set on the company.
Besides, the field `res.company``account_default_pos_receivable_account_id`
is not displayed on any form view,
whether or not the full accounting is installed,
so we must especially pay attention this default account is well set
from start, as the user as no opportunity to correct this by himself.

In addition,
in upgrade scripts,
the default pos receivable account on the chart template
is used to correctly set the pos receivable account on the company
and on the pos payment methods,
so it must be well set for the upgrade script to do its job correctly.

Technically, it means, without this revision, the fields:
- `account.chart.template``default_pos_receivable_account_id`,
- `res.company``account_default_pos_receivable_account_id`,
- `pos.payment.method``receivable_account_id`
were not filled properly on upgrade,
causing critical issues in the accounting entries on pos session closing.

Related to #52786
Related to odoo/upgrade@ccfd2371ef

closes odoo/odoo#52870

X-original-commit: 3258ba015ff75b7c176d83a44261d24ebfcc26de
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-06-11 15:13:19 +00:00
Hiral Bhavsar c7d40de3a7 [IMP] l10n_xx: auto apply fiscal positions
Canada(l10n_ca): Apply fiscal positions automatically based on partner's state.
EU nations: Apply fiscal positions automatically for national or EU/Non EU partners.

closes odoo/odoo#48250

Task: 1952975
Closes: #32126
X-original-commit: 15e0026bdeaefd7a915718781bf3f6ee0389365e
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-24 11:39:39 +00:00
wan d8c5cc1335 [IMP] account: add a readonly group
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: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-01-22 11:23:16 +00:00
oco-odoo ef0488ef91 [IMP] account: support multiple tax reports per country
- Introduce a new account.tax.report object
	> Tax report lines now refer to a tax report, and the tax report to a country

- Tax report lines can share tags accross reports within the same country
	> To support the cases where some report is a simplified version of another one: some of its lines can be computed in the same way as the 'bigger' report.
	> This is done by giving the same tag_name to the tax report lines, and the same country_id to their parent report.
	> Full support for tag name modification, and the way it impacts the shared tags (sometimes, we can overwrite them all, sometimes we must delete them, sometimes, we create new tags to replace them on some report lines).

- Support copying tax report (and the lines/tags linked to it), so that it is possible to duplicate them and change the country set on the duplicate for use in another country (coopying is way better as replacing in place, as we don't keep any link to an xmlid, and still allow using the original report in the original country it was created for).

- Make all l10n* modules compatible with those changes

closes odoo/odoo#38964

Related: odoo/enterprise#6217
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-11-29 20:47:29 +00:00
fw-bot a745616404 [FW][IMP] l10n_ch: deconfuse BVR implementation
The BVR implementation was confusing as it
seemed to only take into account the case where the postal
account belonged to PostFinance itself and not to another
bank, where the same number is shared among multiple accounts.
Also, the purpose of the fields was confusing.

Adaptations done:
- When you add a bank account of type postal in the account number,
there is an onchange that automatically puts it in the postal account
field and makes itself unique by adding the name of the partner to
the account number. The account will still be detected as "postal".
- Improve help message of the postal account field on the bank account
as it is used for two different purposes (Client Number for own accounts
and postal number for "postal" vendor accounts)
- Only show the subscription fields when you have to do with a bank
account related to your own accounts / Switzerland
- Add fields in the Add Bank Account wizard if it is for Switzerland
(subscription number and the postal field we label "Client Number")
- Also label Client Number on the journal form for postal field
- Don't remove zeros in front of the client number on the BVR
- Don't put extra - in the subscription number on the BVR if it has
some - already
- Use number without spaces for payment reference

[FIX] l10n_ch: module moved to enterprise

closes odoo/odoo#39642

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-31 13:57:21 +00:00
wan 1576c91c9a [IMP] account_reports: add off sheets acount type
Task 1998268

closes odoo/odoo#35150

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-21 14:28:19 +00:00
Christophe Simonis 140ee6b8f0 [MERGE] forward port branch saas-12.4 up to 98a55917a6 2019-08-14 16:48:10 +02:00
Josse Colpaert f8d4bf4499 [IMP] account, l10n_xx: change CoA loading methods
Before, we only had a public method that installed
the CoA for the current active company.

With the multi-company changes, it was not
possible anymore to install a module with a
demo company and then have the CoA installed
in that demo company correctly.

We changed that public method to be able to
put an extra optional parameter and shortened
its name to try_loading instead of
try_loading_for_current_company.  The method that
it calls when there is no chart installed
is made private and renamed to _load.

closes odoo/odoo#35703

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-14 08:42:27 +00:00
Olivier Colson 333c22edd9 [FIX] l10n_*: fix taxes repartition so that 12.3 matches what is defined in 12.2
[IMP] l10n_*: don't define accounts or tags on tax repartition line templates anymore for 0% taxes

[FIX] account: remove old function used to migrate the former tax model, incompatible with the new one
2019-08-02 23:07:22 +00:00
Joseph Caburnay 536560bbf5 [IMP] l10n_*: add new receivable account for pos
A new feature[*] in point_of_sale (PoS) which minimizes the
creation of account.move records in closing a pos.session relies
on a receivable account made specifically for PoS.

This commit addresses this feature's requirement by adding a
new receivable account to each localization.

[*] point_of_sale: single AE for a pos.session

TASK-ID: 1862388
2019-08-09 13:57:10 +00:00
Olivier Colson 3936d655c4 [IMP] account, l10n_*: v13 taxes
- Add repartition lines on taxes

- Link account tags directly to account.move.line; remove the tag_ids field from account.tag

- Add a new report engine dedicated to tax reports, directly generating account tags. It is called as an alternate mode of generic tax report, with a dedicated "Use tax grids" toggle.

>> The biggest change lies in the way the new tax report computes its values.
Everything is now aggregated directly using the tags set on the account move lines. Thanks to that,
modifying the configuration of a tax today will not impact the report for the previous periods anymore.
This is a big improvement, as it means the report will keep on reflecting the values that were submitted
to the state before, whatever the configuration change.

- Add an audit char field to account.move.line telling with tax grids are impacted by the line, with the corresponding amount

- Modify the behavior of cash basis taxes: the cash basis account is now used as the transition account, while the regular account given in tax declaration is used to store the final entry (it was the opposite before)

- Modify every l10n_* module in order to keep them consistent with these changes

closes odoo/odoo#32833

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-05-10 11:52:58 +00:00
Hetashree Chauhan c4f2a9b8ab [IMP] l10n_ch: switch account.account.template creation in csv
data creation is faster when done through a CSV file than an XML file, hence doing it through a CSV

was task# 1909961

closes odoo/odoo#28888
2019-02-08 06:41:15 +00:00
Christophe Simonis ef6b574eda [MERGE] forward port branch saas-11.3 up to 6cc7d3f945 2018-08-21 18:48:13 +02:00
Christophe Simonis 70d0148d0d [MERGE] forward port branch 11.0 up to fbfb91799e 2018-08-21 16:58:17 +02:00
Christophe Simonis fbfb91799e [MERGE] forward port branch saas-15 up to 9cf0dbe226 2018-08-21 16:00:40 +02:00
Christophe Simonis e80f853ab3 [MERGE] forward port branch saas-14 up to aafa6e38c4 2018-08-21 12:06:23 +02:00
oleksandrpaziuk aab2fc0e33 [FIX] l10n_ch: Improvements of VAT report and implementation TVA return charge
Was PR #25190
2018-08-20 14:57:30 +02:00
Christophe Simonis 152d42041e [MERGE] forward port branch saas-14 up to e4663523b9 2018-06-20 18:48:06 +02:00
Nicolas Martinelli 8b9b56bd73 [FIX] l10n_ch: default tax
As of 01-01-2018, the default taxes should be 3.7 and 7.7 %.

opw-1854312
2018-06-19 15:27:24 +02:00
Christophe Simonis c5ed372970 [MERGE] forward port branch saas-15 up to 152d42041e 2018-06-21 10:57:42 +02:00
Laurent Smet 7a31a92afa [ADD] account, l10n_*: create transfer account based on prefix.
This commit changes the mechanism to get the transfer account.
As the bank/cash accounts, the transfer account is now created automatically based on
a prefix.

-task: https://www.odoo.com/web#id=35857&action=333&active_id=967&model=project.task&view_type=form&menu_id=4720
2018-05-23 15:43:39 +02:00
Christophe Simonis 5f2d080cf8 [MERGE] forward port branch 11.0 up to ad825b673b 2018-04-16 18:34:56 +02:00
Martin Trigaux ea747d23e4 [IMP] l10n_ch: translate CoA in de and de_CH
de_CH was not available before, people migrating will not get their CoA
translated.
Rename the translation file so it is loaded by any de_* language
Add multiple spoken_languages to be sure to load each one via the
process_translation mechanism.

Fixes #24037
2018-04-11 16:19:37 +02:00