Purpose ======= In the following views, add a bg-danger ribbon with label 'Archived' only visible when active=False: account.account_tag_view_form (account.account.tag) analytic.view_account_analytic_account_form (account.analytic.account) analytic.account_analytic_tag_form_view (account.analytic.tag) account_asset.view_account_asset_form (account.asset) account.view_account_position_form (account.fiscal.position) account.account_incoterms_form (account.incoterms) account.view_account_journal_form (account.journal) account.view_payment_term_form (account.payment.term) website_blog.view_blog_blog_form (blog.blog) website_blog.view_blog_post_form (blog.post) calendar.view_calendar_event_form (calendar.event) crm.crm_case_form_view_leads (crm.lead) crm.crm_case_form_view_oppor (crm.lead) crm.crm_lost_reason_view_form (crm.lost.reason) sales_team.crm_team_view_form (crm.team) documents.document_view_form (documents.document) event.view_event_form (event.event) website_event_track.view_event_track_form (event.track) fleet.fleet_vehicle_view_form (fleet.vehicle) fleet.fleet_vehicle_log_contract_view_form (fleet.vehicle.log.contract) website_forum.view_forum_forum_form (forum.forum) website_forum.view_forum_post_form (forum.post) gamification.badge_form_view (gamification.badge) helpdesk.helpdesk_sla_view_form (helpdesk.sla) helpdesk.helpdesk_team_view_form (helpdesk.team) helpdesk.helpdesk_ticket_view_form (helpdesk.ticket) hr_recruitment.hr_applicant_view_form (hr.applicant) hr_appraisal.view_hr_appraisal_form (hr.appraisal) hr_contract.hr_contract_view_form (hr.contract) hr.view_department_form (hr.department) hr.view_employee_form (hr.employee) hr.hr_employee_public_view_form (hr.employee.public) hr_holidays.edit_holiday_status_form (hr.leave.type) hr.hr_plan_view_form (hr.plan) hr_payroll.hr_salary_rule_form (hr.salary.rule) hr_work_entry.hr_work_entry_type_view_form (hr.work.entry.type) lunch.lunch_product_view_form (lunch.product) lunch.lunch_supplier_view_form (lunch.supplier) mail.mail_activity_type_view_form (mail.activity.type) mass_mailing.view_mail_mass_mailing_form (mail.mass_mailing) mass_mailing.view_mail_mass_mailing_list_form (mail.mass_mailing.list) maintenance.hr_equipment_view_form (maintenance.equipment) maintenance.maintenance_team_view_form (maintenance.team) marketing_automation.marketing_campaign_view_form (marketing.campaign) mrp.mrp_bom_form_view (mrp.bom) mrp_plm.mrp_eco_view_form (mrp.eco) mrp.mrp_routing_form_view (mrp.routing) mrp.mrp_workcenter_view (mrp.workcenter) point_of_sale.pos_config_view_form (pos.config) product.product_pricelist_view (product.pricelist) hr_expense.product_product_expense_form_view (product.product) product.product_variant_easy_edit_view (product.product) stock_landed_costs.view_stock_landed_cost_type_form (product.product) product.product_template_form_view (product.template) project_forecast.project_forecast_view_form (project.forecast) project.edit_project (project.project) project.view_task_form2 (project.task) industry_fsm_report.project_worksheet_template_view_form (project.worksheet.template) quality.quality_point_view_form (quality.point) base.view_res_bank_form (res.bank) base.view_partner_form (res.partner) base.view_users_form (res.users) sale_coupon.sale_coupon_program_view_form_common (sale.coupon.program) sale_management.sale_order_template_view_form (sale.order.template) sale_subscription.sale_subscription_alert_view_form (sale.subscription.alert) sale_subscription.sale_subscription_template_view_form (sale.subscription.template) sign.sign_request_view_form (sign.request) sign.sign_template_view_form (sign.template) website_slides.view_slide_channel_form (slide.channel) website_slides.view_slide_slide_form (slide.slide) stock.view_location_form (stock.location) stock.stock_location_route_form_view (stock.location.route) stock.view_picking_type_form (stock.picking.type) stock.view_stock_rule_form (stock.rule) stock.view_warehouse (stock.warehouse) stock.view_warehouse_orderpoint_form (stock.warehouse.orderpoint) survey.survey_form (survey.survey) website_crm_score.view_crm_score_form (website.crm.score) website_twitter_wall.website_twitter_wall_view_form (website.twitter.wall)
232 lines
13 KiB
XML
232 lines
13 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="view_account_position_form" model="ir.ui.view">
|
|
<field name="name">account.fiscal.position.form</field>
|
|
<field name="model">account.fiscal.position</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Fiscal Position">
|
|
<sheet>
|
|
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
|
<div class="oe_button_box" name="button_box"/>
|
|
<group>
|
|
<group>
|
|
<field name="active" invisible="1"/>
|
|
<field name="name"/>
|
|
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
|
</group>
|
|
<group>
|
|
<field name="auto_apply"/>
|
|
<field name="states_count" invisible="1"/>
|
|
<field name="vat_required" attrs="{'invisible': [('auto_apply', '!=', True)]}"/>
|
|
<field name="country_group_id" attrs="{'invisible': [('auto_apply', '!=', True)]}"/>
|
|
<field name="country_id" attrs="{'invisible': [('auto_apply', '!=', True)]}"/>
|
|
<field name="state_ids" widget="many2many_tags" domain="[('country_id', '=', country_id)]"
|
|
attrs="{'invisible': ['|', '|', ('auto_apply', '!=', True), ('country_id', '=', False), ('states_count', '=', 0)]}"/>
|
|
<label for="zip_from" string="Zip Range"
|
|
attrs="{'invisible': ['|', ('auto_apply', '!=', True), ('country_id', '=', False)]}"/>
|
|
<div attrs="{'invisible': ['|', ('auto_apply', '!=', True), ('country_id', '=', False)]}">
|
|
<span> From </span>
|
|
<field name="zip_from" class="oe_inline"/>
|
|
<div class="oe_edit_only"/>
|
|
<span> To </span>
|
|
<field name="zip_to" class="oe_inline"/>
|
|
</div>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page name="tax_mapping" string="Tax Mapping">
|
|
<group>
|
|
<field name="tax_ids" widget="one2many" nolabel="1" context="{'append_type_to_tax_name': True}">
|
|
<tree name="tax_map_tree" string="Tax Mapping" editable="bottom">
|
|
<field name="tax_src_id" domain="[('type_tax_use', '!=', None)]" context="{'append_type_to_tax_name': True}"/>
|
|
<field name="tax_dest_id" domain="[('type_tax_use', '!=', None)]" context="{'append_type_to_tax_name': True}"/>
|
|
</tree>
|
|
<form name="tax_map_form" string="Tax Mapping">
|
|
<group>
|
|
<field name="tax_src_id" domain="[('type_tax_use', '!=', None)]" context="{'append_type_to_tax_name': True}"/>
|
|
<field name="tax_dest_id" domain="[('type_tax_use', '!=', None)]" context="{'append_type_to_tax_name': True}"/>
|
|
</group>
|
|
</form>
|
|
</field>
|
|
</group>
|
|
</page>
|
|
<page name="account_mapping" string="Account Mapping" groups="account.group_account_user">
|
|
<group>
|
|
<field name="account_ids" widget="one2many" nolabel="1">
|
|
<tree string="Account Mapping" editable="bottom">
|
|
<field name="account_src_id"/>
|
|
<field name="account_dest_id"/>
|
|
</tree>
|
|
<form string="Account Mapping">
|
|
<field name="account_src_id"/>
|
|
<field name="account_dest_id"/>
|
|
</form>
|
|
</field>
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
<field name="note" placeholder="Legal Notes..."/>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="view_account_position_filter" model="ir.ui.view">
|
|
<field name="name">account.fiscal.position.filter</field>
|
|
<field name="model">account.fiscal.position</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Fiscal Positions">
|
|
<filter name="active" string="Archived" domain="[('active', '=', False)]"/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
<record id="view_account_position_tree" model="ir.ui.view">
|
|
<field name="name">account.fiscal.position.tree</field>
|
|
<field name="model">account.fiscal.position</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Fiscal Position">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="name"/>
|
|
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_open_partner_analytic_accounts" model="ir.actions.act_window">
|
|
<field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field>
|
|
<field name="name">Analytic Accounts</field>
|
|
<field name="res_model">account.analytic.account</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="partner_view_short_extra">
|
|
<field name="name">partner.short.view.account</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_partner_short_form" />
|
|
<field name="priority" eval="20"/>
|
|
<field name="arch" type="xml">
|
|
<field name="email" position="after">
|
|
<field name="company_id" invisible="1"/>
|
|
<field name="property_payment_term_id" widget="selection"/>
|
|
<field name="property_account_position_id" options="{'no_create': True, 'no_open': True}"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
<record model="ir.ui.view" id="partner_view_buttons">
|
|
<field name="name">partner.view.buttons</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_partner_form" />
|
|
<field name="priority" eval="11"/>
|
|
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
|
|
<field name="arch" type="xml">
|
|
<div name="button_box" position="inside">
|
|
<button type="object" class="oe_stat_button" icon="fa-pencil-square-o" name="action_view_partner_invoices"
|
|
attrs="{'invisible': [('customer', '=', False)]}" context="{'default_partner_id': active_id}">
|
|
<div class="o_form_field o_stat_info">
|
|
<span class="o_stat_value">
|
|
<field name="total_invoiced" widget='monetary' options="{'currency_field': 'currency_id'}"/>
|
|
</span>
|
|
<span class="o_stat_text">Invoiced</span>
|
|
</div>
|
|
</button>
|
|
</div>
|
|
|
|
<page name="internal_notes" position="inside">
|
|
<group colspan="2" col="2" groups="account.group_warning_account">
|
|
<separator string="Warning on the Invoice" colspan="4"/>
|
|
<field name="invoice_warn" nolabel="1" />
|
|
<field name="invoice_warn_msg" colspan="3" nolabel="1"
|
|
attrs="{'required':[('invoice_warn', '!=', False), ('invoice_warn','!=','no-message')],'readonly':[('invoice_warn','=','no-message')]}"/>
|
|
</group>
|
|
</page>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="partner_view_button_contracts_count">
|
|
<field name="name">partner.view.button.contracts_count</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_partner_form" />
|
|
<field name="priority" eval="14"/>
|
|
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
|
|
<field name="arch" type="xml">
|
|
<div name="button_box" position="inside">
|
|
<button class="oe_stat_button" type="action" name="%(account.action_open_partner_analytic_accounts)d"
|
|
groups="account.group_account_invoice"
|
|
icon="fa-book" title="Analytic Accounts" attrs="{'invisible': [('contracts_count', '=', 0)]}">
|
|
<field string="Analytic Accounts" name="contracts_count" widget="statinfo"/>
|
|
</button>
|
|
</div>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_account_fiscal_position_form" model="ir.actions.act_window">
|
|
<field name="name">Fiscal Positions</field>
|
|
<field name="res_model">account.fiscal.position</field>
|
|
<field name="view_mode">tree,kanban,form</field>
|
|
<field name="search_view_id" ref="view_account_position_filter"/>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Create a new fiscal position
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<menuitem
|
|
action="action_account_fiscal_position_form"
|
|
id="menu_action_account_fiscal_position_form"
|
|
parent="account_account_menu" sequence="3"/>
|
|
|
|
<!--
|
|
Partners Extension
|
|
-->
|
|
|
|
<record id="view_partner_property_form" model="ir.ui.view">
|
|
<field name="name">res.partner.property.form.inherit</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="priority">2</field>
|
|
<field name="inherit_id" ref="base.view_partner_form"/>
|
|
<field name="groups_id" eval="[(5,)]"/>
|
|
<field name="arch" type="xml">
|
|
<page name="sales_purchases" position="after">
|
|
<page string="Invoicing" name="accounting" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}" groups="account.group_account_invoice">
|
|
<group>
|
|
<group string="Bank Accounts" name="banks" groups="account.group_account_invoice">
|
|
<field name="bank_ids" nolabel="1">
|
|
<tree editable="bottom">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="bank_id"/>
|
|
<field name="acc_number"/>
|
|
<field name="acc_holder_name" invisible="1"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
<group string="Accounting Entries" name="accounting_entries" groups="account.group_account_user">
|
|
<field name="currency_id" invisible="1"/>
|
|
<field name="property_account_receivable_id"/>
|
|
<field name="property_account_payable_id"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
<page string="Invoicing" name="accounting_disabled" attrs="{'invisible': ['|',('is_company','=',True),('parent_id','=',False)]}" groups="account.group_account_invoice">
|
|
<div>
|
|
<p>Accounting-related settings are managed on <button name="open_commercial_entity" type="object" string="the parent company" class="oe_link"/></p>
|
|
</div>
|
|
</page>
|
|
</page>
|
|
<xpath expr="//group[@name='misc']" position="before">
|
|
<group string="Fiscal Information" name="fiscal_information" priority="5" groups="account.group_account_invoice">
|
|
<field name="property_account_position_id" options="{'no_create': True, 'no_open': True}"/>
|
|
</group>
|
|
</xpath>
|
|
<group name="sale" position="inside">
|
|
<field string="Payment Terms" name="property_payment_term_id" widget="selection" groups="account.group_account_invoice" attrs="{'invisible': [('customer','=', False)]}"/>
|
|
</group>
|
|
<group name="purchase" position="inside">
|
|
<field string="Payment Terms" name="property_supplier_payment_term_id" widget="selection" groups="account.group_account_invoice" attrs="{'invisible': [('supplier','=', False)]}"/>
|
|
</group>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo>
|