Commit Graph
243 Commits
Author SHA1 Message Date
wan dfd01b8c5c [IMP] account: rework name sequences
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-02-05 13:59:43 +00:00
Katherine Zaoral a2af0ea898 [IMP] l10n_ar: extend constraint on pos number to ensure max 5 digits
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 19:17:29 +00:00
Katherine Zaoral f4026cb2d1 [ADD] l10n_ar: use 5 digits pos number instead of 4
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-31 19:17:29 +00:00
Katherine Zaoral e7aeb6eb07 [IMP] l10n_ar: we active some document types by default and set the proper doc_code_prefix that it was missing
closes odoo/odoo#43938

X-original-commit: bb8927f01b6804884cc460be5f93acbeb40f20d2
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-24 14:38:25 +00:00
Katherine Zaoral 07f6479101 [FIX] l10n_ar: Proper filtered document types for foreign partners
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-24 11:43:30 +00:00
Katherine Zaoral d0f86ec9c3 [FIX] l10n_ar: Do not set default purchase tax in Monotributista and Exempt 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>
2020-01-23 10:45:05 +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
Katherine Zaoral 65c9945bd8 [FIX] l10n_ar: Exportation invoices demo data
The exportation invoices demo data was created in the "Sales Journal" journal instead of the "Exportation Sales Journal". To fix this we have added the xml id of the journal explictly to fix this.

closes odoo/odoo#43329

X-original-commit: 4ab91233d64990cd9991d2f8c4fb1ba4a1a51a67
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-15 10:36:07 +00:00
Katherine Zaoral cb97a92e42 [FIX] l10n_ar: Fix responsibility of Foreign partner
The Foreign partner used in demo data was wrognly configure, it was set as "IVA Responsable Inscripto" when actually should be "Cliente / Provedor del Exterior".

After fix this in demo we updated the demo data of the vendor bills of this partner to match with the new responsibility.

Also apply and imporve in the way we are setting the fiscal position in the demo invoices, now qw use the onchange instead of setting the fiscal position explicitly in the demo invoices (and removed commented demo data that is not used)

closes odoo/odoo#43301

X-original-commit: 23e2824794b64624c8dbb1b8132d443657781830
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-14 17:01:09 +00:00
Katherine Zaoral 709063442e [ADD] l10n_ar: add demo data for mipyme partner
This will be use to make testing of the MiPyme FCE document types

closes odoo/odoo#43080

X-original-commit: 4365bd25512082bfd70229272c7248720f0383ca
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-09 15:34:52 +00:00
Katherine Zaoral 5171a8c45d [FIX] l10n_ar, l10n_latam_invoice_document: make reference to old open and paid states on invoice
Now use direclty the posted state from account move.

* This was changed in a constraint in l10n_latam_invoice_document module, also extend the constraint docstring
* This old states where also in a view domain in l10n_ar module for account.move view. We remove the field for the view (AFIP Responsibility) instead of fix the state name.

closes odoo/odoo#42982

X-original-commit: 33a5cfe068323f7fc4c92f42fadb8e236954d93a
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-08 17:05:57 +00:00
Katherine Zaoral d8e33048ba [ADD] l10n_ar: Fix identification type of Anonymous Final Consumer partner
The purpose of this partner is that we do not need to report to AFIP the identification number.

Since this partner identification was configured as DNI it was throwing an error when validate an invoice for that partner in AFIP, AFIP was requesting us to sent the DNI number.

Now we activate the Sigd "Sin identificar/venta global diaria" identification type (code 99), proper configure the  it to Anonymous Final Consumer partner, with this change AFIP validate the invoice directly and does not request us the identification number.

Now we set this partner sequence to the biggest one so far to show this identification type as the last in the list of identifications types

closes odoo/odoo#42981

X-original-commit: 842306b06984f4357f9e3cfdbb58bad828a1a627
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-08 17:01:55 +00:00
Katherine Zaoral cc20e899a2 [ADD] l10n_ar: update translation, add missing terms
closes odoo/odoo#42174

