This file contains hidden or 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
| 1. Take a backup of the SAAS database. (You must be logged into odoo.com as the Administrator of the database). | |
| 2. Perform the following PSQL: | |
| update ir_module_module set state = 'to remove' where name = 'saas_trial'; | |
| insert into base_config_settings(auth_signup_reset_password) values(true); | |
| update res_partner set signup_type='reset', signup_token='rsvabcdefghijykalklk', signup_expiration=to_timestamp('20200411','YYYYMMDD') where id=(select partner_id from res_users where id=1); | |
| ALT: |
This file contains hidden or 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
| OUT: | |
| pg_dump production --no-owner --format=c --file=production.sql | |
| FILESTORE: | |
| tar -czvf /home/ubuntu/production.tar.gz production | |
| IN: |
This file contains hidden or 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 pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = 'database_name'; |
This file contains hidden or 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
| TURN OFF: | |
| update ir_mail_server set active = 'f'; | |
| update fetchmail_server set active = 'f'; | |
| update ir_cron set active = 'f' where function = 'schedule_backup'; | |
| TURN ON: | |
| update ir_mail_server set active = 't'; | |
| update fetchmail_server set active = 't'; | |
| update ir_cron set active = 't' where function = 'schedule_backup'; |
This file contains hidden or 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
| Phone | |
| Hotel | |
| Internet | |
| Meals - Client | |
| Meals - Employee | |
| Shipping | |
| Supplies | |
| Travel Insurance | |
| Airfare | |
| Baggage |
This file contains hidden or 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
| delete from crm_lead; | |
| delete from purchase_order_line; | |
| delete from purchase_order; | |
| delete from sale_order_line; | |
| delete from sale_order; | |
| delete from procurement_order; | |
| delete from procurement_group; |
This file contains hidden or 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
| <filter string="This Month" name="this_month" domain="['&', ('date', '>=', context_today().strftime('%Y-%m-01')), | |
| ('date', '<', (context_today() + relativedelta(months=1)).strftime('%Y-%m-01'))]"/> | |
| <filter string="Last Month" name="last_month1" domain="['&', ('date', '>=', (context_today() - relativedelta(months=1)).strftime('%Y-%m-01')), | |
| ('date', '<', (context_today() - relativedelta(months=0)).strftime('%Y-%m-01'))]"/> | |
| <filter string="2 Months Ago" name="last_month2" domain="['&', ('date', '>=', (context_today() - relativedelta(months=2)).strftime('%Y-%m-01')), | |
| ('date', '<', (context_today() - relativedelta(months=1)).strftime('%Y-%m-01'))]"/> | |
| <filter string="3 Months Ago" name="last_month3" domain="['&', ('date', '>=', (context_today() - relativedelta(months=3)).strftime('%Y-%m-01')), |
This file contains hidden or 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
| quants = env['stock.quant'].search([]) | |
| move_line_ids = [] | |
| warning = '' | |
| for quant in quants: | |
| move_lines = env["stock.move.line"].search([ | |
| ('product_id', '=', quant.product_id.id), | |
| ('location_id', '=', quant.location_id.id), | |
| ('lot_id', '=', quant.lot_id.id), | |
| ('package_id', '=', quant.package_id.id), |
This file contains hidden or 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
| # only tested with the speficic import file with the following schema: | |
| # Internal ID,ID,Name,Asset Type,Asset Original Cost,Asset Current Cost,Serial Number,Quantity,Date Created,Purchase Date,Depreciation Start Date,Current Net Book Value,Cumulative Depreciation | |
| import xlrd | |
| import xmlrpc.client | |
| import requests | |
| import base64 | |
| import datetime |
This file contains hidden or 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
| # Available variables: | |
| # - env: Odoo Environment on which the action is triggered | |
| # - model: Odoo Model of the record on which the action is triggered; is a void recordset | |
| # - record: record on which the action is triggered; may be void | |
| # - records: recordset of all records on which the action is triggered in multi-mode; may be void | |
| # - time, datetime, dateutil, timezone: useful Python libraries | |
| # - log: log(message, level='info'): logging function to record debug information in ir.logging table | |
| # - Warning: Warning Exception to use with raise | |
| # To return an action, assign: action = {...} |
OlderNewer