Commit Graph
919 Commits
Author SHA1 Message Date
Yannick TivisseandVictor Feyens 18952cdc76 [IMP] *: Convert single create method into multi
Taskid: 2703085
Part-of: odoo/odoo#80824
Co-authored-by: Victor Feyens <vfe@odoo.com>
2021-12-14 19:13:18 +00:00
Paolo (pgi) f3e9e6f4b6 [FIX] l10n_ch: Fix QR bill according to specs
Reworked the structure of the HTML and the SCSS
to adhere to the official specs:

- 5mm padding inside the two main sections
- Correct font sizes
- Bold headers
- Increased the Swiss Cross inside the logo (7mm x 7mm)
- Scissors pictogram on the outline
- Dashed borders

Sizes now take the wkhtmltopdf (1/1.25 factor) shrinking
into consideration.

closes odoo/odoo#80544

X-original-commit: f02622684c6a220a425044d8d4a5fd474efdb519
Signed-off-by: William André (wan) <wan@odoo.com>
2021-12-02 10:18:56 +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
Nasreddin Boulif (bon) 0e50113f69 [FIX] base,l10n_ch,account_qr_code_sepa,payment,websitesale: Display all QR codes in QR bill
Issue:

  When trying to print a Suisse QR bill, if multiple images are presents
  in document and they have a url as src, some pictures will not be
  displayed.
  (Same issue may occur with simple QR code)

Cause:

  It's a known issue with wkhtmltopdf: https://github.com/odoo/odoo/commit/2949138a7d84cd6c925ea1745d62f25ef077bb8b
  Also, adding css class to body by js break wkhtmltopdf.

Solution:

  Replace link by base64 image value (use a function to retrieve base64
  image instead of image_url).
  Remove class 'l10n_ch_qr' added by js (no need since CSS file didacted
  to this report).

  Move `_get_qr_code_base64` and `_get_qr_code_url` logic/flow
  (since generic) to account module.
  Move specific logic like `_get_qr_vals` and
  `_get_qr_code_generation_params` to specific module (ex: l10n_ch).

  extra: Alter some css for better rendering + update unitest.

opw-2620082

closes odoo/odoo#77643

X-original-commit: 699b6eeac993e3a8d97ae7949170f7e18ca05831
Signed-off-by: Olivier Colson <oco@odoo.com>
2021-11-08 09:25:47 +00:00
John Laterre (jol) eac2440fe0 [ADD] l10n_din5008: isolate din 5008 from l10n_de
DIN 5008 is not specific to Germany.
It also applies to Switzerland, Austria (& Lichtenstein).

The goal is to make DIN independent from l10n_de,
for Switzerland and Austria.

closes odoo/odoo#76227

Task: 2613993
Related: odoo/upgrade#2932
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-28 08:33: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
Paolo (pgi) ad9aeccec2 [FIX] l10n_ch: TestOnchangePostal, TestSwissQR relied on demo data
The partner created in TestOnchangePostal and the product created in
TestSwissQR were taken from demo data, which might not be installed
in the test environment, so the create_invoice() method could
raise a traceback.

Part-of: odoo/odoo#77295
2021-10-01 12:40:53 +00:00
oco-odoo 1bdfdae121 [IMP] l10n_ch: fix typo in UserError
closes odoo/odoo#76975

X-original-commit: 704fc0fa9e0d8eecd2f15a7f36f1320a9ed2e717
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-09-22 15:08:59 +00:00
Habib (ayh) 3ceb6737be [FIX] l10n_ar, l10n_ch: multicurrency tests
since odoo/odoo@4402949 all currencies are inactive by default - activate currencies required for l10n tests

closes odoo/odoo#75278

Related: odoo/enterprise#20341
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-08-19 06:48:34 +00:00
Florent de Labarre a87c89d4ab [FIX] various: respect mail_post_autofollow previous values when adding it
Purpose of this commit is to avoid forcing mail_post_autofollow to True when
it is set to False. It eases inheritance and custom behavior.

