Skip to content

Conversation

@Shide
Copy link
Contributor

@Shide Shide commented Jun 12, 2023

Gestión de los Real Estates.

Es un PR inicial/base para cuando se decida incluirlos en los modelos de la AEAT.

MT-3113 @moduon @ArantxaSudon @loida-vm @rafaelbn

@OCA-git-bot
Copy link
Contributor

Hi @pedrobaeza,
some modules you are maintaining are being modified, check this out!

@pedrobaeza pedrobaeza changed the title [FIX] l10n_es_aeat: Manage AEAT Real Estates [16.0][FIX] l10n_es_aeat: Manage AEAT Real Estates Jun 12, 2023
@Shide Shide force-pushed the 16.0-l10n_es_aeat_real_estates-l10n_es_aeat branch from 4f6fdf1 to a63b883 Compare June 12, 2023 09:25
@Shide Shide marked this pull request as draft June 12, 2023 09:25
Copy link
Contributor

@loida-vm loida-vm left a comment

Choose a reason for hiding this comment

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

¿Podría sacarse un desplegable de:
Código de provincias (Spanish_states) https://sede.agenciatributaria.gob.es/Sede/ayuda/tablas-auxiliares-domicilios/provincias.html (1a columna)
Código de municipios (Township_code) https://sede.agenciatributaria.gob.es/Sede/ayuda/tablas-auxiliares-domicilios/municipios.html (2a columna)
?

Gracias

@Shide Shide force-pushed the 16.0-l10n_es_aeat_real_estates-l10n_es_aeat branch 2 times, most recently from d88d5da to 0161c79 Compare June 13, 2023 09:07
@Shide
Copy link
Contributor Author

Shide commented Jun 13, 2023

@loida-vm He creado un nuevo modelo para los municipios para que una vez que se seleccione la provincia, se pueda seleccionar el municipio y se auto rellene la ciudad.
Las provincias tiran directamente de las de Odoo y sacan el código de provincia del mapeo de provincias que está directamente en código.

@rafaelbn
Copy link
Member

Este PR viene de #2893

¡Gracias!

@loida-vm
Copy link
Contributor

@loida-vm He creado un nuevo modelo para los municipios para que una vez que se seleccione la provincia, se pueda seleccionar el municipio y se auto rellene la ciudad. Las provincias tiran directamente de las de Odoo y sacan el código de provincia del mapeo de provincias que está directamente en código.

Perfecto @Shide . En la plantilla ahora solo me aparecen los nombres y no los códigos, pero si hubiera que sacar los datos imagino que sacaría también el código, ¿verdad?

Muchas gracias!

@rafaelbn
Copy link
Member

rafaelbn commented Jul 25, 2023

@Shide Shide marked this pull request as ready for review October 2, 2023 07:49
@Shide Shide force-pushed the 16.0-l10n_es_aeat_real_estates-l10n_es_aeat branch from 0161c79 to 43d5c19 Compare October 2, 2023 07:53
Copy link
Member

Choose a reason for hiding this comment

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

En lugar de tener otra tabla más muy populada, creo que habría que utilizar l10n_es_toponyms, y extraer el código de provincia de los 2 primeros dígitos del CP, aunque teniendo el res.country.state, no lo veo necesario.

}

