summaryrefslogtreecommitdiff
path: root/addons/l10n_ar/models
AgeCommit message (Collapse)Author
2021-04-08[FIX] l10n_ar: partner with not handled responsibility typeBruno Zanotti (ADHOC)
If a partner has a not handled responsibility type return an empty list as possibles document types instead of raising an error. closes odoo/odoo#69007 X-original-commit: abcba544043b08de4cffcf5affd12b08afec188f Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-04-08[FIX] l10n_ar: Responsibility type "IVA No Alcanzado"Bruno Zanotti (ADHOC)
- Add a new responsibility type "IVA No Alcanzado" - Update the partner "AFIP" with that responsibility X-original-commit: e3e20fdccc2ad7bf0015d4c0a67c7ab803a97bd8
2021-03-21[FIX] l10n_ar: wrong fw-port as l10n_latam_country_code does not exist anymoreJosse Colpaert
closes odoo/odoo#68179 Signed-off-by: William André (wan) <wan@odoo.com>
2021-03-17[IMP] l10n_latam_invoice_document: Remove l10n_ar constraint on base latam ↵fw-bot
module Documents with `l10n_latam_document_type_id.code == '99'` just exists on **l10n_ar** https://github.com/odoo/odoo/blob/13.0/addons/l10n_ar/data/l10n_latam.document.type.csv#L74 making this error arise on other localizations which don't use it. This was mistakenly introduced on 7748e0e This method is inherited inside l10n_ar and we add this additional validation. Original PR: https://github.com/odoo/odoo/pull/64831 closes odoo/odoo#66957 Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-02-25[FIX] l10n_ar: error when opening products on e-commerceJorge Pinna Puissant
- install e-commerce and l10n_ar; - as a Public user open a product on the shop. Before this commit, an 403 error was raised. Now, the public user can navigate through the products. opw-2462477 closes odoo/odoo#66795 Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2021-02-23[ADD] l10n_ar: generic changes to use in QR codeKatherine Zaoral
AFIP give us new resolution 4291 that request to print QR code in printed version of electronic invoices. For that we: 1) update the xml report footer style 2) add generic method to sanitze the identification number we are sending, the sanitize method is added here in order to be re used for other functionalities across electronic invoice and reports. If we are not able to sanitize the number then we show an error to the user 3) update translations to add new raise message translated term closes odoo/odoo#65033 Related: odoo/enterprise#15948 Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-12-10[FIX] l10n_ar: currency rate digitsJuan Jose Scarafia
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#63144 X-original-commit: 150493ca3fff8b44cf890205990dbd72cebdcb36 Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-10-22[FIX] *: avoid direct references to countriesVictor Feyens
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#57837 Related: odoo/enterprise#13275 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-10-13[I18N] l10n_ar: add missing translationsBruno Zanotti (ADHOC)
closes odoo/odoo#59030 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-13[FIX] l10n_ar: Previous verify for the partner property fpos then use ↵Nicolás Mac Rouillon
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#59864 X-original-commit: 5ddcad3cb1d6063b7be89e4f0bd35b89885f746b Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-09-28[FIX] l10n_ar: get_fiscal_position inheritanceBruno Zanotti (ADHOC)
The method get_fiscal_position was missing the @api.model decorator closes odoo/odoo#58648 X-original-commit: 7cad8db251b62972b3a0ea8ca970014cd0f1b5c1 Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-09-22[IMP] l10n_ar: Accounting Tour adaptationBruno Zanotti (ADHOC)
In order to have an accounting tour in l10n_ar we have made the following changes: * Install by default the RI account chart in YourCompany * Remove the UserError message when the user tries to change the account chart in a company with a different AFIP responsibility. * Create a new preprinted sales journal by default called "Ventas Preimpreso". * When the user creates the first invoice of manual journals, take the "pos number" and update the journal configuration. * Improve the journal configuration constraint in order to protect sales/purchase journals from being modified if they already have posted invoices.
2020-09-18[FIX] l10n_ar: number validation of no official document typesBruno Zanotti (ADHOC)
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#58041 X-original-commit: 33cf9fdc0bf90a7246f3f67ada274e7a5519ee6b Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-17[IMP] l10n_ar: Argentinean invoice reportKatherine Zaoral
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-10[ADD] l10n_ar: add moved methods from l10n_ar_edifw-bot
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-05[IMP] account: soft post entries in the futurewilliam
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-07-31[FIX] l10n_ar: properly compute l10n_ar_vat fieldKatherine Zaoral
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-22[FIX] l10_ar: fix constrainsBenjamin Frantzen (bfr)
- type has been renamed to move_type - l10n_latam_use_documents is not writeable X-original-commit: 048248d4c7b0ebd04652cc82652b2e11bfd1780b
2020-06-30[FIX] *: correct all or improve code translation lookupMartin Trigaux
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-18[IMP] *: better construction of translatable contentMartin Trigaux
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[IMP] *: replace to new _() syntaxMartin Trigaux
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-12[FIX] l10n_ar: support multiple records inside constraint methodKatherine Zaoral
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-09[FIX] l10n_ar: Show proper message when trying to use a use_document journal ↵Katherine Zaoral
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-03[IMP] l10n_ar: l10n_ar_vat is a clean CUIT numberKatherine Zaoral
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-05-07[ADD] l10n_ar: set company's partner identification type to CUIT onceKatherine Zaoral
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-04-01[IMP] l10n_ar: adapt code to remove sequencesKatherine Zaoral
* 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-03-24[IMP] l10n_xx: hide country specific fields from company/settings viewRavi Gohil
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-20[IMP] l10n_ar: be able to generate refunds for OTROS COMPROBANTES document typeKatherine Zaoral
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-16[IMP] core: improve module loading logsXavier-Do
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-02-19[IMP] account,* : Change type field to move_type in account.moveAnkita Raval
task-id: 2028z813
2020-02-05[IMP] account: rework name sequenceswan
Task 2146469 Rework the name computation: * It doesn't use ir.sequence anymore * It is an editable computed field * Add a renaming tool This allows the user to tweak the sequences more easily than having to get through the ir.sequence settings. The sequence depends on a parameter of the journal: continuous, montly and yearly restart of the sequence. Everytime a new period is started, try to make a pattern form another period. The incrementing is done by taking the previous name, ordered lexicographically, splitting it by taking the digits at the end, adding 1 and re contstruct with the prefix. ** This means there could be cases where the prefix has a big importance on the next number. For instance, if you have INVOICE/2019/0001 INVOICE/2019/0002 and then rename the last one to INV/2019/0002, don't expect the next number to be INV/2019/0003. It will be INVOICE/2019/0002 (again) because the highest number was INVOICE/2019/0001. You will then end up with INVOICE/2019/0001 INV/2019/0002 INVOICE/2019/0002 closes odoo/odoo#41485 Related: odoo/enterprise#7189 Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-01-31[IMP] l10n_ar: extend constraint on pos number to ensure max 5 digitsKatherine Zaoral
Before this change we were letting the user to create a journal with a AFIP POS Number they like, and where they try to post an invoice in that jounrals they receive an error message telling that the document has not valid POS Number. In order to avoid this we add as part of the constraint where we check the validity of the AFIP POS Number which is: should be greater that 0, and should be 5 digits max. closes odoo/odoo#44433 X-original-commit: 3e991fb4ceb02eeb41ed6579ac409f9595663c41 Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-31[ADD] l10n_ar: use 5 digits pos number instead of 4Katherine Zaoral
The law itself said that you can use 4 or 5 digits, but some customers complains that they want 5 (for eg. 00001) because some suppliers reject the invoice if only 4 digits (that is wrong, but suppliers do anything to avoid paying). We've check and AFIP online invoices use 5 digits always. So, to satisfy customers/suppliers and make code simpler, we think using 5 digits is a better option. X-original-commit: a475de89568c8274bb556d672948b25a95996599
2020-01-24[FIX] l10n_ar: Proper filtered document types for foreign partnersKatherine Zaoral
When create an invoice for a foreign customer, the document types are not showed and filtered. This is happening because there is not journal defined for exportation operations. Once this one is created all the proper filters for the document types and journals are working ok. This PR add a redirect warning when trying to create an invoice for a foreign partner when we do not have defined the expo sale journal. This also alert the user that is a missing configuration that is affecting to the compute of the available document types. I applied the same for the local/intern case closes odoo/odoo#43913 X-original-commit: c7bd13bbd2879dded677bb223ff857fb9c959c60 Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-23[FIX] l10n_ar: Do not set default purchase tax in Monotributista and Exempt ↵Katherine Zaoral
companies. This kind of companies (because of the AFIP responsibility type) should not have purchase tax defined by default and before this commit we have a default purchase tax named perception with actually is a optional tax that the user could set if needed but should not be set automatically set as default in all the invoice lines. This commit remove this default purchase tax when loading the chart of account to avoid this bad behavior. closes odoo/odoo#43832 X-original-commit: b6df9291555ac79b6f1d64cb27235d8191d710b8 Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-12-16[ADD] l10n_ar: update translation, add missing termsKatherine Zaoral
closes odoo/odoo#42174 X-original-commit: 76991683473bf152e56a0944197fb04edbd73356 Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-12-18[REF] l10n_ar, l10n_latam_invoice_document: replace staticmethods with ↵Katherine Zaoral
api.model methods closes odoo/odoo#42177 X-original-commit: 4854bef072807828f66ada7d2996f70ad01ec506 Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-12-13[FIX] l10n_ar: Allow Responsable Inscripto to receive letter B.Katherine Zaoral
It's only for some use cases like paying a hotel or buying food closes odoo/odoo#41888 X-original-commit: d076973fa48af000ead55019448de5261e2a766e Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-12-02[FIX] l10n_ar_account: proper compare document numbers in vendor billsKatherine Zaoral
When creating vendor bills, it was considering this two numbers as different but actually are the same invoice number * 01234-00000001 + 1234-00000001 To avoid this we remove the zero to the left always if the pos number > 4. closes odoo/odoo#41436 X-original-commit: 15543ebbdeb7fac2cbf60bdcafef22a84b937bfb Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-11-27[ADD] l10n_ar: Be able to validate the cbu number no matter the stdnum versionKatherine Zaoral
If avaliable will use the stdnum.ar.cbu.validate functionality, if not we defined our own validate method. closes odoo/odoo#40998 X-original-commit: 9c389525e1c334505c8edf7276826c1b37ae0a1c Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-11-27[REM] l10n_ar: dynamic domainXavier Morel
closes odoo/odoo#40954 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-20[IMP] account: get_fiscal_position returns a recordsetVictor Feyens
2019-11-18[IMP] * : replace with_context(force_company=c) by with_company(c)Victor Feyens
2019-11-15[FIX] l10n_ar: Fix ImportError: No module named 'stdnum.ar.cbu'Katherine Zaoral
Since stdnum.ar.cbu is not available in odoo saas enviroment because is using an old version of stdnum package, we add a try exept in order to catch this and manage the error properly which is raise an exception and leave a message in the log telling the user that the cbu was not able to validate. closes odoo/odoo#40383 X-original-commit: 25d483fc3fc05fd47c72c3d96c02fed12b998b0d Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-25[FIX] l10n_ar: mispelling error was throwing error when consulting ↵Katherine Zaoral
environment company closes odoo/odoo#39383 X-original-commit: eb90607b3470274d37c8542b2dafc636b4c6cf1c Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-24[FIX] account: always restrict fiscal position search on one company.Victor Feyens
closes odoo/odoo#39274 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-15[FIX] l10n_ar: Properly compute fiscal position for ArgentinianKatherine Zaoral
companies. We revert the change we apply in order to let the user to define their own fiscal positions, now the fiscal position will be set depending on the afip responsability. With this change we fix the error that the fiscal position is properly setted for the customers that are of type "Responsable Inscription" and "Consumidor Final". Before this change the "Compras / Ventas en el Exterior" fiscal position was wrongly seted, now the fiscal position is leave empty so the related invoice taxes are properly matched closes odoo/odoo#38830 X-original-commit: 74f172041351e03f60b1aff0f0eb925e896cd1fa Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-09-13[REF] l10n_ar, l10n_latam_base, l10n_latam_invoice_document: adjustmentsKatherine Zaoral
l10n_latam_base: * update translations * extend manifest * update manifest, delete new menus/fields/models from manifest l10n_latam_invoice_document: * update translations * remove filter journals for recipts * make method private * extend manifest * update manifest, delete new menus/fields/models from manifest * misspelling error in ValidationError * fixup missing change apply before merge/rebase l10n_ar: * make method private * update translations * catch error when stdnum.ar.format * fiscal position with criteria diff from Responsibility * Install AR CoA now set properly the company values. * add meaning of CUIT when mentioned in code. * unse a simplier elif and less conditions to evaluate * only get concept for invoice lines that are not section/note * remove TODO comments, this will be not implemented in this version * update to sincular al the AFIP POS System options * return match responsability type directly * improve of manifest * reference to tax group * remove old not used file fot tax report * update comments from spanish to english * only set afip serive date when post the account.move * unused file * sum recordsets instead of union * method name and remove log * update manifest, delete new menus/fields/models from manifest * Simply extra steps when loading AR COA: check directly get_ar_responsibility_match in order to apply the extra verifications and the extra configs in the company * update demo refences to new demo for odoo * return missing fix about _l10n_ar_create_document_sequences * fixup missing change apply before merge/rebase * set journal data as no update data. closes odoo/odoo#36137 Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-09-11[FIX] l10n_ar: Fix compute for l10n_ar_vat fieldKatherine Zaoral
2019-08-23[IMP] l10n_ar: complete refactor of Argentinian localizationKatherine Zaoral
Now, it depends on l10n_latam_base for the identification types and on l10n_latam_invoice_document for the invoice numbering. It is the AFIP responsibility on the partner that determines the document type. There are also 3 demo companies for the most important responsibility types for yourself.