Commit Graph
243 Commits
Author SHA1 Message Date
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
Juan Jose Scarafia d200931080 [FIX] l10n_ar: currency rate digits
AFIP currency rates goes up to 6 digits.
When invoicing exportation of services, AFIP requires to invoice on the exactly same rate. Without this change it was not possible for some currencies with 6 digits as CHF one.

The change takes effect without needing of updating module

closes odoo/odoo#63156

X-original-commit: 150493ca3fff8b44cf890205990dbd72cebdcb36
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-12-10 12:22:40 +00:00
Bruno Zanotti (ADHOC) 6f65923696 [IMP] l10n_ar: Add missing AFIP documents types
closes odoo/odoo#62396

X-original-commit: 8fdf193caf4dae0147543c1fcce7330aad81dff2
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-11-26 12:16:24 +00:00
Nasreddin (bon) 17bee9e723 [FIX] account, l10n_ar, l10n_cl: web_studio broken due to dynamic view call
Issue

	- Install "Accounting" & "Studio" modules
	- Go to "Accounting" and switch studio editor
	- Go to "Reports" tab and select "Invoices" report
	- Click on any block to edit.

	Not possible to edit document.

Cause

	Studio cannot parse dynamic `t-call` and therefore not able
	to render the corrects hooks to edit the report.
	The issue has been introduced by this commit: https://github.com/odoo/odoo/commit/5c5710ae8ea045569fd94504f9d8dd5209f7b662

Solution

	In the corresponding localization report template,
	add an 'Inheritance Specs' (position="after") that will add a condition
	where it will retrieve the rigth report name
	in case localization enabled.

opw-2362257

closes odoo/odoo#60660

X-original-commit: ee1580a85c9942e9a98748fa568f9f664c67a320
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-10-23 17:20:09 +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
Bruno Zanotti (ADHOC) 597f379284 [I18N] l10n_ar: add missing translations
closes odoo/odoo#60526

X-original-commit: a4871a7dbbc96399696dc9cd8424a4bcb7814262
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-22 11:52:09 +00:00
Nicolás Mac Rouillon f3014587e7 [FIX] l10n_ar: Previous verify for the partner property fpos then use auto_apply.
The problem here is before this changes, the fiscal position only take into account if them has "auto_apply" True, and for the cases that the partner has their property fiscal position configurate for a company this is not taking into account.

After this changes we evaluate for the property fiscal position for the partner and then if non result we seek a fiscal position with the auto apply and the responsability of afip.
So this the same as the original method do.

closes odoo/odoo#59875

X-original-commit: 5ddcad3cb1d6063b7be89e4f0bd35b89885f746b
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-10-13 14:19:24 +00:00
fw-bot 1c77b833d6 Cherry pick of 2b65a7c111232d31d5113565bb6a114486f0123c failed
stdout:

stderr:

closes odoo/odoo#58605

Error: could not apply 2b65a7c1112... [IMP] l10n_ar: Accounting Tour adaptation
Hint: after resolving the conflicts, mark the corrected paths
Hint: with 'git add <paths>' or 'git rm <paths>'
Hint: and commit the result with 'git commit'
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-09-29 13:46:59 +00:00
wan fba4e1036b [FIX] l10n_ar: invoicing tour
The invoicing tour suggests to change the invoice number manualy but it
is not doable with l10n_ar because of the document number mechanism.

The partner needs the AFIP responsability to be set in order to generate
the number.

closes odoo/odoo#58721

X-original-commit: 25889e469c063c307fee9c15b48fe4316207aeb3
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-09-28 16:44:46 +00:00
Bruno Zanotti (ADHOC) 9de59048a1 [FIX] l10n_ar: get_fiscal_position inheritance
The method get_fiscal_position was missing the @api.model decorator

closes odoo/odoo#58665

X-original-commit: 7cad8db251b62972b3a0ea8ca970014cd0f1b5c1
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-09-28 11:59:48 +00:00
Nicolas Martinelli 39d32d8dd2 [FIX] l10n_ar: field renamed
The field `invoice_partner_bank_id` was renamed `partner_bank_id`

closes odoo/odoo#58295

X-original-commit: c58684c07658ef7170f9696cc2fbb033ec46ba96
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-09-23 08:47:00 +00:00
Bruno Zanotti (ADHOC) 644234f7a5 [FIX] l10n_ar: number validation of no official document types
If a document type don't have AFIP code, like "FACTURAS Y COMPROBANTES
DEL EXTERIOR" or "NOTAS DE CREDITO Y REEMBOLSOS DEL EXTERIOR",
we don't have to validate the document number

closes odoo/odoo#58043

X-original-commit: 33cf9fdc0bf90a7246f3f67ada274e7a5519ee6b
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-09-18 14:20:24 +00:00
Bruno Zanotti (ADHOC) 9bfd1752cd [IMP] l10n_ar: "Argentinian" to "Argentinean"
Change all references of "Argentinian" with "Argentinean".

closes odoo/odoo#57670

Related: odoo/enterprise#13210
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-09-14 14:53:22 +00:00
oco-odoo c07685e362 [IMP] l10n_ar, l10n_cl, l10n_latam_invoice_document: replace l10n_latam_country_code field by newly-introduced country_id
This new field was introduced in master by https://github.com/odoo/odoo/commit/013936261b26c601ce55015dbbbb99a7313a9a39 , making l10n_latam_country_code redundant.

closes odoo/odoo#56181

Related: odoo/upgrade#1666
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-20 08:00:30 +00:00
Juan Jose Scarafia 29b44207c9 [FIX] l10n_ar: invoice pdf on cia without website
closes odoo/odoo#55892

closes odoo/odoo#55893

X-original-commit: 2e5eb5b5a69f0eebcdca5405d2924472a55cbb21
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-18 08:10:04 +00:00
Katherine Zaoral b1fb1e351a [FIX] l10n_ar: partner name in invoice report
Show partner commercial name and contact name in the inovice report
instead of just the partner contact name. For the example of

   Adhoc (Commercial Partner)
    - Katherine Zaoral (contact)

The invoice report was showing: Katherine Zaoral (partner name).
Now will show: Adhoc (the commercial partner name)

closes odoo/odoo#55202

closes odoo/odoo#54193

Related: odoo/enterprise#11717
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-17 14:09:18 +00:00
Katherine Zaoral 1d9196f776 [IMP] l10n_ar: invoice report header better fit
Change padding right in the header of the report to ensure that the data
to show take advantage of the most space possible without overlapping
the header data with the report content.

closes odoo/odoo#55212

Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-17 14:09:18 +00:00
Katherine Zaoral 1931a22835 [IMP] l10n_ar: Argentinean invoice report
Port foward from 13.0 branch. Also update the _get_name_invoice_report()
method to match the one in account module.

Also update the name of payment field that has been change in master version

* o.invoice_payment_ref is now o.payment_reference
2020-08-17 14:09:18 +00:00
Katherine Zaoral e1c4ed3ee8 [IMP] l10n_ar: rename module
To make the match with the new name standard for localization modules

closes odoo/odoo#55704

Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-14 15:15:25 +00:00
Katherine Zaoral 8793d40211 [FIX] l10n_ar: be able to install demo data
For some reason odoo is not copying the expense_currency_exchange_account_id
and income_currency_exchange_account_id from the partner chart template.

In order to avoid errors in the demo we explicitly define this accounts in
the exempt and responsable inscripto chart templates.

closes odoo/odoo#55831

Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-12 21:30:48 +00:00
Bruno Zanotti (ADHOC) a89b68e7b5 [IMP] l10n_ar: update document type names
Update the document type list names to match with the AFIP documentation

closes odoo/odoo#55863

X-original-commit: 06ca34549c33edadc871be15c7443bfc2ab9cd5b
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-13 10:20:48 +00:00
fw-bot 600a1da6c3 [ADD] l10n_ar: add moved methods from l10n_ar_edi
This method will be change to generic and to be use for both
l10n_ar_edi and l10n_ar_reports modules

fw-port of 50882

closes odoo/odoo#55687

Related: odoo/enterprise#12329
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-10 13:48:57 +00:00
Katherine Zaoral d167dc201b [FIX] l10n_ar: depreacated post to action_post
Change references of deprecated method in demo data to avoid WARNING message in
odoo log::

    ... WARNING ar py.warnings: ... DeprecationWarning: RedirectWarning
    method 'post()' is a deprecated alias to 'action_post()' or _post()
    DeprecationWarning

closes odoo/odoo#55647

Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-07 21:00:36 +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
william 82dc0cb7b9 [IMP] account: soft post entries in the future
Add an easy way to not post the entries in the future when calling
post() on it, but rather set it to be auto-posted at accounting date.
This is useful when we are creating a lot of entries in batch and some
might be in the future, some in the past, and we don't want to separate
that in two batch every time. (asset, accrual, transfer,... )
2020-08-05 11:57:10 +00:00
Katherine Zaoral c8b2434d61 [FIX] l10n_ar: properly compute l10n_ar_vat field
Only compute l10n_ar_vat when this one is defined, if not then the field
should not be computed.

closes odoo/odoo#55246

X-original-commit: 4e2de8c858c2d55b227b8a2fd3f8226f9da91a9d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-31 09:10:06 +00:00
Benjamin Frantzen (bfr) 6827951451 [FIX] l10_ar: fix constrains
- type has been renamed to move_type
- l10n_latam_use_documents is not writeable

