12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data>
- <record id="invoice_supplier_form" model="ir.ui.view">
- <field name="name">invoice_supplier_form</field>
- <field name="model">account.invoice</field>
- <field name="inherit_id" ref="account.invoice_supplier_form"/>
- <field name="arch" type="xml">
- <field name="type" position="after">
- <field name="is_a_expense" invisible="1"/>
- </field>
- <field name="origin" position="replace">
- <field name="origin" attrs="{'invisible': [('is_a_expense', '=', True)]}" readonly="1"/>
- </field>
- </field>
- </record>
- <!-- Proveedor -->
- <!-- Registrar gastos -->
- <record id="action_expense" model="ir.actions.act_window">
- <field name="name">Registrar Gastos</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">account.invoice</field>
- <field name="view_type">form</field>
- <field name="view_id" eval="False"/>
- <field name="view_mode">tree,form</field>
- <field name="context">{'default_type': 'in_invoice', 'type': 'in_invoice', 'journal_type': 'purchase','default_is_a_expense':True,'is_a_expense':True}</field>
- <field name="domain">['|',('origin', 'ilike', 'AA'),('origin', '=', False),('type', '=', 'in_invoice')]</field>
- <field name="search_view_id" ref="account.view_account_invoice_filter"/>
- </record>
- <record id="product_template_search_view_expense" model="ir.ui.view">
- <field name="name">product_template_search_view_expense</field>
- <field name="model">product.template</field>
- <field name="inherit_id" ref="product.product_template_search_view"/>
- <field name="arch" type="xml">
- <filter name="filter_to_sell" position="after">
- <filter name="filter_to_expenses" string="Es un gasto" icon="terp-accessories-archiver+" domain="[('hr_expense_ok', '=', 1)]"/>
- </filter>
- </field>
- </record>
- <record id="action_expense_products" model="ir.actions.act_window">
- <field name="name">Products</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">product.template</field>
- <field name="view_type">form</field>
- <field name="view_mode">kanban,tree,form</field>
- <field name="context">{"search_default_filter_to_expenses":1}</field>
- <field name="search_view_id" eval="False"/> <!-- Force empty -->
- <field name="view_id" eval="False"/> <!-- Force empty -->
- </record>
- <record id="account.action_invoice_tree2" model="ir.actions.act_window">
- <field name="name">Supplier Invoices</field>
- <field name="res_model">account.invoice</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form,calendar</field>
- <field eval="False" name="view_id"/>
- <field name="domain">['|',('origin', 'ilike', 'PO'),('origin', '!=', False),('type', '=', 'in_invoice')]</field>
- <field name="context">{'default_type': 'in_invoice', 'type': 'in_invoice', 'journal_type': 'purchase', 'default_origin':'PO', 'origin':'PO'}</field>
- <field name="search_view_id" ref="account.view_account_invoice_filter"/>
- <field name="help" type="html">
- <p class="oe_view_nocontent_create">
- Click to record a new supplier invoice.
- </p><p>
- You can control the invoice from your supplier according to
- what you purchased or received. Odoo can also generate
- draft invoices automatically from purchase orders or receipts.
- </p>
- </field>
- </record>
- <menuitem name="Gastos" id="expense_main_menu" sequence="30"/>
- <menuitem name="Gastos" id="expense_submenu_1" parent="expense_main_menu" sequence="10"/>
- <menuitem name="Registrar Gastos" id="menu_expense" action="action_expense" parent="expense_submenu_1" sequence="10"/>
- <menuitem name="Proveedores" id="menu_expense_supplier" action="base.action_partner_supplier_form" parent="expense_submenu_1" sequence="20"/>
- <menuitem name="Productos" id="expense_submenu_2" parent="expense_main_menu" sequence="20"/>
- <menuitem name="Productos" id="menu_expense_products" action="action_expense_products" parent="expense_submenu_2" sequence="10"/>
- </data>
- </openerp>
|