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

update_JuanDanielGutierrezGomez #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

19120120
Copy link

JUAN DANIEL GUTIERREZ GOMEZ
Esencialmente seguí las intrucciones y los contenidos sin embargo en un apartado divide modulos para coocer el funcionamiento a fondo entre ellos, me encanto el aprendizaje y me llevo un genial recuerdo de los ponientes

@19120120
Copy link
Author

@Simon-sila

Copy link

@Simon-sila Simon-sila left a comment

Choose a reason for hiding this comment

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

holaaa, ya revisé tu pull request !
espero te sea util este feedback para que aprendas mas cossas !

@@ -4,7 +4,17 @@
"application": True, # This line says the module is an App, and not a module
"depends": ["base"], # dependencies
"data": [

'security/ir.model.access.csv',
# estate property

Choose a reason for hiding this comment

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

esa linea no sirve, la puedes quitar sin problema, no agrega mucha informaciom

Comment on lines +17 to +19
date_availability = fields.Date(string="Available From",
default=lambda self: (datetime.now() + timedelta(days=90)).strftime('%Y-%m-%d'),
copy=False, help="Property Date Availability")

Choose a reason for hiding this comment

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

podrias hacer esta parte tantito mas legible

Suggested change
date_availability = fields.Date(string="Available From",
default=lambda self: (datetime.now() + timedelta(days=90)).strftime('%Y-%m-%d'),
copy=False, help="Property Date Availability")
date_availability = fields.Date(
string="Available From",
default=lambda self: (datetime.now() + timedelta(days=90)).strftime('%Y-%m-%d'),
copy=False, help="Property Date Availability"
)


name = fields.Char(string="Title", required=True, help="Property name")
description = fields.Text(string="Description", help="Property description")
postcode = fields.Text(string="Postcode", help="Property Post code")

Choose a reason for hiding this comment

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

Suggested change
postcode = fields.Text(string="Postcode", help="Property Post code")
postcode = fields.Text(help="Property Post code")

por defecto si no pones un argumento string, odoo va a poner como string el nombre del campo, poniendole mayusculas al inicio de las palabras y reemplazando los _ con espacios

default="new",
help="State of the property advertisement")

# links

Choose a reason for hiding this comment

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

igual ese lo puedes quitar

@api.depends('living_area', 'garden_area')
def _compute_total_area(self):
"""
Compute and update total area.

Choose a reason for hiding this comment

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

esta bien poner comentarios en el codigo pero aqui ya que el codigo es muy obvio realmente no ayuda mucho

Comment on lines +9 to +15
<data>
<xpath expr="//notebook/page[@name='preferences']" position="after">
<page string="Estate Properties">
<field name="property_ids" />
</page>
</xpath>
</data>

Choose a reason for hiding this comment

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

Suggested change
<data>
<xpath expr="//notebook/page[@name='preferences']" position="after">
<page string="Estate Properties">
<field name="property_ids" />
</page>
</xpath>
</data>
<xpath expr="//notebook/page[@name='preferences']" position="after">
<page string="Estate Properties">
<field name="property_ids" />
</page>
</xpath>

Comment on lines +9 to +10
# Agregar un print para verificar la ejecución
print("Ejecutando action_sold en estate_account")

Choose a reason for hiding this comment

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

Suggested change
# Agregar un print para verificar la ejecución
print("Ejecutando action_sold en estate_account")

hay que eliminar los prints antes de subir a produccion !

print("Ejecutando action_sold en estate_account")

# Llamar al método original
result = super(EstateProperty, self).action_sold_property()

Choose a reason for hiding this comment

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

Suggested change
result = super(EstateProperty, self).action_sold_property()
result = super().action_sold_property()

Comment on lines +16 to +18
if not self.buyer_id:
print("No hay comprador asignado. No se creará la factura.")
return result

Choose a reason for hiding this comment

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

Suggested change
if not self.buyer_id:
print("No hay comprador asignado. No se creará la factura.")
return result
if not self.buyer_id:
return result

],
})

print(f"Factura creada: {invoice.id}")

Choose a reason for hiding this comment

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

Suggested change
print(f"Factura creada: {invoice.id}")

@19120120
Copy link
Author

Muchas gracias los reviso si tuviera alguna duda, puedo contactarte ? Muchas gracias saludos

@Simon-sila
Copy link

si claro, me puedes escrbir aqui en la pull request mencinandome con el @Simon-sila

@Simon-sila
Copy link

Simon-sila commented Oct 21, 2024

ya que no hay actividad aqui, puedes cerrar la pull request @19120120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants