123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data>
- <record model="ir.ui.view" id="import_cost_form">
- <field name="name">import_cost_form</field>
- <field name="model">import.cost</field>
- <field name="arch" type="xml">
- <form string="Import">
- <header>
- <div class="import_cost_button" style="position:absolute"></div>
- <field name="state" widget="statusbar" statusbar_visible="draft,approved" statusbar_colors='{"draft":"red","approved":"blue"}'/>
- </header>
- <sheet>
- <h1>
- <label string="Importación "/>
- <field name="name" class="oe_inline" readonly="1"/>
- </h1>
- <group>
- <group>
- <field name="date"/>
- <field name="customs_broker"/>
- <field name="customs_clearance"/>
- <field name="note"/>
- </group>
- <group>
- <field name="product_qty" readonly="1"/>
- <field name="currency_id"/>
- <field name="weight" readonly="1"/>
- <field name="created_by" readonly="1"/>
- <field name="approved_by" readonly="1"/>
- </group>
- </group>
- <group string="Facturas de compras"></group>
- <group>
- <field name="purchases" nolabel="1" attrs="{'readonly': [('state','=', 'approved')]}">
- <tree string="Detalles" editable="bottom" >
- <field name="purchase_id" domain="['|',('origin', 'ilike', 'PO'),('origin', '!=', False),('type', '=', 'in_invoice'),('state','=','paid')]"/>
- <field name="product_qty" readonly="1"/>
- <field name="purchase_subtotal"/>
- <field name="purchase_taxes"/>
- <field name="purchase_total"/>
- </tree>
- </field>
- </group>
- <group class="oe_subtotal_footer" colspan="2" style="float:right; margin-right:10px !important">
- <field name="purchases_subtotal" widget='monetary'/>
- <field name="purchases_taxes" widget='monetary'/>
- <div class="oe_subtotal_footer_separator oe_inline">
- <label for="purchases_total"/>
- <button name="button_dummy"
- states="draft" string="Actualizar" type="object" class="oe_edit_only oe_link"/>
- </div>
- <field name="purchases_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary'/>
- </group>
- <group string="Facturas de gastos"></group>
- <group>
- <field name="expenses" nolabel="1" attrs="{'readonly': [('state','=', 'approved')]}">
- <tree string="Detalles" editable="bottom" >
- <field name="expense_id" domain="['|',('origin', 'ilike', 'AA'),('origin', '=', False),('type', '=', 'in_invoice'),('state','=','paid')]"/>
- <field name="expense_subtotal"/>
- <field name="expense_taxes"/>
- <field name="expense_total"/>
- </tree>
- </field>
- </group>
- <group class="oe_subtotal_footer" colspan="2" style="float:right; margin-right:10px !important">
- <field name="expenses_subtotal" widget='monetary' />
- <field name="expenses_taxes" widget='monetary' />
- <div class="oe_subtotal_footer_separator oe_inline">
- <label for="expenses_total"/>
- <button name="button_dummy"
- states="draft,sent" string="Actualizar" type="object" class="oe_edit_only oe_link"/>
- </div>
- <field name="expenses_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary'/>
- </group>
- </sheet>
- </form>
- </field>
- </record>
- <record model="ir.ui.view" id="import_cost_tree">
- <field name="name">import_cost_tree</field>
- <field name="model">import.cost</field>
- <field name="arch" type="xml">
- <tree string="Import Cost Tree" colors="grey:state=='draft';blue:state=='approved'">
- <field name="name" />
- <field name="date" />
- <field name="purchases_total" string="Total compra"/>
- <field name="expenses_total" string="Total gasto"/>
- <field name="factor" />
- <field name="state" />
- </tree>
- </field>
- </record>
- <record model="ir.actions.act_window" id="action_import_cost">
- <field name="name">Gastos de Importación</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">import.cost</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- </record>
- <menuitem name="Importación" id="import_main_menu" parent="expense_menu.expense_main_menu" sequence="20" />
- <menuitem name="Gastos de Importación" id="import_submenu_1" parent="import_main_menu" action="action_import_cost" />
- </data>
- </openerp>
|