X-original-commit: 048248d4c7b0ebd04652cc82652b2e11bfd1780b
2020-07-22 06:37:26 +00:00
Martin Trigaux 400cc4f14e [FIX] *: correct all or improve code translation lookup
This commit fixes all issues detected by the new pylint
gettext-variable test.
It converts some calls to the new syntax
  _("Foo %s", bar)

to progressively migrate the code to the new syntax.

A few calls were not technically incorrect but still detected by the
linter.

  _("Foo" +
    "Bar")

has been converted to

  _("Foo"
    "Bar")

as it has the same effect and make sure the argument is of type
asteroid.Const instead of BinOp).

closes odoo/odoo#53683

Related: odoo/enterprise#11467
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-06-30 10:19:59 +00:00
Martin Trigaux 4a92a183e8 [IMP] *: better construction of translatable content
Do not construct a message by putting together translatable bits, it
makes it hard to translate (out of context) and may not work for some
languages constructing the sentences differently.
Do not try to save bits, be explict.

Clarify constructions for long oneliners.
2020-06-18 13:03:34 +02: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
Katherine Zaoral b7421e5860 [FIX] l10n_ar: support multiple records inside constraint method
Before this change the constraint that check afip configurations has an ensure_one() that was throwing an error when we try to change journals in batch. Now the constraint support mutilple records at once and return the ValidationError message show information of the journal's which constraint aplies.

Also, we remove the print of the list of the invoices in the ValidationError message because this ones could be a really long list and it is not necessary, only knowing the journal is enough.

closes odoo/odoo#52914

X-original-commit: 710bb9f161da4718024c4454ce14a7dbc2d24c93
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-06-12 10:43:58 +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
Katherine Zaoral d1c38bbf0f [FIX] l10n_ar: Show proper message when trying to use a use_document journal when is not expected
We found an error by trying to post journals entries from an expense with a use_document journals.
Add new constraint that only let the user to create invoices in use documents journals, it can not create account.move of type entry

closes odoo/odoo#52690

X-original-commit: 82bbf3784e3bdf684eef25c53bf3235ebc2b7237
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-06-09 11:12:54 +00:00
Katherine Zaoral fc83be07b9 [FIX] l10n_ar: fix the purchase vat taxes accounts
The accounts of these taxes were inverted for the invoices and refunds.
now are properly configured.

closes odoo/odoo#52121

X-original-commit: 0a8303b8cfbaa087ab89dcb56afbfe15d50bd1a2
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-05-28 15:25:03 +00:00
Katherine Zaoral 308b1d9b09 [FIX] l10n_ar: fix misspelling error in translations
closes odoo/odoo#52346

