sis_warehouse_transfer.xml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="sis_stock_transfer_search_view" model="ir.ui.view">
  5. <field name="name">sis_stock_transfer_search_view</field>
  6. <field name="model">sis.stock.transfer</field>
  7. <field name="arch" type="xml">
  8. <search>
  9. <field name="name"/>
  10. <field name="partner_id"/>
  11. <field name="doctor_id"/>
  12. <field name="state"/>
  13. <field name="type" invisible="1"/>
  14. <separator/>
  15. <filter string="Estado Hecho" name="done" domain="[('state', '=', 'done')]"/>
  16. <filter string="Estado Borrador" name="draft" domain="[('state', '=', 'draft')]"/>
  17. <group expand="0" string="Agrupar por:">
  18. <filter name="group_by_customer" string="Paciente" context="{'group_by':'partner_id'}"/>
  19. <filter name="group_by_doctor" string="Doctor" context="{'group_by':'doctor_id'}"/>
  20. <filter name="group_by_state" string="Estado" context="{'group_by':'state'}"/>
  21. <filter string="Mes Creado" context="{'group_by':'create_date:month'}" help="Mes Creado"/>
  22. <filter string="Dia Creado" context="{'group_by':'create_date:day'}" help="Dia Creado"/>
  23. </group>
  24. </search>
  25. </field>
  26. </record>
  27. <record id="sis_transfer_tree_view" model="ir.ui.view">
  28. <field name="name">sis_transfer_tree_view</field>
  29. <field name="model">sis.stock.transfer</field>
  30. <field name="arch" type="xml">
  31. <tree string="Transferencia">
  32. <field name="type" invisible="1"/>
  33. <field name="name"/>
  34. <field name="date"/>
  35. <field name="source_warehouse"/>
  36. <field name="dest_warehouse"/>
  37. <field name="pickings"/>
  38. <field name="state"/>
  39. </tree>
  40. </field>
  41. </record>
  42. <record id="sis_appointment_tree_view" model="ir.ui.view">
  43. <field name="name">sis_appointment_tree_view</field>
  44. <field name="model">sis.stock.transfer</field>
  45. <field name="arch" type="xml">
  46. <tree string="Consultas">
  47. <field name="type" invisible="1"/>
  48. <field name="name"/>
  49. <field name="date"/>
  50. <field name="partner_id"/>
  51. <field name="doctor_id"/>
  52. <field name="state"/>
  53. </tree>
  54. </field>
  55. </record>
  56. <record id="sis_stock_transfer_view_form" model="ir.ui.view">
  57. <field name="name">sis_stock_transfer_view_form</field>
  58. <field name="model">sis.stock.transfer</field>
  59. <field name="arch" type="xml">
  60. <form string="Transfer">
  61. <field name="type" invisible="1"/>
  62. <header>
  63. <button name="action_create_picking" type="object" class="oe_highlight" string="Finalizar Consulta" attrs="{'invisible': ['|',('type', '=', 'transfer'),('state','!=','draft')]}"/>
  64. <button name="action_create_picking" type="object" class="oe_highlight" string="Tranferir" attrs="{'invisible': ['|',('type', '=', 'appointment'),('state','!=','draft')]}"/>
  65. <field name="state" widget="statusbar" translate="1"/>
  66. </header>
  67. <sheet>
  68. <h1>
  69. <field name="name" placeholder="Reference" readonly="1"/>
  70. </h1>
  71. <group>
  72. <field name="date" required="1" attrs="{'readonly':[('state','!=','draft')]}"/>
  73. <field name="partner_id" attrs="{'invisible': [('type', '=', 'transfer')],'readonly':[('state','!=','draft')]}"/>
  74. <field name="doctor_id" attrs="{'invisible': [('type', '=', 'transfer')],'readonly':[('state','!=','draft')]}" options="{'no_create': True, 'no_create_edit':True,'no_open' : True}"/>
  75. <field name="appointment_reason" attrs="{'invisible': [('type', '=', 'transfer')],'readonly':[('state','!=','draft')]}"/>
  76. </group>
  77. <group col="4">
  78. <field name="source_warehouse" required="1" attrs="{'readonly':[('state','!=','draft')],'invisible':[('type', '=', 'appointment')]}" options="{'no_create': True, 'no_create_edit':True,'no_open' : True}"/>
  79. <field name="dest_warehouse" required="1" attrs="{'readonly':[('state','!=','draft')],'invisible':[('type', '=', 'appointment')]}" options="{'no_create': True, 'no_create_edit':True,'no_open' : True}"/>
  80. </group>
  81. <separator colspan="4" string="Transferencia" attrs="{'invisible':['|',('state','in','draft'),('type', '=', 'appointment')]}"/>
  82. <field colspan="4" name="pickings" readonly="1" nolabel="1" attrs="{'invisible':['|',('state','in','draft'),('type', '=', 'appointment')]}"/>
  83. <separator colspan="4" string="Productos"/>
  84. <field colspan="4" name="lines" nolabel="1" attrs="{'readonly':[('state','!=','draft')]}">
  85. <tree editable="bottom">
  86. <field name="product_id" domain="[('type','!=','service')]" required="1" options="{'no_create':True,'no_open':True}"/>
  87. <field name="factory_reference" invisible="1"/>
  88. <field name="product_qty" required="1" sum="qty"/>
  89. <field name="product_uom_id" required="1" invisible="1"/>
  90. <field name="source_location" invisible="1"/>
  91. <field name="dest_location" invisible="1"/>
  92. <field name="note" invisible="1"/>
  93. <field name="lot_id" domain="[('product_id','=',product_id)]"/>
  94. </tree>
  95. </field>
  96. <group>
  97. <field name="note" attrs="{'readonly':[('state','!=','draft')]}" />
  98. </group>
  99. </sheet>
  100. </form>
  101. </field>
  102. </record>
  103. <record id="sis_transfer_action" model="ir.actions.act_window">
  104. <field name="name">Transferir Productos</field>
  105. <field name="res_model">sis.stock.transfer</field>
  106. <field name="type">ir.actions.act_window</field>
  107. <field name="view_type">form</field>
  108. <field name="view_mode">tree,form</field>
  109. <field name="view_id" ref="sis_transfer_tree_view"/>
  110. <field name="target">current</field>
  111. <field name="context">{'default_type':'transfer','type':'transfer'}</field>
  112. <field name="domain">[('type', '=', 'transfer')]</field>
  113. </record>
  114. <menuitem action="sis_transfer_action"
  115. id="sis_stock_transfer_menu"
  116. parent="base.menu_sales"
  117. sequence="100"/>
  118. <record id="sis_appointment_action" model="ir.actions.act_window">
  119. <field name="name">Consulta médica</field>
  120. <field name="res_model">sis.stock.transfer</field>
  121. <field name="type">ir.actions.act_window</field>
  122. <field name="view_type">form</field>
  123. <field name="view_mode">tree,form</field>
  124. <field name="view_id" ref="sis_appointment_tree_view"/>
  125. <field name="target">current</field>
  126. <field name="context">{'default_type':'appointment','type': 'appointment'}</field>
  127. <field name="domain">[('type', '=', 'appointment')]</field>
  128. </record>
  129. <menuitem action="sis_appointment_action"
  130. id="sis_stock_appointment_menu"
  131. parent="base.menu_sales"
  132. sequence="100"/>
  133. </data>
  134. </openerp>