import_cost_calculation.xml 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="import_cost_form">
  5. <field name="name">import_cost_form</field>
  6. <field name="model">import.cost</field>
  7. <field name="arch" type="xml">
  8. <form string="Import">
  9. <header>
  10. <div class="import_cost_button" style="position:absolute"></div>
  11. <field name="state" widget="statusbar" statusbar_visible="draft,approved" statusbar_colors='{"draft":"red","approved":"blue"}'/>
  12. </header>
  13. <sheet>
  14. <h1>
  15. <label string="Importación "/>
  16. <field name="name" class="oe_inline" readonly="1"/>
  17. </h1>
  18. <group>
  19. <field name="date"/>
  20. <field name="created_by" readonly="1"/>
  21. <field name="approved_by" readonly="1"/>
  22. </group>
  23. <group string="Facturas de compras"></group>
  24. <group>
  25. <field name="purchases" nolabel="1" attrs="{'readonly': [('state','=', 'approved')]}">
  26. <tree string="Detalles" editable="bottom" >
  27. <field name="purchase_id" domain="[('type', '=', 'in_invoice')]"/>
  28. <field name="purchase_subtotal"/>
  29. <field name="purchase_taxes"/>
  30. <field name="purchase_total"/>
  31. </tree>
  32. </field>
  33. </group>
  34. <group class="oe_subtotal_footer" colspan="2" style="float:right; margin-right:10px !important">
  35. <field name="purchases_subtotal" widget='monetary'/>
  36. <field name="purchases_taxes" widget='monetary'/>
  37. <div class="oe_subtotal_footer_separator oe_inline">
  38. <label for="purchases_total"/>
  39. </div>
  40. <field name="purchases_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary'/>
  41. </group>
  42. <group string="Facturas de gastos"></group>
  43. <group>
  44. <field name="expenses" nolabel="1" attrs="{'readonly': [('state','=', 'approved')]}">
  45. <tree string="Detalles" editable="bottom" >
  46. <field name="expense_id" domain="[('type', '=', 'in_invoice')]"/>
  47. <field name="expense_subtotal"/>
  48. <field name="expense_taxes"/>
  49. <field name="expense_total"/>
  50. </tree>
  51. </field>
  52. </group>
  53. <group class="oe_subtotal_footer" colspan="2" style="float:right; margin-right:10px !important">
  54. <field name="expenses_subtotal" widget='monetary' />
  55. <field name="expenses_taxes" widget='monetary' />
  56. <div class="oe_subtotal_footer_separator oe_inline">
  57. <label for="expenses_total"/>
  58. </div>
  59. <field name="expenses_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary'/>
  60. </group>
  61. </sheet>
  62. </form>
  63. </field>
  64. </record>
  65. <record model="ir.ui.view" id="import_cost_tree">
  66. <field name="name">import_cost_tree</field>
  67. <field name="model">import.cost</field>
  68. <field name="arch" type="xml">
  69. <tree string="Import Cost Tree" colors="grey:state=='draft';blue:state=='approved'">
  70. <field name="name" />
  71. <field name="date" />
  72. <field name="purchases_total" string="Total compra"/>
  73. <field name="expenses_total" string="Total gasto"/>
  74. <field name="factor" />
  75. <field name="state" />
  76. </tree>
  77. </field>
  78. </record>
  79. <record model="ir.actions.act_window" id="action_import_cost">
  80. <field name="name">Gastos de Importación</field>
  81. <field name="type">ir.actions.act_window</field>
  82. <field name="res_model">import.cost</field>
  83. <field name="view_type">form</field>
  84. <field name="view_mode">tree,form</field>
  85. </record>
  86. <menuitem name="Importación" id="import_main_menu" parent="expense_menu.expense_main_menu" sequence="20" />
  87. <menuitem name="Gastos de Importación" id="import_submenu_1" parent="import_main_menu" action="action_import_cost" />
  88. </data>
  89. </openerp>