Conversation
3b1c6e0 to
7884ea5
Compare
estate/models/__init__.py
Outdated
| @@ -0,0 +1,6 @@ | |||
| from . import ( | |||
There was a problem hiding this comment.
aca siempre hacemos un import por linea
quedaria como:
from . import estate_property
from . import estate_proerty_offer
from . import estate_property_tag
from , import estate_property_type
estate/models/estate_property.py
Outdated
| else: | ||
| record.best_price = 0.0 | ||
|
|
||
| @api.onchange("garden") |
There was a problem hiding this comment.
en V19 ya no usamos el onchange, preferimos siempre el depends, son basicante lo mismo pero uno se ejecuta en el momento(onchage) y el tro al guardar, depends
| def _compute_date_deadline(self): | ||
| for record in self: | ||
| record.date_deadline = ( | ||
| fields.Date.add(record.create_date, days=record.validity) if record.create_date else False |
There was a problem hiding this comment.
aca paa las fechas hay ya unos util que usamos, buscte en el codigo de odoo Relativedelta. es lo que usamos ocmo convencion para las sumas de fechas y cosas
| <?xml version='1.0' encoding='utf-8'?> | ||
| <odoo> | ||
|
|
||
| // Vista Basica por defecto |
There was a problem hiding this comment.
cuidado con esto que no es un comentario
| <?xml version='1.0' encoding='utf-8'?> | ||
| <odoo> | ||
|
|
||
| // Vista Basica por defecto |
estate/__manifest__.py
Outdated
| "views/estate_menus.xml", | ||
| ], | ||
| "author": "ADHOC SA", | ||
| "license": "LGPL-3", |
| @@ -0,0 +1,15 @@ | |||
| { | |||
There was a problem hiding this comment.
Lo que te faltaria aca defini por las dudas y que siempre hacemos es el auto-install: en false, application: True en este caso.
installabel: True, y muy importante la version : "19.0.1.0.0" en este caso
estate/models/estate_property.py
Outdated
| @api.depends("offer_ids.price") | ||
| def _compute_best_price(self): | ||
| for record in self: | ||
| if record.offer_ids: |
There was a problem hiding this comment.
Este if talvez puede ser un oneliner
23fcf2d to
a995ac3
Compare
a995ac3 to
d421cde
Compare

PR de tarea de Induccion