-
Notifications
You must be signed in to change notification settings - Fork 748
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
base: master
Are you sure you want to change the base?
Conversation
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.
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 |
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.
esa linea no sirve, la puedes quitar sin problema, no agrega mucha informaciom
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") |
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.
podrias hacer esta parte tantito mas legible
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") |
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.
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 |
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.
igual ese lo puedes quitar
@api.depends('living_area', 'garden_area') | ||
def _compute_total_area(self): | ||
""" | ||
Compute and update total area. |
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.
esta bien poner comentarios en el codigo pero aqui ya que el codigo es muy obvio realmente no ayuda mucho
<data> | ||
<xpath expr="//notebook/page[@name='preferences']" position="after"> | ||
<page string="Estate Properties"> | ||
<field name="property_ids" /> | ||
</page> | ||
</xpath> | ||
</data> |
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.
<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> |
# Agregar un print para verificar la ejecución | ||
print("Ejecutando action_sold en estate_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.
# 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() |
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.
result = super(EstateProperty, self).action_sold_property() | |
result = super().action_sold_property() |
if not self.buyer_id: | ||
print("No hay comprador asignado. No se creará la factura.") | ||
return result |
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.
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}") |
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.
print(f"Factura creada: {invoice.id}") |
Muchas gracias los reviso si tuviera alguna duda, puedo contactarte ? Muchas gracias saludos |
si claro, me puedes escrbir aqui en la pull request mencinandome con el @Simon-sila |
ya que no hay actividad aqui, puedes cerrar la pull request @19120120 |
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