X-original-commit: 76991683473bf152e56a0944197fb04edbd73356
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-12-16 16:35:16 +00:00
Katherine Zaoral 8802709b26 [ADD] l10n_ar: add demo date for bank accounts
This is usefull for tests invoicing cases.

closes odoo/odoo#42169

X-original-commit: 32b443752dd0fb1ceda3e05da0d878bf908ebf8a
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-12-17 16:08:45 +00:00
Katherine Zaoral 8777e4960c [REF] l10n_ar, l10n_latam_invoice_document: replace staticmethods with api.model methods
closes odoo/odoo#42177

X-original-commit: 4854bef072807828f66ada7d2996f70ad01ec506
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-12-18 19:48:59 +00:00
wan 00a341f467 [FIX] l10n_ar: missing field for dynamic domain
The domain introduced in 1881999b89 needs
the field company_partner to be in the view

closes odoo/odoo#42171

X-original-commit: c6bdb22901dbd223fecabce78e6a41427a165040
Signed-off-by: wan <william-andre@users.noreply.github.com>
2019-12-19 10:11:18 +00:00
wan 21c653ecda [FIX] l10n_ar: missing adaptation for changes in move reversal
Commit 2106dd3cd1 changed the model of
account.move.reversal but didn't change the demo data of l10n_ar

X-original-commit: ea4bfe662c4a9f5a033712ed3e4d17e9e8252ca0
2019-12-19 10:11:18 +00:00
Katherine Zaoral 1f33c87c25 [FIX] l10n_ar: Allow Responsable Inscripto to receive letter B.
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-13 14:07:32 +00:00
Katherine Zaoral 232f1ab515 [FIX] l10n_ar_account: proper compare document numbers in vendor bills
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-12-02 15:14:33 +00:00
wan e8caf0a368 [IMP] l10n_*: adapt for new account.group.template model 2019-11-27 14:10:13 +00:00
Katherine Zaoral 817f1ece8d [ADD] l10n_ar: Be able to validate the cbu number no matter the stdnum version
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 19:58:25 +00:00
Xavier Morel 1881999b89 [REM] l10n_ar: dynamic domain
closes odoo/odoo#40954

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-27 10:00:31 +00:00
Victor Feyens 81245528d1 [IMP] account: get_fiscal_position returns a recordset 2019-11-20 14:42:07 +00:00
Katherine Zaoral 698c1e3cc1 [ADD] l10n_ar: show country AFIP code in the form/tree view
Currently all the countries that match between odoo and AFIP list where
set with the respective value.

This commit add the AFIP code field to both tree (for consult) and form
view (in developer mode only) to let the user the posibility to set/edit this
field for any of the next cases:

* need to consult the code.
* need to be changed.
* need to create a new country that exist in AFIP list and not in odoo
  and need to add the related AFIP code

closes odoo/odoo#40532

X-original-commit: 1b95bfe202576583d6458c6bd1a707dd988e6d95
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-11-19 17:39:03 +00:00
Victor Feyens 9215e73fa2 [IMP] * : replace with_context(force_company=c) by with_company(c) 2019-11-18 12:25:05 +00:00
Katherine Zaoral 91f503cd99 [FIX] l10n_ar: Fix ImportError: No module named 'stdnum.ar.cbu'
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-11-15 21:15:01 +00:00
Katherine Zaoral ebdbdde5a6 [ADD] l10n_ar: activate purhcase suffered perceptions
This ones were inactive by default, we think that need to be active in
order to be able to be added to vendor bills.

Also change the amount from 0.0 to 1.0 of all the perception tax
templates to make it appears in the manual taxes widget when they are
addes to the invoice/bills lines.

closes odoo/odoo#39400

X-original-commit: ff70835db4f6354de62a00dc717682c2835a105c
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-25 22:30:14 +00:00
Katherine Zaoral e32e73dbbe [ADD] l10n_ar: add new CUIT number to Reponsable Inscripto demo company
closes odoo/odoo#39394