Task-2612911
PR odoo/odoo#60792
2021-07-27 13:34:22 +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
wan 8dc9e64421 [FIX] l10n_ch: test with l10n_au
When l10n_au_aba is installed, the bank type recognized is `aba` and not
`bank`. The only thing we care here is that it is not `postal`.
2021-07-19 10:14:24 +00:00
wan 1010de2310 [FIX] l10n*: adapt test tags external + post_install
Add a static test to ensure all l10n tests are tagged in order to be
able to be run in runbot/mergebot.
2021-07-19 10:14:24 +00:00
Leonardo Pavan Rocha bc40795c56 [IMP] base: base layout designer improvements
This commit implements improvements in the layout designer, such as addition of a new custom background, adds custom report footer and company details.

task-2355704

closes odoo/odoo#66860

Related: odoo/upgrade#2275
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-06-25 10:33:31 +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
Djamel (otd) d54d6959ac [FIX] l10n_ch: fix the qr_iban fields to only appear for Swiss companies
Steps to reproduce the bug :
- Create a French company
- Go to accounting settings > in “Fiscal Localization” install French accounting
- Install “l10n_ch_qriban”
- Go to contacts > Configuration > Bank accounts
- Create a new bank account > add a French company newly created in the “Account Holder” field

Problem:
The specific fields to a Swiss company appear.

Solution :
Check if the country of the company encoded in the “Account Holder” field is Switzerland.

opw-2504699

closes odoo/odoo#70011

X-original-commit: 326dc3f7001f605d7ebb929740ed8478fce20e7e
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-04-29 09:15:07 +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 b27e3e12b9 [IMP] l10n_ch: remove related l10n_ch_postal field from bank journal, for usability
Adding this field to the bank journal's form view had been done to ease encoding; yet more fields were left to be set on the related res.partner.bank object (l10n_ch_qr_iban, chf and eur subrscription numbers. In the end, to be consistent, we would have needed to do related fields for all of them as well on the journal. This would have put too many advanced features in a single screen. Instead, we just consider the whole setup needs to be done directly on the res.partner.bank.

Task 2412391
2021-04-01 17:06:11 +00:00
oco-odoo d9c97e8cd1 [REM] l10n_ch_qr_iban: merge module into l10n_ch
This module had been introduced in stable to add a field to store the QR-IBAN in case it differed from the regular account number. We now merge it into the original module and make it so that the only way to define a QR-IBAN is to populate this field (no more magic with account number).
2021-04-01 17:06: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
oco-odoo 7922e5d102 [IMP] l10n_*: set newly-introduced country_id field on chart templates 2021-04-01 12:09:20 +00:00
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
Conversion of all modules to the new manifest assets declaration.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:18 +02: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
Yannick Vaucher c5ecf8b654 [FIX] l10n_ch: human readable ISR number set to False
The condition on computation of `l10n_ch_isr_number_spaced` was not in line anymore with
`l10n_ch_isr_number` computation.
With fixes on the ISR number the use of `l10n_ch_isr_postal` is rightly not
mandatory anymore.

This lead to an empty field, visible on the ISR report.

closes odoo/odoo#67058

X-original-commit: fdbfb332b528ba8b35d7529eecd610086465aff8
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-03-02 12:20:30 +00:00
wan de0c5f4b8c [FIX] l10n_ch: _is_qr_iban without bank
Part of task 2124952

Return False if the recordset is empty.
```python
self.acc_type == 'iban'
```
This already ensures there is at most one record.
We now have the same behavior as for `_is_isr_issuer` (False if empty
recordset)

Was needed after cb8b6db391 because it is
now calling _is_qr_iban on a possible empty recordset.

Revert 1b2aef65f4
2021-02-17 08:39:29 +00:00
nie 9e6c60140e [FIX] l10n_ch: use commercial partner name instead of computed field
Follow-up of https://github.com/odoo/odoo/pull/65357

closes odoo/odoo#65523

