Skip to content

Instantly share code, notes, and snippets.

View danypr92's full-sized avatar

Daniel Palomar Rodríguez danypr92

View GitHub Profile
@danypr92
danypr92 / intruction_to_install.md
Last active December 29, 2021 04:35
Odoo Base Modules List
  1. sysadmins & provisioning

  2. Change to Odoo user: sudo su odoo

  3. Activate virtualenv:

source /opt/.odoo_venv/bin/activate

  1. Install the requeriments.txt in the virtualenv:
@danypr92
danypr92 / error_decode.md
Last active July 12, 2018 12:28
Error decode Tryton Electronic Mail Wizard
ERROR:tryton.common.common:Traceback (most recent call last):
  File "/trytond/protocols/jsonrpc.py", line 170, in _marshaled_dispatch
    response['result'] = dispatch_method(method, params)
  File "/trytond/protocols/jsonrpc.py", line 206, in _dispatch
    res = dispatch(*args)
  File "/trytond/protocols/dispatcher.py", line 185, in dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/wizard/wizard.py", line 275, in execute
    return wizard._execute(state_name)
@danypr92
danypr92 / question.md
Created July 12, 2018 13:08
Genshi Templates and Babel Date format

Tenemos un template que incluye una fecha y la queremos localizada (con: dia de la semana, dia mes).

Template:

La portabilidad de la línea se llevará a cabo ${record.sim_activation_date_localized} de 2:00h a 6:00h de la madrugada.

Código Python:

# Query with the domain: [('partner_number', '=', "")]
SELECT
"a"."id" AS "id",
"a"."comment" AS "comment",
"a"."code" AS "code",
"a"."create_date" AS "create_date",
"a"."write_uid" AS "write_uid",
"a"."create_uid" AS "create_uid",
"a"."first_name" AS "first_name",
@danypr92
danypr92 / SEPA_configuration.md
Created August 28, 2018 12:13
Odoo SEPA Direct Debit Configuration

Configuration SEPA Direct Debit in Odoo 11

The sepa direct pay in Odoo is part of Enterprise packages. We have installed a OCA module to cover the SEPA mandate creation/exportation: Account Banking SEPA Direct Debit.

Configuration

For setting the SEPA creditor identifier:

@danypr92
danypr92 / celery-tryton-problems.md
Created September 4, 2018 11:52
Pruebas con celery-tryton

Try celery-tryton 0.3

  • My tasks file:
  from celery import Celery
  from celery_tryton import TrytonTask
  from trytond.transaction import Transaction
  
  celery = Celery('tryton')
  celery.conf.TRYTON_DATABASE = 'tryton'                                                                                              
@danypr92
danypr92 / logstash_tryton_filter.md
Last active September 7, 2018 09:50
Logstash filter to mapping the Tryton Log

Logstash filter to Tryton Log

We need a filter to map the Tryton log to monitoring it from ELK.

Tryton log pattern:

format = %(process)d - [%(asctime)s] %(levelname)s:%(name)s:%(message)s
datefmt = %a %b %d %H:%M:%S %Y

Tryton log example:

@danypr92
danypr92 / somconnexio_pull_request_release_template.md
Created September 27, 2018 10:46
SomConnexió Pull Request Template for releases

Title

PR Merged

@danypr92
danypr92 / lock_queries.md
Created November 23, 2018 16:04
Com busquem les queries que estan blocant el sistema?

Búsqueda de queries més que bloquejen el sistema

Per trobar quina query s'esta executant en aquest moment?

SELECT * FROM pg_stat_activity WHERE state = 'active';

Matar queries per PID

@danypr92
danypr92 / gist:5d7e79cbb6f2494eb11cf773dbeb2879
Created September 9, 2019 10:47
XML invoicing script...
package org.meveo.service.script;\n\nimport java.io.File;\nimport java.lang.Double;\nimport java.math.BigDecimal;\nimport java.math.RoundingMode;\nimport java.util.ArrayList;\nimport java.util.Date;\nimport java.util.List;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport java.util.concurrent.TimeUnit;\nimport java.text.DateFormat;\nimport java.text.SimpleDateFormat;\n\nimport org.meveo.admin.exception.BusinessException;\nimport org.meveo.commons.utils.ParamBeanFactory;\nimport org.meveo.commons.utils.ParamBean;\nimport org.meveo.commons.utils.PersistenceUtils;\nimport org.meveo.model.crm.Provider;\nimport org.meveo.model.admin.Seller;\nimport org.meveo.model.ICustomFieldEntity;\nimport org.meveo.model.admin.User;\nimport org.meveo.model.billing.BankCoordinates;\nimport org.meveo.model.billing.Invoice;\nimport org.meveo.model.billing.RatedTransaction;\nimport org.meveo.model.billing.ServiceInstance;\nimport org.meveo.model.billing.Subscription;\nimport org.meveo.model.billing.WalletOperation;\nimpor