stock_warehouse_transfer.xml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="stock_warehouse_transfer_view_tree" model="ir.ui.view">
  5. <field name="name">stock.warehouse.transfer.view.tree</field>
  6. <field name="model">stock.warehouse.transfer</field>
  7. <field name="arch" type="xml">
  8. <tree string="Transfers">
  9. <field name="name"/>
  10. <field name="date"/>
  11. <field name="source_warehouse"/>
  12. <field name="dest_warehouse"/>
  13. <field name="pickings"/>
  14. <field name="state"/>
  15. </tree>
  16. </field>
  17. </record>
  18. <record id="stock_warehouse_transfer_view_form" model="ir.ui.view">
  19. <field name="name">stock.warehouse.transfer.view.form</field>
  20. <field name="model">stock.warehouse.transfer</field>
  21. <field name="arch" type="xml">
  22. <form string="Transfer">
  23. <header>
  24. <button name="action_create_picking" type="object" states="draft" class="oe_highlight" string="Crear Transferencia"/>
  25. <field name="state" widget="statusbar" translate="1"/>
  26. </header>
  27. <sheet>
  28. <h1>
  29. <field name="name" required="1" placeholder="Reference" attrs="{'readonly':[('state','!=','draft')]}"/>
  30. </h1>
  31. <group>
  32. <field name="date" required="1" attrs="{'readonly':[('state','!=','draft')]}"/>
  33. </group>
  34. <group col="4">
  35. <field name="source_warehouse" required="1" attrs="{'readonly':[('state','!=','draft')]}"/>
  36. <field name="dest_warehouse" required="1" attrs="{'readonly':[('state','!=','draft')]}"/>
  37. </group>
  38. <separator colspan="4" string="Transferencia" attrs="{'invisible':[('state','in','draft')]}"/>
  39. <field colspan="4" name="pickings" readonly="1" nolabel="1" attrs="{'readonly':[('state','!=','draft')],'invisible':[('state','=','draft')]}"/>
  40. <separator colspan="4" string="Productos"/>
  41. <field colspan="4" name="lines" nolabel="1" attrs="{'readonly':[('state','!=','draft')]}">
  42. <tree editable="bottom">
  43. <field name="product_id" domain="[('type','!=','service')]" required="1" options="{'no_create':True,'no_open':True}"/>
  44. <field name="ean13"/>
  45. <field name="product_qty" required="1" sum="qty"/>
  46. <field name="product_uom_id" required="1" invisible="1"/>
  47. <field name="source_location" invisible="1"/>
  48. <field name="dest_location" invisible="1"/>
  49. <field name="note" invisible="1"/>
  50. </tree>
  51. </field>
  52. </sheet>
  53. </form>
  54. </field>
  55. </record>
  56. <record id="stock_warehouse_transfer_search1" model="ir.ui.view">
  57. <field name="name">stock.warehouse.transfer.search1</field>
  58. <field name="model">stock.warehouse.transfer</field>
  59. <field name="arch" type="xml">
  60. <search string="Transferencia">
  61. <field name="name" string="Referencia" filter_domain="['|',('name','ilike',self)]"/>
  62. <field name="source_warehouse" string="Depósito Origen"/>
  63. <field name="dest_warehouse" string="Depósito Destino"/>
  64. <separator/>
  65. <filter string="Este año" name="year" domain="[('date','&lt;=', time.strftime('%%Y-12-31')),('date','&gt;=',time.strftime('%%Y-01-01'))]"/>
  66. <filter string="Año pasado " domain="[('date','&gt;=',(context_today()-relativedelta(years=1)).strftime('%%Y-01-01')),('date','&lt;=', time.strftime('%%Y-01-01'))]"/>
  67. <filter string="Mes actual" domain="[('date','&lt;',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('date','&gt;=',time.strftime('%%Y-%%m-01'))]"/>
  68. <filter string="Mes pasado" domain="[('date','&gt;=',(context_today()-relativedelta(months=1)).strftime('%%Y-%%m-01')),('date','&lt;',time.strftime('%%Y-%%m-01'))]"/>
  69. <filter string="Hoy" domain="[('date', '&gt;=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('date', '&lt;=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
  70. <filter string="Ayer" domain="[('date','&lt;=', (datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d'))]"/>
  71. <filter string="Semana anterior" domain="[('date', '&gt;=', ((context_today()+relativedelta(weeks=-2, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('date', '&lt;=', ((context_today()+relativedelta(weeks=-1, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
  72. <filter string="Esta semana" domain="[('date', '&gt;=', ((context_today()+relativedelta(weeks=-1, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('date', '&lt;=', ((context_today()+relativedelta(weeks=0, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
  73. <separator/>
  74. <group string="Agrupar por">
  75. <filter string="Depósito Origen" context="{'group_by':'source_warehouse'}"/>
  76. <filter string="Depósito Destino" context="{'group_by':'dest_warehouse'}"/>
  77. </group>
  78. </search>
  79. </field>
  80. </record>
  81. <record id="stock_warehouse_transfer_action" model="ir.actions.act_window">
  82. <field name="name">Transferir Productos</field>
  83. <field name="res_model">stock.warehouse.transfer</field>
  84. <field name="type">ir.actions.act_window</field>
  85. <field name="view_type">form</field>
  86. <field name="view_mode">tree,form</field>
  87. </record>
  88. <menuitem action="stock_warehouse_transfer_action"
  89. id="stock_warehouse_transfer_menu"
  90. parent="stock.menu_stock_warehouse_mgmt"
  91. sequence="50"/>
  92. </data>
  93. </openerp>