This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
# Web Application Service Definition | |
# -------- | |
# | |
# All of the information needed to start up an odoo web | |
# application container. | |
web: | |
platform: linux/amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Leer sugerencia de Hiaura | |
https://docs.djangoproject.com/en/3.2/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_select_related | |
#Eliminar las migraciones desde Posgresql | |
# - Entrar a psql | |
docker exec -it billing-backend_db_1 psql -U billing | |
# Listar las migraciones | |
SELECT * FROM django_migration; | |
# Eliminar o por nombre de la app o directamente por cada ID | |
delete FROM django_migrations where app='document'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[installer] with systemd, run systemctl --user start kite-autostart | |
[installer] without systemd, run /home/foxcarlos/.local/share/kite/kited | |
[installer] or launch it using the Applications Menu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _import_data(self): | |
persons = self.search([]) | |
for record in persons: | |
record.l10n_latam_identification_type_id.name = 'VAT' | |
rp_copy = record | |
rp_id = record.partner_id.id if record.partner_id else '' | |
rp = self.env['res.partner'].search([('id', '=', rp_id)]) | |
rp_copy.copy() | |
record.unlink() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyEmployee(model.Models): | |
_inherit = 'hr.employee | |
_name = 'MiModel' | |
primer_nombre = fields.Char() | |
segundo_nombre = fields.Char() | |
''' | |
Esto lo que hace es que crea una tabla nueva llamada MiModel en la base de datos | |
con todos los campos que tiene hr.employee y adicional le agrega los campos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuracion para git pull | |
git config pull.rebase false # hacer merge (estrategia por defecto) | |
git config pull.rebase true # aplicar rebase | |
git config pull.ff only # aplicar solo fast-forward | |
Command line instructions | |
You can also upload existing files from your computer using the instructions below. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# QWEB ODOO | |
https://www.realsystems.com.mx/en_US/blog/desarrollo-openerp-odoo-9/post/condicionantes-en-vistas-qweb-357 | |
https://www.cybrosys.com/blog/advanced-qweb-operations-in-odoo | |
https://github.com/odoo/odoo/blob/9.0/addons/website_sale/views/templates.xml#L1072-L1080 | |
https://www.odoo.com/es_ES/forum/ayuda-1/question/how-to-send-json-object-in-the-body-of-a-post-request-in-controller-141116 | |
NOTAS:USO DE VIM | |
http://www.sromero.org/wiki/linux/aplicaciones/manual_vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cuando algo no puedas reproducir localmente, puedes acceder al runbot por ssh como lo vimos en nuestra llamada así: | |
- https://youtu.be/_Yb9BjOCfMU | |
O puedes correr un travis2docker con tu nueva PR, con los siguientes parámetros: | |
t2d git@git.vauxoo.com:cotesma/cotesma.git pull/16 | |
./10-build.sh "--no-cache --pull" | |
./20-run.sh "--entrypoint=bash" | |
Ya estando dentro del container, lo tendrás reproducido corriendo: | |
/entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from public.directory_telephone where to_tsvector(name) @@ to_tsquery('morosini & paloma') union | |
select * from public.directory_telephone where to_tsvector(name) @@ to_tsquery('morosini <-> paloma') union | |
select * from public.directory_telephone where to_tsvector(street) @@ to_tsquery('morosini & paloma') union | |
select * from public.directory_telephone where to_tsvector(street) @@ to_tsquery('morosini <-> paloma') union | |
select * from public.directory_telephone where to_tsvector(phone) @@ to_tsquery('morosini & paloma') union | |
select * from public.directory_telephone where to_tsvector(phone) @@ to_tsquery('morosini <-> paloma') union | |
select * from public.directory_telephone where to_tsvector(name) @@ to_tsquery('morosini | paloma') union | |
select * from public.directory_telephone where to_tsvector(street) @@ to_tsquery('morosini | paloma') union | |
select * from public.directory_telephone where to_tsvector(phone) @@ to_tsquery('morosini | paloma') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sql = "select * from directory_telephone where to_tsvector(name) @@ to_tsquery('farmacia | norte');" | |
self._cr.execute(sql) | |
self._cr.fetchall() | |
# select * from public.directory_telephone where to_tsvector(name) @@ to_tsquery('farmacia | norte'); | |
# select * from public.directory_telephone where to_tsvector(name) @@ to_tsquery('farmacia & norte'); | |
# select * from public.directory_telephone where to_tsvector(street) @@ to_tsquery('farmacia | norte'); |
NewerOlder