import_cost_calculation.xml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. <group>
  20. <field name="date"/>
  21. <field name="customs_broker"/>
  22. <field name="customs_clearance"/>
  23. <field name="note"/>
  24. </group>
  25. <group>
  26. <field name="product_qty"/>
  27. <field name="currency_id"/>
  28. <field name="weight" readonly="1"/>
  29. <field name="created_by" readonly="1"/>
  30. <field name="approved_by" readonly="1"/>
  31. </group>
  32. </group>
  33. <group string="Facturas de compras"></group>
  34. <group>
  35. <field name="purchases" nolabel="1" attrs="{'readonly': [('state','=', 'approved')]}">
  36. <tree string="Detalles" editable="bottom" >
  37. <field name="purchase_id" domain="[('type', '=', 'in_invoice')]"/>
  38. <field name="purchase_subtotal"/>
  39. <field name="purchase_taxes"/>
  40. <field name="purchase_total"/>
  41. </tree>
  42. </field>
  43. </group>
  44. <group class="oe_subtotal_footer" colspan="2" style="float:right; margin-right:10px !important">
  45. <field name="purchases_subtotal" widget='monetary'/>
  46. <field name="purchases_taxes" widget='monetary'/>
  47. <div class="oe_subtotal_footer_separator oe_inline">
  48. <label for="purchases_total"/>
  49. </div>
  50. <field name="purchases_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary'/>
  51. </group>
  52. <group string="Facturas de gastos"></group>
  53. <group>
  54. <field name="expenses" nolabel="1" attrs="{'readonly': [('state','=', 'approved')]}">
  55. <tree string="Detalles" editable="bottom" >
  56. <field name="expense_id" domain="[('type', '=', 'in_invoice')]"/>
  57. <field name="expense_subtotal"/>
  58. <field name="expense_taxes"/>
  59. <field name="expense_total"/>
  60. </tree>
  61. </field>
  62. </group>
  63. <group class="oe_subtotal_footer" colspan="2" style="float:right; margin-right:10px !important">
  64. <field name="expenses_subtotal" widget='monetary' />
  65. <field name="expenses_taxes" widget='monetary' />
  66. <div class="oe_subtotal_footer_separator oe_inline">
  67. <label for="expenses_total"/>
  68. </div>
  69. <field name="expenses_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary'/>
  70. </group>
  71. </sheet>
  72. </form>
  73. </field>
  74. </record>
  75. <record model="ir.ui.view" id="import_cost_tree">
  76. <field name="name">import_cost_tree</field>
  77. <field name="model">import.cost</field>
  78. <field name="arch" type="xml">
  79. <tree string="Import Cost Tree" colors="grey:state=='draft';blue:state=='approved'">
  80. <field name="name" />
  81. <field name="date" />
  82. <field name="purchases_total" string="Total compra"/>
  83. <field name="expenses_total" string="Total gasto"/>
  84. <field name="factor" />
  85. <field name="state" />
  86. </tree>
  87. </field>
  88. </record>
  89. <record model="ir.actions.act_window" id="action_import_cost">
  90. <field name="name">Gastos de Importación</field>
  91. <field name="type">ir.actions.act_window</field>
  92. <field name="res_model">import.cost</field>
  93. <field name="view_type">form</field>
  94. <field name="view_mode">tree,form</field>
  95. </record>
  96. <menuitem name="Importación" id="import_main_menu" parent="expense_menu.expense_main_menu" sequence="20" />
  97. <menuitem name="Gastos de Importación" id="import_submenu_1" parent="import_main_menu" action="action_import_cost" />
  98. </data>
  99. </openerp>