I hereby claim:
- I am oerp-odoo on github.
- I am andriusl (https://keybase.io/andriusl) on keybase.
- I have a public key ASCl2vbdquiVcHo_odMUiXWbWGt4ElLUaVGhkOLLqdhXFAo
To claim this, I am signing this object:
| #!/usr/bin/env python3 | |
| """Install/update/uninstall specified odoo module.""" | |
| import odoorpc | |
| import argparse | |
| USER = 'admin' | |
| PASSWORD = 'admin' | |
| HOST = '127.0.0.1' | |
| PORT = '8069' |
I hereby claim:
To claim this, I am signing this object:
| # flake8: noqa | |
| """ | |
| This module must be run when Odoo environment is started using shell, otherwise variables won't be recognized. | |
| """ | |
| # Models. | |
| StockLocation = env['stock.location'] | |
| StockQuant = env['stock.quant'] | |
| IrModelData = env['ir.model.data'] | |
| # Locations to do transfer. |
To remove a submodule you need to:
| (?<=name="name">)(.*)(?=<) | |
| Would match content inside tags like (would match "some content"): | |
| <field name="name">some content</field> |
| # python3 odoo-bin shell -c odoo.conf -d <database> | |
| model = env['some.model'] | |
| env.add_todo(model._fields['field_name'], model.search([])) | |
| model.recompute() | |
| env.cr.commit() |
| git submodule update --recursive --remote --merge --init |
| @http.route('/web/excel.report/xls', type='http', auth="user") | |
| def download_xls_report(self, model, id): | |
| """Handle download for XLS reports.""" | |
| # Prepare report wizard | |
| Model = request.registry[model] | |
| cr, uid, context = request.cr, request.uid, request.context | |
| id = int(id) | |
| wizard = Model.browse(cr, uid, id, context=context) | |
| # Get filename | |
| filename = wizard.get_filename() |