X-original-commit: dc3025da4d176d8270d12849b286bf788e78b22f
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-25 15:24:44 +00:00
Katherine Zaoral 07377d5700 [FIX] l10n_ar: mispelling error was throwing error when consulting environment company
closes odoo/odoo#39383

X-original-commit: eb90607b3470274d37c8542b2dafc636b4c6cf1c
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-25 12:49:59 +00:00
Victor Feyens 84a89e1e1e [FIX] account: always restrict fiscal position search on one company.
closes odoo/odoo#39274

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-24 17:12:16 +00:00
Katherine Zaoral d31a87c14e [FIX] l10n_ar_afip_code: Currency AFIP codes
60 is different of 060. The 060 is the correct value for the afip code
in this case (EUR). Apply to all the numeric values in the currency afip
codes.

closes odoo/odoo#38953

X-original-commit: 8c47c7f0342b985287da86f7955a52ef05a6ba0d
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-17 13:07:46 +00:00
Katherine Zaoral 22376c05d4 [ADD] l10n_ar: Add more afip codes to res.country
X-original-commit: 4a0c8846e97bde501ad0d3e864de86ceb30b75d0
2019-10-17 13:07:46 +00:00
Katherine Zaoral 252ae54c59 [FIX] l10n_ar: Properly compute fiscal position for Argentinian
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-10-15 16:47:01 +00:00
Christophe Simonis 0467cab225 [FIX] l10n_*: accurate module version
closes odoo/odoo#37732

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-10-01 16:03:59 +00:00
Katherine Zaoral 8de9ce5f7a [FIX] l10n_ar: data and demo data
- AFIP code in UOMS saved as char
- fix missing account_id in demo data
- Remove demo data that was throwing error
- merge res country data to csv file.
- move res currency AFIP code data to csv file

closes odoo/odoo#37457

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-09-30 15:02:00 +00:00
Katherine Zaoral a9b7628706 [REF] l10n_ar, l10n_latam_base, l10n_latam_invoice_document: adjustments
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-13 15:22:13 +00:00
Katherine Zaoral ae8e060cec [FIX] l10n_ar: Fix compute for l10n_ar_vat field 2019-09-11 14:26:45 +00:00
Katherine Zaoral ebe291560a [IMP] l10n_ar: complete refactor of Argentinian localization
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.
2019-08-23 14:27:33 +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 629efbd6a9 [IMP] l10n_ar: switch account.account.template creation in csv
data creation is faster when done through a CSV file compared to an XML file. Hence doing it through a CSV

This commit is related to task_id : 1909961.

closes odoo/odoo#28896
2019-02-08 08:01:19 +00:00
Martin Trigaux fe9612c6bc [I18N] remove l10n_* translation files
Were no longer synchronized since 9.0
Commit 710f67ad4b mistakly reexported them too

Remove the .pot, keep only a few one like it actually makes sesne to have
translated content such as l10n_be_invoice_bba
2018-09-18 15:58:44 +02:00
Martin trigaux 710f67ad4b [I18N] export saas-11.5 source terms
To match new model_terms syntax
2018-09-18 14:30:04 +02:00
Fabien Pinckaers 7f9e7f0c96 [IMP] *: only show 'learn more' when there is a web page describing the module 2018-08-06 11:57:41 +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
Yannick Tivisse 70a521205a [IMP] l10n*: CoA loading yml files to xml 2017-11-07 11:43:46 +01:00
Mehul Patel 3fb4159ad9 [IMP] account,sale,l10n_*: display tax amount per tax group in sale/account reports
Each tax is linked to a tax group. Each tax group is display separately with the corresponding amount when the business reports (invoices/sale orders) are printed.

NB: Because each tax is now linked to a tax group. Every localization have been updated according it.

task: https://www.odoo.com/web#id=30501&view_type=form&model=project.task&action=333&active_id=131&menu_id=4720

PR: #16724
2017-08-28 11:24:24 +02:00