X-original-commit: fe6330ade22efec61b18792b3a930afd7c473328
Related: odoo/enterprise#10911
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-06-08 08:48:49 +00:00
Katherine Zaoral caeb40e39d [IMP] l10n_ar: l10n_ar_vat is a clean CUIT number
Save in l10n_ar_vat field the cleaun up CUIT number (without spacings,
dashes and points.

This way we can use it so sent it properly as a number to AFIP.

closes odoo/odoo#52380

X-original-commit: d02141511c6e86c2e6acac6ed8ed44b0c874f63e
Related: odoo/enterprise#10925
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-06-03 16:31:10 +00:00
Katherine Zaoral df92415f21 [FIX] l10n_ar: misspelling error in document type code prefix "FACTURA
DE CREDITO ELECTRONICA" A and B.

closes odoo/odoo#50508

X-original-commit: ce45b1cf463e0874f65dce0ba78c7fac0127d639
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-05-20 07:00:26 +00:00
Katherine Zaoral 9b27b4d923 [ADD] l10n_ar: set company's partner identification type to CUIT once
that the argentinian chart of account has been installed

closes odoo/odoo#50880

X-original-commit: 3c55cae48936e195ec3411c55f577422c56828c3
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-05-07 16:01:13 +00:00
Katherine Zaoral d2d1720525 [FIX] l10n_ar: invoice report identification name
Show the identification type name instead of always show VAT in the customer information on the invoice report

closes odoo/odoo#48801

X-original-commit: 5a7ff2c932ae9abe4207291cc20e52a401a560a2
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-04-01 20:56:15 +00:00
Katherine Zaoral c765bce768 [IMP] l10n_ar: adapt code to remove sequences
* remove logic of sequences in invoices and use new logic to make it work
* add logic do to not let the user to change the pos number in the document number
* update translations
2020-04-01 16:49:04 +00:00
wan af2272ac56 [FIX] account: invoice analysis multicurrency + various imp
Task 2206699

* All the amounts are now expressed in the company currency
  - The amounts are taken from debit/credit on the aml
  - When opening the report for multiple companies, convert in the
    current company's currency
* New default view:
  - Group by month instead of category
  - Line chart instead of bar chart
  - Filter on customers
* Remove useless fields:
  - name
  - invoice_partner_bank_id
  - invoice_payment_term_id
  - residual (including taxes)
  - amount_total (including taxes)
  - nbr_lines as it is a generic feature
* Rename currency_id to the more correct company_currency_id
* Remove useless group_by clause from the SQL query

closes odoo/odoo#47066

Related: odoo/upgrade#1021
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-04-01 14:13:16 +00:00
Pratima Gupta 2c93b994f2 [IMP] l10n_xx: use country_code field
l10n_latam_country_code field is no more needed for account.move
object thanks to commit 7edb5c11

Also, since country_code field has been defined in view_move_form,
no need to redefine it when it is inherited in l10n_cn module.

closes odoo/odoo#48719

Task: 2228210
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-04-01 14:23:20 +00:00
Katherine Zaoral efcdc274ff [FIX] l10n_ar: Dedicated Credit Note Sequence field was appering in
journals that were not of type sales and journals.

We update the hence of the view to take into account the original
invisible domain plus the domain we need for journals that use documents

closes odoo/odoo#48526

X-original-commit: 085fd43fd0b8a13dd713fbb4e34126ebe63ea504
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-27 15:27:31 +00:00
Ravi Gohil b4f0e758eb [IMP] l10n_xx: hide country specific fields from company/settings view
There are few fields added on settings and on company form view
by various l10n modules which are meant for particular country's
user and are of no use to others. Such fields should be hidden
from unrelated users. With this commit, it will be the case.

closes odoo/odoo#35755

Task: 2049977
Closes: #35755
Related: odoo/enterprise#5158
Related: odoo/enterprise#5158
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-24 06:59:35 +00:00
Katherine Zaoral 191530059f [IMP] l10n_ar: be able to generate refunds for OTROS COMPROBANTES document type
This document does not have any credit/debit note related documents, so
when a credit/debit not is required then the same document type is used.
This only applies in vendor bills so we are able to create the credit
note with this type of document

closes odoo/odoo#48117

X-original-commit: 7748e0e87fd3f4677a4026ed06516d36e8d52ad5
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-20 13:53:39 +00:00
Xavier-Do b2b36524c2 [IMP] core: improve module loading logs
Performances from a general point of view can be difficult to track.
This commit proposes to improve logs in two ways:

The current logs only use the sql_counter, wich will only be updated
when a cursor is closed. In a test-enable install, this counter
is actually the queries of the tests wince the install cursor is
open untill the end. The first fix is to use bot sql_counter and
sql_log_count to have total queries untill now on closed cursor,
but also the current number of queries of the current cursor.

This means that the new log format will be
{nb} modules loaded in {time}, {loading_querie} (+{test_cr_queries}) queries
instead of
{nb} modules loaded in {time}, {tests_cr__queries}queries

Nothe that in the current version, {nb} is actually the total number of
loaded modules until now.

This commit also add an equivalent end log by module and change the
loglevel of module start on install (mainly usefull if an error occurs
before anything else is logged hidding the module causing this error.)

A cleaner runbot logger is also added, in order to be abble to call
_logger.runbot( instead of _logger.log(25. This will clarify the purpose
of such a log level.

closes odoo/odoo#47283

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-03-16 13:21:57 +00:00
Katherine Zaoral 23e7d0f46c [ADD] l10n_ar: make Sales "IVA No Corresponde" tax inactive
This tax is only used on purchases to monotributistas or exentos but
it's not used on sales.

We deactivate to avoid confusions and will be removed in next version.

closes odoo/odoo#47554

X-original-commit: aaa066d43e6c697cb91714fdc65ee7a18e5a53e5
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-13 07:56:43 +00:00
Ravi Gohil e34735f709 [FIX] l10n_ar: fix invalid demo invoice number
closes odoo/odoo#47223

Task: 2210808
X-original-commit: 85116b9e899caff0bf0692097656740909e45b74
Related: odoo/enterprise#9122
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-09 15:50:39 +00:00
Yannick Tivisse 4c291e3f70 [IMP] base: Display searchpanel on ir.module.module views
Purpose
=======

The current kanban view is messy. It is difficult to identify which
apps are installed or not. The user can completely miss a module
that might have interested him. A search panel would make things way
more readable.

closes odoo/odoo#44401

Taskid: 2181557
Related: odoo/enterprise#8144
Related: odoo/upgrade#879
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-05 14:03:45 +00:00
Ankita Raval d675dbaa4c [IMP] account,* : Change type field to move_type in account.move
task-id: 2028z813
2020-02-19 09:09:20 +00:00