|
@@ -1,5 +1,6 @@
|
|
|
<openerp>
|
|
|
<data>
|
|
|
+ <!-- Registro de caja -->
|
|
|
<record model="ir.ui.view" id="account_bank_statement_multi_store">
|
|
|
<field name="name">account.bank.statement.multi.store</field>
|
|
|
<field name="model">account.bank.statement</field>
|
|
@@ -9,25 +10,28 @@
|
|
|
<field name="journal_id" domain="[('type','=','cash'),('store_ids','=',store_id)]" widget="selection" on_change="onchange_journal_id(journal_id)" string="Metodo de pago"/>
|
|
|
</field>
|
|
|
<field name="journal_id" position="before">
|
|
|
- <field name="store_id" string="Sucursal" widget="selection" invisible="1" attrs="{'readonly': [('state','=','confirm')]}"/>
|
|
|
+ <field name="store_id" string="Sucursal" widget="selection" attrs="{'readonly': [('state','=','confirm')],'required': [('state','!=','confirm')]}"/>
|
|
|
</field>
|
|
|
</field>
|
|
|
</record>
|
|
|
+
|
|
|
+ <!-- Extracto bancario -->
|
|
|
<record model="ir.ui.view" id="account_bank_statement_multi_store_bank">
|
|
|
<field name="name">account.bank.statement.multi.store.bank</field>
|
|
|
<field name="model">account.bank.statement</field>
|
|
|
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
|
|
<field name="arch" type="xml">
|
|
|
<field name="journal_id" position="replace">
|
|
|
- <!-- <field name="journal_id" domain="[('type','=','bank'),('store_ids','=',store_id)]" widget="selection" on_change="onchange_journal_id(journal_id)" string="Metodo de pago" /> -->
|
|
|
- <field name="journal_id" domain="[('type', '=', 'bank'),('store_ids','=',store_id)]" on_change="onchange_journal_id(journal_id)" attrs="{'readonly': [('move_line_ids', '!=', [])]}" widget="selection"/>
|
|
|
+ <field name="journal_id" domain="[('type', '=', 'bank'),('store_ids','=',store_id)]" on_change="onchange_journal_id(journal_id)" attrs="{'readonly': [('move_line_ids', '!=', [])]}" widget="selection"/>
|
|
|
</field>
|
|
|
<field name="journal_id" position="before">
|
|
|
- <field name="store_id" string="Sucursal" widget="selection" invisible="1" attrs="{'readonly': [('state','=','confirm')]}"/>
|
|
|
+ <field name="store_id" string="Sucursal" widget="selection" attrs="{'readonly': [('state','=','confirm')],'required': [('state','!=','confirm')]}"/>
|
|
|
</field>
|
|
|
</field>
|
|
|
</record>
|
|
|
- <record model="ir.ui.view" id="account_bank_statement_multi_store_usability">
|
|
|
+
|
|
|
+ <!-- Permisos -->
|
|
|
+ <!-- <record model="ir.ui.view" id="account_bank_statement_multi_store_usability">
|
|
|
<field name="name">account.bank.statement.multi.store.usability</field>
|
|
|
<field name="model">account.bank.statement</field>
|
|
|
<field name="inherit_id" ref="account_bank_statement_multi_store.account_bank_statement_multi_store"/>
|
|
@@ -50,6 +54,50 @@
|
|
|
<attribute name="required">1</attribute>
|
|
|
</field>
|
|
|
</field>
|
|
|
+ </record> -->
|
|
|
+
|
|
|
+ <!-- Filtros -->
|
|
|
+ <!-- Registro de caja -->
|
|
|
+ <record id="view_account_bank_statement_search" model="ir.ui.view">
|
|
|
+ <field name="name">account.bank.statement.search</field>
|
|
|
+ <field name="model">account.bank.statement</field>
|
|
|
+ <field name="inherit_id" ref="account.view_account_bank_statement_filter"/>
|
|
|
+ <field name="arch" type="xml">
|
|
|
+ <search>
|
|
|
+ <separator/>
|
|
|
+ <filter string="Mes actual" domain="[('date','<',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('date','>=',time.strftime('%%Y-%%m-01'))]"/>
|
|
|
+ <filter string="Mes pasado" domain="[('date','>=',(context_today()-relativedelta(months=1)).strftime('%%Y-%%m-01')),('date','<',time.strftime('%%Y-%%m-01'))]"/>
|
|
|
+ <filter string="Hoy" domain="[('date', '>=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('date', '<=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
|
|
|
+ <separator/>
|
|
|
+ <group string="">
|
|
|
+ <filter string="Sucursal" context="{'group_by':'store_id'}"/>
|
|
|
+ <filter string="Responsable" context="{'group_by':'user_id'}"/>
|
|
|
+ <filter string="Por Mes" context="{'group_by':'date:month'}"/>
|
|
|
+ </group>
|
|
|
+ </search>
|
|
|
+ </field>
|
|
|
+ </record>
|
|
|
+
|
|
|
+ <!-- Extractos Bancarios -->
|
|
|
+ <record id="view_account_bank_statement_search_bank" model="ir.ui.view">
|
|
|
+ <field name="name">account.bank.statement.search.bank</field>
|
|
|
+ <field name="model">account.bank.statement</field>
|
|
|
+ <field name="inherit_id" ref="account.view_bank_statement_search"/>
|
|
|
+ <field name="arch" type="xml">
|
|
|
+ <search>
|
|
|
+ <separator/>
|
|
|
+ <filter string="Mes actual" domain="[('date','<',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('date','>=',time.strftime('%%Y-%%m-01'))]"/>
|
|
|
+ <filter string="Mes pasado" domain="[('date','>=',(context_today()-relativedelta(months=1)).strftime('%%Y-%%m-01')),('date','<',time.strftime('%%Y-%%m-01'))]"/>
|
|
|
+ <filter string="Hoy" domain="[('date', '>=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('date', '<=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
|
|
|
+ <separator/>
|
|
|
+ <group string="">
|
|
|
+ <filter string="Sucursal" context="{'group_by':'store_id'}"/>
|
|
|
+ <filter string="Responsable" context="{'group_by':'user_id'}"/>
|
|
|
+ <filter string="Por Mes" context="{'group_by':'date:month'}"/>
|
|
|
+ </group>
|
|
|
+ </search>
|
|
|
+ </field>
|
|
|
</record>
|
|
|
+
|
|
|
</data>
|
|
|
</openerp>
|