Conversation
Simon-sila
left a comment
There was a problem hiding this comment.
holaaa, ya revisé tu pull request !
espero te sea util este feedback para que aprendas mas cossas !
| "data": [ | ||
|
|
||
| 'security/ir.model.access.csv', | ||
| # estate property |
There was a problem hiding this comment.
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.
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.
| 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 |
| @api.depends('living_area', 'garden_area') | ||
| def _compute_total_area(self): | ||
| """ | ||
| Compute and update total area. |
There was a problem hiding this comment.
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.
| <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.
| # 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.
| 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.
| 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.
| 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