X-original-commit: 38e78a59ace4fb590cc5c138e16acb1013fa193e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-02-04 10:36:03 +00:00
nie ebd85820b8 [FIX] l10n_ch: use commercial company name in invoice PDF
Steps:
- Edit the current company (1):
  - Country: Switzerland
  - Currency: CHF
- Install l10n_ch
- Go to Invoicing > Configuration > Bank Accounts
- Edit Bank:
  - Bank Account: create a new one:
    - Account Holder: (1)
- Go to Configuration > Journal
- Edit Customer Invoices:
  - Advanced Settings tab:
    - Communication Standards: Switzerland
- Go to Customers > Customers
- Create a new customer (2):
  - Fill in street, city, zip code and country
- Edit (2):
  - Contacts & Addresses tab:
    - Add:
      - Select Invoice Address
      - Contact Name: Keep this field blank
- Go to Customers > Invoices
- Create a new one:
  - Customer: "(2), Invoice Address"
  - Add a product
- Validate it
- Click Print QR-Bill

Bug:
Traceback here:
https://github.com/odoo/odoo/blob/b76e9ef658bde0178fa1660b6ad27b880e91632a/addons/l10n_ch/models/res_bank.py#L129
TypeError: 'bool' object is not subscriptable

Explanation:
The contact name of an address is optional. When nothing is filled in
that field, it returns `False`, hence the error.
Using the commercial company name ensures a name is put in the invoice,
even if the contact doesn't belong to a company.

opw:2447158

closes odoo/odoo#65417

X-original-commit: 2537bb01675279f08edf65077e6d41a5bd968ec4
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-02-02 13:56:41 +00:00
Goffin Simon 419337782f [FIX] l10n_ch: Traceback when installing module
Function _is_l10n_ch_postal expects a singleton

closes odoo/odoo#64785

X-original-commit: 90c286e168b62876214119d69257d0aa5c120bc2
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-01-20 10:37:45 +00:00
wan 8aa68445a6 [IMP] l10n_*: remove icon.png and use country_fla from base
* We are gaining ~1.2MB by doing this.
* The flags are unified with the same looks.
* Some flags were missing.
2021-01-15 15:56:47 +00:00
Goffin Simon 1b2aef65f4 [FIX] l10n_ch, l10n_ch_qriban: Impossible to create a vendor bill
Fine tuning of this commit: https://github.com/odoo/odoo/commit/6e374e25943106be84711233f3960f2f3a4b9aa9

To fix the issue when l10n_ch_qriban is not installed

opw:2416809

closes odoo/odoo#63478

X-original-commit: b226f07628618aac6ada0ffce736e29cb1cdc550
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-12-16 17:39:33 +00:00
Yannick Vaucher cb8b6db391 [FIX] l10n_ch: check reference format with supplier QR-IBAN
closes odoo/odoo#63396

X-original-commit: 0d80dbf8a530209679a65a5c62808be1589c5cef
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-12-15 13:34:19 +00:00
Christophe Monniez 36cfe7cf75 [FIX] l10n_ch: use public domain ocrb otf file
X-original-commit: f882f20d8661549835b51244ae700446c27e172a
2020-12-14 09:06:45 +00:00
Raphael Collet c3c465551c [FIX] test_lint: check for duplicate entries in POT files
X-original-commit: 4e29fbada592e887459dabee71708c6d0dd01715
2020-12-08 12:21:33 +00:00
Raphael Collet 1398b6b44c [IMP] tests: deprecate SavepointCase
closes odoo/odoo#62031

Related: odoo/enterprise#14872
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-11-24 13:23:32 +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
Christophe Monniez abf3a8afd2 [FIX] l10n_ch: use an absolute path for ch flag
When printing an invoice with an iban qrcode using l10n_ch module, a
little ch flag appears in the center of the qr code.

When odoo is started from elsewhere than the root of the odoo code, the
flag does not appear. The cause is that a relative path is used to find
the flag image.

With this commit, an absolute path is computed to find the flag.

closes odoo/odoo#61048

X-original-commit: d33785032b1ca2c6e1d4ade7e174d024fae9a151
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-10-30 13:20:49 +00:00
Victor Feyens 1b67affe7d [FIX] *: avoid direct references to countries
Ensure the code works fine even if countries are deleted.

Also consider "re"-created countries after deletion, by only considering
the country code, not the data reference.

This should reduce support requests related to deleted countries, and
ease the resolution of such problems by the users themselves.

TASK ID - 2368842

closes odoo/odoo#60558

X-original-commit: 037012bc4e2935eb00a7f353529bb7ec55066733
Related: odoo/enterprise#14347
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-10-22 16:17:26 +00:00
jbw c515b6f066 [FIX] l10n_ch : Remove Print QR-bill from Credit Notes
There is no plausible case where "print QR-invoice" button is needed
on Credit Note form view.

closes odoo/odoo#60311

Task: 2351817
X-original-commit: c4ac11aa9bdcb690d9dffbd1759d68ba4398dbb5
Signed-off-by: jbw-odoo <jbw-odoo@users.noreply.github.com>
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-10-20 07:12:32 +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
Yannick Vaucher 2af6b7dcf6 [REF] l10n_ch ISR number computation
Add hooks to be able to tweak the Bank customer ID number for ISR-B

Those hooks will allow to not use of the field l10n_ch_postal for
multiple purposes.

Fixes conditions on which the reference is generated.
It shouldn't be always generated if l10n_ch_postal is set.
Only if a l10n_ch_subscription_xxx is set.

closes odoo/odoo#58398

X-original-commit: 4790b8e57aa357cda32818392d795b8c0dc48f43
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-09-24 09:56:14 +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
Yannick Vaucher b5b83b60a7 [DOC] l10n_ch: describe structure of ISR ref
The reference with 27 chars and the optical line
are not meant to be human readable. This document
the structure of the ISR Reference. [1]

[1] https://www.raiffeisen.ch/rch/fr/clients-entreprises/trafic-paiements-et-liquidites/debiteurs/bulletin-de-versement-orange.html

closes odoo/odoo#57889

X-original-commit: d5be7ff9331b060c9ff84361b1a422056817f548
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-09-16 16:18:09 +00:00
Ravi Gohil 5cd83b448a [IMP] l10n_ch: refactor a method to make it overridable
We refactored a method to check if the IBAN is in the correct
range to be a QR-IBAN or not.  (to be able to reuse it)

Thanks to Ravi Gohil

Task: 2307262
X-original-commit: efd6e493a6d855c12e43e9b3cb7c436c6d7de35a
2020-09-15 08:46:16 +00:00
Victor Feyens 594ccdcbf4 [FIX] *: typos and english incoherences
Mainly transifex issues but also some errors found through 'grep' checks.

Fix typos and obscure english strings in xml contents, fields strings/helps, some docstrings, ...
ensuring correct translations base (and fallback when translations isn't available).

closes odoo/odoo#57276

X-original-commit: 4214f05d454bca2b60fda3a288d529c098e84f77
Related: odoo/enterprise#13053
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-09-08 18:12:26 +00:00
oco-odoo 94426e0ee2 [FIX] l10n_ch: fix bad forward port of https://github.com/odoo/odoo/pull/56199
type has be renamed to move_type on account.move.

closes odoo/odoo#56726

X-original-commit: 0706f5a392840c0d4a0f8acd197211121ccbcf07
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-28 11:45:24 +00:00
Andrea Grazioso (agr-odoo) 30f589f748 [FIX] l10n_ch: Print QR-bill button should be only on customer invoices
opw-2320456

closes odoo/odoo#56679

X-original-commit: 66f8ebd9b2c34994b76475f55e6e28917d42ec53
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-08-27 15:06:54 +00:00
oco-odoo b82723fb22 [FIX] l10n_ch: fix bad forward-port
closes odoo/odoo#56641

X-original-commit: 7c26020d874f09b632081563c27f075e19b8fd51
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-27 10:22:59 +00:00