Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] Ecuadorian Localization #75055

Closed
wants to merge 2 commits into from
Closed

Conversation

cormaza
Copy link
Contributor

@cormaza cormaza commented Aug 12, 2021

  • Chart of Account based on IFRS
  • Validation for RUCs and CI for Ecuadorian VAT
  • Taxes and Groups - minimum
  • Initial Structure for 103 and 104 Reports to SRI
  • Entity, Point of Emission, address of emission, and type of emission added to journal
  • SRI payment methods, used on EDI Process
  • Ecuadorian Banks data
  • Latam Identification Types
  • Latam Document Types Related

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo
Copy link
Contributor

robodoo commented Aug 12, 2021

@vbe-odoo
Copy link
Contributor

@jco-odoo ping

Copy link
Contributor

@jco-odoo jco-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of things to talk about.

addons/l10n_ec/__manifest__.py Show resolved Hide resolved
addons/l10n_ec/models/account_move.py Outdated Show resolved Hide resolved
addons/l10n_ec/models/account_tax_group.py Show resolved Hide resolved
addons/l10n_ec/models/l10n_latam_document_type.py Outdated Show resolved Hide resolved
odoo/addons/base/data/res.country.state.csv Outdated Show resolved Hide resolved
addons/l10n_ec/models/res_partner.py Outdated Show resolved Hide resolved
Copy link
Contributor

@jco-odoo jco-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we leave out l10n_ec_extra_tax for the moment (and add it later on after the freeze) A lot to handle still...

addons/l10n_ec/models/account_move.py Outdated Show resolved Hide resolved
addons/l10n_ec/models/account_journal.py Outdated Show resolved Hide resolved
addons/l10n_ec/models/account_move.py Outdated Show resolved Hide resolved
addons/l10n_ec/models/account_move.py Show resolved Hide resolved
addons/l10n_ec/models/account_move.py Outdated Show resolved Hide resolved
addons/l10n_ec/models/account_move.py Outdated Show resolved Hide resolved
addons/l10n_ec/models/account_move.py Outdated Show resolved Hide resolved
addons/base_vat/models/res_partner.py Outdated Show resolved Hide resolved
@cormaza cormaza changed the title l10n_ec V15 WIP [IMP] Ecuadorian Localization Aug 26, 2021
@opa-cormaza opa-cormaza force-pushed the l10n_ec_v15 branch 2 times, most recently from cefd9ed to 0c8aeec Compare August 30, 2021 18:11
Copy link
Contributor

@jco-odoo jco-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you still check?

addons/l10n_ec/models/account_move.py Outdated Show resolved Hide resolved
addons/l10n_ec/models/account_move.py Outdated Show resolved Hide resolved
@opa-cormaza
Copy link
Contributor

@jco-odoo Maybe can this method has an issue

where_string += ' AND l10n_latam_document_type_id = %(l10n_latam_document_type_id)s AND ' \
'company_id = %(company_id)s AND move_type IN (\'out_invoice\', \'out_refund\')'
param['company_id'] = self.company_id.id or False

I'm not sure but in this case we are asking for company, when journals already has company

@opa-cormaza
Copy link
Contributor

Check this lines

def _get_demo_data_move(self):
ref = self.env.ref
cid = self.env.company.id
foreign = ref('l10n_cl.dc_fe_dte').id
model, data = super()._get_demo_data_move()
self.env['account.journal'].search([
('type', '=', 'purchase'),
('company_id', '=', self.env.company.id),
]).l10n_latam_use_documents = False
data[f'{cid}_demo_invoice_1']['l10n_latam_document_type_id'] = foreign
data[f'{cid}_demo_invoice_2']['l10n_latam_document_type_id'] = foreign
data[f'{cid}_demo_invoice_3']['l10n_latam_document_type_id'] = foreign
data[f'{cid}_demo_invoice_followup']['l10n_latam_document_type_id'] = foreign

It should ask if is a cl company to change latam_document_type, this is changing in ec document type, and make issue, this commit should change this behavior?

