Forráskód Böngészése

Agregar código ean a transferencia

SEBAS 1 hónapja
szülő
commit
21290174cc
1 módosított fájl, 26 hozzáadás és 0 törlés
  1. 26 0
      views/stock_warehouse_transfer.xml

+ 26 - 0
views/stock_warehouse_transfer.xml

@@ -61,6 +61,32 @@
             </field>
         </record>
 
+        <record id="stock_warehouse_transfer_search1" model="ir.ui.view">
+            <field name="name">stock.warehouse.transfer.search1</field>
+            <field name="model">stock.warehouse.transfer</field>
+            <field name="arch" type="xml">
+              <search string="Transferencia">
+                 <field name="name" string="Referencia" filter_domain="['|',('name','ilike',self)]"/>
+                 <field name="source_warehouse" string="Depósito Origen"/>
+                 <field name="dest_warehouse" string="Depósito Destino"/>
+                  <separator/>
+                  <filter string="Este año" name="year" domain="[('date','&lt;=', time.strftime('%%Y-12-31')),('date','&gt;=',time.strftime('%%Y-01-01'))]"/>
+                  <filter string="Año pasado  " domain="[('date','&gt;=',(context_today()-relativedelta(years=1)).strftime('%%Y-01-01')),('date','&lt;=', time.strftime('%%Y-01-01'))]"/>
+                  <filter string="Mes actual" domain="[('date','&lt;',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('date','&gt;=',time.strftime('%%Y-%%m-01'))]"/>
+                  <filter string="Mes pasado" domain="[('date','&gt;=',(context_today()-relativedelta(months=1)).strftime('%%Y-%%m-01')),('date','&lt;',time.strftime('%%Y-%%m-01'))]"/>
+                  <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'))]"/>
+                  <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'))]"/>
+                  <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')))]"/>
+                  <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')))]"/>
+                  <separator/>
+                  <group string="Agrupar por">
+                      <filter string="Depósito Origen" context="{'group_by':'source_warehouse'}"/>
+                      <filter string="Depósito Destino" context="{'group_by':'dest_warehouse'}"/>
+                  </group>
+               </search>
+            </field>
+        </record>
+
         <record id="stock_warehouse_transfer_action" model="ir.actions.act_window">
             <field name="name">Transferir Productos</field>
             <field name="res_model">stock.warehouse.transfer</field>