[MOD] lunch : Usability Improvements

bzr revid: vir@tinyerp.com-20100903122424-p7471a7jtnz20kia
This commit is contained in:
Vir (Open ERP) 2010-09-03 17:54:24 +05:30
parent efe4e04159
commit 4459d0f202
4 changed files with 13 additions and 13 deletions

View File

@ -107,7 +107,7 @@ class base_setup_installer(osv.osv_memory):
def _if_misc_tools(self, cr, uid, ids, context=None):
interface = self.pool.get('res.users').browse(cr, uid, uid, context=context).view
if interface == 'simple' or interface =='extended' :
return ['lunch','idea','survey']
return ['profile_tools']
return None
def _if_account(self, cr, uid, ids, context=None):

View File

@ -364,18 +364,18 @@
<field name="arch" type="xml">
<search string="Box Amount by User">
<group>
<filter icon="terp-go-year" string=" 365 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Box amount in last 365 days"/>
<filter icon="terp-go-month" string=" 30 Days "
<filter icon="terp-go-year" string=" Year "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;=',time.strftime('%%Y-01-01'))]"
help="Box amount in current year"/>
<filter icon="terp-go-month" string=" Month "
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Box amount in last 30 days"/>
<filter icon="terp-go-week"
string=" 7 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;=',time.strftime('%%Y-%%m-01'))]"
help="Box amount in current month"/>
<filter icon="terp-go-week"
string=" Month-1 "
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Box amount in last 7 days"/>
domain="[('date','&lt;=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date (int(time.strftime('%%Y')), datetime.date.today().month-1, 1)).strftime('%%Y-%%m-%%d'))]"
help="Box amount in last month"/>
<separator orientation="vertical"/>
<field name="user_id" select="1"/>
<field name="box" select="1"/>

View File

@ -34,7 +34,7 @@
<act_window id="action_lunch_order_cancel_values"
key2="client_action_multi" name="Cancel Order"
res_model="lunch.order.cancel" src_model="lunch.order"
view_mode="form" target="new" view_type="form" />
view_mode="form" target="new" view_type="form" groups="base.group_tool_manager"/>
</data>
</openerp>

View File

@ -36,7 +36,7 @@
<act_window id="action_lunch_order_confirm_values"
key2="client_action_multi" name="Confirm Order"
res_model="lunch.order.confirm" src_model="lunch.order"
view_mode="form" target="new" view_type="form" />
view_mode="form" target="new" view_type="form" groups="base.group_tool_manager"/>
</data>
</openerp>