@jco-odoo @vbe-odoo

@@ -251,6 +253,65 @@ def check_vat_ch(self, vat):
return check == int(num[8])
return False

def _checksum_ci_ec(self, number):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would you need to copy all the validation code from stdnum? it's a dependency, you can call it. There are even handy shortcuts:
stdnum.util.get_cc_module("ec", "ci")
stdnum.util.get_cc_module("ec", "ruc")

PS: please never copy code without giving attribution, copyright and license, that's not nice (and it violates the original license, copyright law, and the Odoo CLA) ;)

@@ -0,0 +1,11 @@
Ecuador, 2021-08-20

I hereby agree to the terms of the Odoo Individual Contributor License
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems your company has already signed the Corporate CLA, so unless you own the copyright to this code personally, your name should be added instead in the contributors for your organization:
https://github.com/odoo/odoo/blob/master/doc/cla/corporate/opa-consulting.md

The CLA implies that you are granting a license to all code you contribute, so you must be the copyright owner. In many companies and countries, employment contracts have a clause where the copyright of the works employees produce for the company (including code) belongs to the company. You may need to double-check that :)

@robodoo
Copy link
Contributor

robodoo commented Sep 2, 2021

Staging failed: ci/runbot on 848be48463e7732cdd412c68644684900f8eb86e (view more at http://runbot.odoo.com/runbot/build/9780752)

@seb-odoo seb-odoo removed request for a team September 2, 2021 22:35
@sdegueldre sdegueldre removed the request for review from a team September 3, 2021 05:21
@jco-odoo jco-odoo removed request for a team September 3, 2021 09:44
@jco-odoo
Copy link
Contributor

jco-odoo commented Sep 3, 2021

@robodoo retry

robodoo pushed a commit that referenced this pull request Sep 3, 2021
- Added own implementation, for CI and RUC Validation

Part-of: #75055
robodoo pushed a commit that referenced this pull request Sep 3, 2021
- Chart of Account based on IFRS
- Validation for RUCs and CI for Ecuadorian VAT
- Taxes and Groups - minimum
- Initial Structure for 103 and 104 Reports to SRI
- Entity, Point of Emission, address of emission, and type of emission added to journal
- SRI payment methods, used on EDI Process
- Ecuadorian Banks data
- Latam Identification Types
- Latam Document Types Related

closes #75055

Signed-off-by: Josse Colpaert <jco@openerp.com>
- Chart of Account based on IFRS
- Validation for RUCs and CI for Ecuadorian VAT
- Taxes and Groups - minimum
- Initial Structure for 103 and 104 Reports to SRI
- Entity, Point of Emission, address of emission, and type of emission added to journal
- SRI payment methods, used on EDI Process
- Ecuadorian Banks data
- Latam Identification Types
- Latam Document Types Related
@jco-odoo
Copy link
Contributor

jco-odoo commented Sep 3, 2021

@robodoo r+

@Xavier-Do
Copy link
Contributor

Can you please avoid such random retry/push/r+ in freeze period? You just cancelled an almost merged batch.

robodoo pushed a commit that referenced this pull request Sep 3, 2021
- Added own implementation, for CI and RUC Validation

Part-of: #75055
robodoo pushed a commit that referenced this pull request Sep 3, 2021
- Chart of Account based on IFRS
- Validation for RUCs and CI for Ecuadorian VAT
- Taxes and Groups - minimum
- Initial Structure for 103 and 104 Reports to SRI
- Entity, Point of Emission, address of emission, and type of emission added to journal
- SRI payment methods, used on EDI Process
- Ecuadorian Banks data
- Latam Identification Types
- Latam Document Types Related

closes #75055

Signed-off-by: Josse Colpaert <jco@openerp.com>
@robodoo robodoo added the 14.5 label Sep 3, 2021
@robodoo robodoo closed this Sep 3, 2021
@robodoo robodoo temporarily deployed to merge September 3, 2021 16:54 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants