Files
odoo_source/addons/hr_expense/views/res_config_settings_views.xml
T
IEL 3c7694b409 [FIX] *: fix image parsing error on saving res config
WHAT: apply 93a7695f65baf00d1f82481d6a2a97e6c11940a8 for all res.config.settings
menus

WHY: the same reason as in 93a7695f65baf00d1f82481d6a2a97e6c11940a8:

	When saving, a read is called. By default, read has
	bin_size to true to avoid performances issues.
	It will return the image size instead of the content

it may lead to image dissapearing or "Incorrect padding" error

HOW:

    find . -iname "*.xml"|xargs grep "\"context\".*'module'" -l | xargs sed -i "s/\(\"context\".*'module'.*\)\}/\1, 'bin_size': False}/"
    git checkout  -- addons/base_setup/views/res_config_settings_views.xml

---

PR for General Settings: https://github.com/odoo/odoo/pull/47297

opw-2346644

closes odoo/odoo#61215

X-original-commit: 7c55efa88b72bd1f3f0f32f7f738e2fda5aa4abd
Related: odoo/enterprise#14547
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-11-02 18:25:20 +00:00

82 lines
5.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.hr.expense</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="85"/>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[hasclass('settings')]" position="inside">
<div class="app_settings_block" data-string="Expenses" string="Expenses" data-key="hr_expense" groups="hr_expense.group_hr_expense_manager">
<h2>Expenses</h2>
<div class="row mt16 o_settings_container" name="expenses_setting_container">
<div class="col-xs-12 col-md-6 o_setting_box"
id="create_expense_setting"
title="Send an email to this email alias with the receipt in attachment to create an expense in one click. If the first word of the mail subject contains the product's internal reference or the product name, the corresponding product will automatically be set. Type the expense amount in the mail subject to set it on the expense too.">
<div class="o_setting_left_pane">
<field name="use_mailgateway"/>
</div>
<div class="o_setting_right_pane">
<label string="Incoming Emails" for="use_mailgateway"/>
<div class="text-muted">
Create expenses from incoming emails
</div>
<div class="content-group" attrs="{'invisible': ['|', ('use_mailgateway', '=', False), ('alias_domain', 'in', ['localhost', '', False])]}">
<div class="mt16">
<label for="expense_alias_prefix" string="Alias" class="o_light_label"/>
<field name="expense_alias_prefix" class="oe_inline"/>
<span>@</span>
<field name="alias_domain" class="oe_inline" readonly="1" force_save="1"/>
</div>
</div>
<div class="content-group" attrs="{'invisible': ['|', ('use_mailgateway', '=', False), ('alias_domain', 'not in', ['localhost', '', False])]}">
<div class="mt16">
<button type="action" name="base_setup.action_general_configuration" icon="fa-arrow-right" string="Setup your domain alias" class="btn-link"/>
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-12 o_setting_box" id="hr_payroll_accountant">
<div class="o_setting_left_pane">
<field name="module_hr_payroll_expense" widget="upgrade_boolean"/>
</div>
<div class="o_setting_right_pane">
<label for="module_hr_payroll_expense" string="Reimburse in Payslip"/>
<div class="text-muted">
Reimburse expenses in payslips
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box" title="use OCR to fill data from a picture of the bill">
<div class="o_setting_left_pane">
<field name="module_hr_expense_extract" widget="upgrade_boolean"/>
</div>
<div class="o_setting_right_pane" id="expense_extract_settings">
<label string="Expense Digitalization (OCR)" for="module_hr_expense_extract"/>
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific."/>
<div class="text-muted">
Digitalize your receipts with OCR and Artificial Intelligence
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
<record id="action_hr_expense_configuration" model="ir.actions.act_window">
<field name="name">Settings</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.config.settings</field>
<field name="view_mode">form</field>
<field name="target">inline</field>
<field name="context">{'module' : 'hr_expense', 'bin_size': False}</field>
</record>
<menuitem id="menu_hr_expense_global_settings" name="Settings"
parent="menu_hr_expense_configuration" sequence="0" action="action_hr_expense_configuration" groups="base.group_system"/>
</data>
</odoo>