# https://sede.agenciatributaria.gob.es/Sede/ayuda/tablas-auxiliares-domicilios/tipos-vias.html
AEAT_ADDRESS_TYPES = [
Copy link
Member

Choose a reason for hiding this comment

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

Esto se utilizar solo en un sitio, así que no veo la necesidad de mover el otro diccionario y poner esto aquí. Ponlo directamente en el archivo py donde se utiliza, y si es necesario utilizarlo en otro sitio, se puede importar desde ese archivo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Son 300 y pico líneas directamente en el fichero de l10n_es_aeat_real_estate.py y en la parte superior del fichero. Ensucia un poco la legibilidad al tener que hacer tanto scroll nada más abrir el fichero y además ya existe el fichero aeat_data.py (antes se llamaba spanish_states_mapping.py y lo he renombrado), que creo que es apropiado utilizarlo para estos casos.

Copy link
Member

Choose a reason for hiding this comment

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

Vale, pues no cambies el mapeo de provincias, y crea un nuevo archivo para esto. Lo que no quiero es un diff grande sin necesidad

compute_sudo=True,
)
township_domain = fields.Many2many(
comodel_name="l10n.es.aeat.township",
Copy link
Member

Choose a reason for hiding this comment

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

Sustituir por res.city.zip.

from odoo.tools import config

from .spanish_states_mapping import SPANISH_STATES as ss
from .aeat_data import AEAT_STATES_CODE_MAP as ascm
Copy link
Member

Choose a reason for hiding this comment

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

No es necesario este cambio como se ha comentado.

@EmilioPascual EmilioPascual force-pushed the 16.0-l10n_es_aeat_real_estates-l10n_es_aeat branch 2 times, most recently from 10ed08c to bc2265d Compare January 24, 2024 16:55
@EmilioPascual EmilioPascual force-pushed the 16.0-l10n_es_aeat_real_estates-l10n_es_aeat branch 3 times, most recently from 053b670 to 8255f63 Compare February 2, 2024 16:28
@rafaelbn
Copy link
Member

rafaelbn commented Feb 5, 2024

@Shide or @EmilioPascual please, could you rebase? Thank you!

@Shide Shide force-pushed the 16.0-l10n_es_aeat_real_estates-l10n_es_aeat branch from 8255f63 to dc4bbcf Compare March 26, 2024 11:03
@netkia
Copy link

netkia commented May 7, 2024

@Shide or @EmilioPascual please, could you rebase? Thank you!

@Shide Shide force-pushed the 16.0-l10n_es_aeat_real_estates-l10n_es_aeat branch from dc4bbcf to b838f47 Compare May 7, 2024 10:43
@rafaelbn
Copy link
Member

@Shide or @EmilioPascual will rebase next monday 😄 and review all comments. Thank you! ❤️

@mariancuadranetkia
Copy link
Contributor

@rafaelbn Could you review comments and rebase?

@rafaelbn
Copy link
Member

rafaelbn commented Sep 11, 2024

OK @mariancuadranetkia . Tomorrow we will make the rebase and review 😄 . Please @Shide could dedicate some time? Then we can go ahead to review #3617

Juraría que aquí en localización podemos hablar en castellano 😄

@pedrobaeza pedrobaeza added this to the 16.0 milestone Sep 11, 2024
@rafaelbn
Copy link
Member

Hello, just to inform that we could review this PR in the OCA Sprint Code in October. Until that moment we don't have time for this. Sorry.

@mariancuadranetkia
Copy link
Contributor

Hasta donde sé, sí, podemos hablar en castellano jeje
Ok, intentaremos estar atentos para poder retomarlo nosotros también.
Gracias @rafaelbn

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 19, 2025
@EmilioPascual EmilioPascual force-pushed the 16.0-l10n_es_aeat_real_estates-l10n_es_aeat branch 5 times, most recently from 12fe01c to 40113e2 Compare January 20, 2025 11:04
@rafaelbn
Copy link
Member

Please @OCA/local-spain-maintainers , could you remove the Stale label? Thank you!

@pedrobaeza pedrobaeza removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 22, 2025
@EmilioPascual EmilioPascual force-pushed the 16.0-l10n_es_aeat_real_estates-l10n_es_aeat branch from 40113e2 to c563af5 Compare February 5, 2025 09:03
@mariancuadranetkia
Copy link
Contributor

@moduon @rafaelbn @Shide Esto lo acabareis?

Hay conflictos.

@github-actions
Copy link

github-actions bot commented Oct 5, 2025

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants