Config Parameters
Common options
CLI Commands | In Configuration | Description |
---|
Config Parameters
Common options
CLI Commands | In Configuration | Description |
---|
#!/bin/bash | |
# Based on: | |
# https://github.com/Powerlevel9k/powerlevel9k/wiki/Install-Instructions | |
# https://github.com/ohmyzsh/ohmyzsh | |
# https://powerline.readthedocs.io/en/latest/installation/linux.html#fonts-installation | |
# https://gist.github.com/dogrocker/1efb8fd9427779c827058f873b94df95 | |
# https://linuxhint.com/install_zsh_shell_ubuntu_1804/ | |
echo "*********************************************" | |
echo " zsh fancifier" |
Update System
sudo apt-get update
sudo apt-get upgrade
Secure Server
sudo apt-get install openssh-server fail2ban
def generate_report(self): | |
try: | |
vals = json.loads(self.filters) | |
except: | |
raise UserError(_("Please select filters for the report.")) | |
today = fields.Date.today() | |
if self.report_date == 'previous': | |
date = fields.Date.subtract(today, days=1) | |
vals['start_date'] = vals['end_date'] = fields.Date.to_string(date) | |
elif self.report_date == 'week': |
/** @odoo-module **/ | |
import { registry } from "@web/core/registry"; | |
import { KeepLast } from "@web/core/utils/concurrency"; | |
import { useService } from "@web/core/utils/hooks"; | |
import { XMLParser } from "@web/core/utils/xml"; | |
import { Model, useModel } from "@web/views/helpers/model"; | |
import { ViewLayout } from "@web/views/view_layout"; | |
// ----------------------------------------------------------------------------- |
def generate_report(self): | |
report = self.env[self.report_id.model].create(json.loads(self.filters)) | |
report.get_values() | |
pdf_data = report.print_pdf() | |
domain = [('model', '=', 'ir.actions.report'), ('res_id', '=', self.report_id.id)] | |
model_data = self.env['ir.model.data'].search(domain, limit=1) | |
xml_id = "%s.%s" % (model_data.module, model_data.name) | |
report_template_id = self.env.ref( | |
'averigo_transaction_report.report_transaction_list_report').render_qweb_pdf(report.id, data = pdf_data['data']) | |
data_record = base64.b64encode(report_template_id[0]) |