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
13.0 [MIG] l10n_es_aeat_mod347 #1341
Conversation
- Se han renombrado los módulos para usar la nomenclatura propuesta por OpenERP: l10n_es para el módulo base de localización (plan de cuentas), l10n_es_* para el resto de módulos. - Se eliminan los módulos extra_addons/* que deberían moverse a los extra-addons genéricos (no son específicos de España). - Se renombran los __terp__.py por __openerp__.py
…ciertos módulos, por los correspondientes que se modificaron para esta versión 6.0 y en ciertos __init__ adaptamos los imports a los nuevos nombres de los ficheros. Renombrado de los archivos de traducción españoles de es_ES.po a es.po y pequeñas refactorizaciones
* FIX: Renombrado de los archivos de traducción catalanas de ca_ES.po a ca.po * IMP: Añadidos avisos NO ADAPTADO TODAVÍA A LA VERSIÓN 6.0 a varios módulos, limpieza l10n_es_partner_mercantil
…c module for aeat models, 347 module was portedto v6.0 and adds new module to print AEAT model 349.
…ueñas mejoras generales (vistas, traducciones, código) y corrección pequeño bug por un olvido en la adaptación de la v5 a la v6
… módulo del 347, que incluían los cambios hechos por la AEAT para la declaración 2010, para la versión 6.0 del módulo, además corregimos un bug encontrado por Jordi en la versión 5.0 hoy. También añado una nueva comprobación de los registros de empresas, ya que el cif de la empresa es requerido, por lo que no va a dejar confirmar el informe, mientras no se rellene este campo en todos los registros de empresa. La agrupación de pagos en efectivo se dejó igual que en la 5.0, ya que se sigue comportando como en la 5.0, sigo animando a que si alguien conoce como mejorarla adelante.
… las mejoras introducidas en el anterior commit
…recía Pexego en la licencia, quedan los compartidos.
…elo con el detalle de los trimestes obligatorio para la declaración del 2011.
…r Cif/Nif en el cálculo del 347, por si hay más de una empresa con el mismo cif..., pequeña refactorización usando rec_name en lugar de name_get
… los nuevos strings después de los recientes cambios en el 347.
…as. Necesario para las Sociedades Irregulares, Sociedades Civiles y Comunidad de Bienes sin regimen de módulos en el IRPF. Al resto de las empresas no les afecta ya que no facturan con IRPF. l10n_es_aeat_mod340: Correción de los autores en el modelo 340
…ron marcados como no instalables mientras no se compruebe que funcionan o migren, para poder usarlos o probarlos se debería poner el atributo installable de los ficheros __openerp__.py de cada módulo a True
[FIX]: Add security definition for objects l10n_es_aeat_mod347_calculate_records and l10n_es_aeat_mod347_export_to_boe. [FIX]: Changed types to orm.Model, orm.TransientModel and orm.AbstractModel. [FIX]: Contributions have been written in the standard format of the community. [FIX]: Remove 'init_xml' keys, because it's no longer needed in v7. [FIX]: Remove __author__ variables in files, because authors are put on manifest file (__openerp__.py). [FIX]: Increased compatibility with standard PEP8. [FIX]: Imports in standard format. [IMP]: Add "state" field in tree view. [IMP]: Option to generate report suppliers only. [FIX]: Update address partner search to V7. [FIX]: Update state in address partner to V7. [FIX]: Update dependencies, now required the module documents to view generated file in V7. [FIX]: Translate .pot file to v7. [FIX]: Translate field "only_supplier" to spanish language. [FIX]: Format the text that explains the module. [IMP]: Add icon and screencapture.
- Cambiado flag de los partners para no incluirlos en el 347 (opción menos común), que incluirlos (que suelen ser todos). - Eliminado flag para incluir los diarios, ya que no se activa por defecto y el usuario se confunde con los resultados. Se cogen todos los diarios de caja. - Otras mejoras menores.
…el calculo del 347
…s rectificativas.
… operation We can't remove as is the `abs` if we don't take into account possible sign depending on the operation. Complement of 3927e92 Included tests for these cases.
Since v11, Odoo doesn't need the country code in VATs for performing the checks. You must fill country + putting the VAT with or without the country code. This model doesn't work properly for the case where you don't introduce the country code. We now use the method created for centralizing all the partner identification stuff that was introduced with VAT book for performing a proper recognition. Included tests for checking all of the identification stuff.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: l10n-spain-12.0/l10n-spain-12.0-l10n_es_aeat_mod347 Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-12-0/l10n-spain-12-0-l10n_es_aeat_mod347/
Previously, it was treated as integer, and thus, default for applying sign is applied as well, resulting in 14 characters instea of 13.
Fixed real state onchange bug and some BOE format fields bugs. Tested exporting and uploading sample BOE file to AEAT.
2 patches: * AEAT requires to pass in declaration number a number with 0s if no present, but no extra character should be put, so we restore back the integer type, but make sure no sign is applied. * If the declaration is substitutive, we need to put the S in the second character, not in the first one.
Continuation of 611c24b and later commits. This way, we can decouple tax label from the matching, thanks to the XML-ID that Odoo gives to created taxes. We also simplifies the code thanks to this.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: l10n-spain-12.0/l10n-spain-12.0-l10n_es_aeat_mod347 Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-12-0/l10n-spain-12-0-l10n_es_aeat_mod347/
tienes errores de flake8 y black :S |
Hola @acysos , Vas a seguir con este PR? |
Si vamos a seguir |
OK! Cuando te vaya bien echad un vistazo a los comentarios de @MiquelRForgeFlow y revisamos. 👍 Lo mismo con el resto de modelos. Si necesitáis delegar alguno me dices. |
Hemos detectado un bug que solo pasa en Enterprise al instalar, y no se había detectado hasta ahora y lo estamos revisando. Hay que hacerlo compatible con ambas. |
Sí, tiene que ser compatible con ambas. ¿Qué error os ha dado? |
Hola @acysos ¿Vas a continuar el PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funcionalmente parece correcto. Falta por corregir lo que han comentado del CI y la compatibilidad con enterprise.
l10n_es_aeat_mod347/models/mod347.py
Outdated
partner_state_code = fields.Char(string="State Code", size=2) | ||
first_quarter = fields.Float( | ||
string="First quarter operations", | ||
digits=dp.get_precision("Account"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
digits=dp.get_precision("Account"), | |
digits="Account", |
Change in all fields to avoid warning:
https://github.com/odoo/odoo/blob/544116c55ea8938a4d85ddc200ed57427d5c3d43/odoo/addons/base/models/decimal_precision.py#L13
) | ||
cls.supplier_2 = cls.supplier.copy({"name": "Test supplier 2"}) | ||
# Invoice lower than the limit | ||
self.taxes_sale = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.taxes_sale = { | |
cls.taxes_sale = { |
cls.model347 = cls.env["l10n.es.aeat.mod347.report"].create( | ||
{ | ||
"name": "9990000000347", | ||
"company_id": self.company.id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"company_id": self.company.id, | |
"company_id": cls.company.id, |
{ | ||
"name": "Test customer 5", | ||
# For testing spanish states mapping | ||
"country_id": self.env.ref("base.es").id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"country_id": self.env.ref("base.es").id, | |
"country_id": cls.env.ref("base.es").id, |
cls.customer_6 = cls.customer.copy( | ||
{ | ||
"name": "Test customer 6", | ||
"country_id": self.env.ref("base.es").id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"country_id": self.env.ref("base.es").id, | |
"country_id": cls.env.ref("base.es").id, |
"S_IVA10S,S_IRPF20": (4000, 400), | ||
} | ||
cls.invoice_2 = cls._invoice_sale_create( | ||
"2019-04-01", {"partner_id": self.customer_2.id} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"2019-04-01", {"partner_id": self.customer_2.id} | |
"2019-04-01", {"partner_id": cls.customer_2.id} |
[MIG] l10n_es_aeat_mod347
MIgración a 13.0.
Depende #1298.