[IMP/MOD] lunch,survey,idea : Usability Improvements
bzr revid: vir@tinyerp.com-20100825132023-6gwfthusuni19seo
This commit is contained in:
parent
bc870c74d8
commit
006a921f4d
|
@ -387,7 +387,7 @@
|
|||
|
||||
<!-- Vote For Idea Action -->
|
||||
<record model="ir.actions.act_window" id="action_idea_vote">
|
||||
<field name="name">Idea's vote</field>
|
||||
<field name="name">Idea's Votes</field>
|
||||
<field name="res_model">idea.vote</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
</record>
|
||||
|
||||
<record id="action_report_vote_all" model="ir.actions.act_window">
|
||||
<field name="name">Idea Vote Analysis</field>
|
||||
<field name="name">Ideas Analysis</field>
|
||||
<field name="res_model">report.vote</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
|
|
@ -81,7 +81,7 @@ class lunch_cashbox(osv.osv):
|
|||
_columns = {
|
||||
'manager': fields.many2one('res.users', 'Manager'),
|
||||
'name': fields.char('Name', size=30, required=True, unique = True),
|
||||
'sum_remain': fields.function(amount_available, method=True, string='Remained Total'),
|
||||
'sum_remain': fields.function(amount_available, method=True, string='Total Remaining'),
|
||||
}
|
||||
|
||||
lunch_cashbox()
|
||||
|
@ -136,12 +136,12 @@ class lunch_order(osv.osv):
|
|||
readonly=True, states={'draft':[('readonly', False)]}, change_default=True),
|
||||
'date': fields.date('Date', readonly=True, states={'draft':[('readonly', False)]}),
|
||||
'cashmove': fields.many2one('lunch.cashmove', 'CashMove' , readonly=True),
|
||||
'descript': fields.char('Description Order', readonly=True, size=50, \
|
||||
'descript': fields.char('Description Order', readonly=True, size=250, \
|
||||
states = {'draft':[('readonly', False)]}),
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ], \
|
||||
'State', readonly=True, select=True),
|
||||
'price': fields.function(_price_get, method=True, string="Price"),
|
||||
'category': fields.many2one('lunch.category','Category'),
|
||||
'category': fields.many2one('lunch.category','Category',readonly=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
@ -217,6 +217,12 @@ class report_lunch_amount(osv.osv):
|
|||
'user_id': fields.many2one('res.users', 'User Name', readonly=True),
|
||||
'amount': fields.float('Amount', readonly=True, digits=(16, 2)),
|
||||
'box': fields.many2one('lunch.cashbox', 'Box Name', size=30, readonly=True),
|
||||
'year': fields.char('Year', size=4, readonly=True),
|
||||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
|
||||
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
|
||||
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'date': fields.date('Created Date', readonly=True),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
|
@ -227,6 +233,10 @@ class report_lunch_amount(osv.osv):
|
|||
create or replace view report_lunch_amount as (
|
||||
select
|
||||
min(lc.id) as id,
|
||||
to_date(to_char(lc.create_date, 'dd-MM-YYYY'),'dd-MM-YYYY') as date,
|
||||
to_char(lc.create_date, 'YYYY') as year,
|
||||
to_char(lc.create_date, 'MM') as month,
|
||||
to_char(lc.create_date, 'YYYY-MM-DD') as day,
|
||||
lc.user_cashmove as user_id,
|
||||
sum(amount) as amount,
|
||||
lc.box as box
|
||||
|
@ -234,7 +244,7 @@ class report_lunch_amount(osv.osv):
|
|||
lunch_cashmove lc
|
||||
where
|
||||
active = 't'
|
||||
group by lc.user_cashmove, lc.box
|
||||
group by lc.user_cashmove, lc.box, lc.create_date
|
||||
)""")
|
||||
|
||||
report_lunch_amount()
|
||||
|
|
|
@ -47,14 +47,13 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state in ('draft');black:state in ('confirmed')" string="Order">
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
<field name="product"/>
|
||||
<field name="category"/>
|
||||
<field name="date"/>
|
||||
<field name="cashmove"/>
|
||||
<field name="state"/>
|
||||
<field name="descript"/>
|
||||
<field name="category"/>
|
||||
<field name="price" sum="Total price"/>
|
||||
<field name="state"/>
|
||||
<button colspan="1"
|
||||
name="%(action_lunch_order_confirm)d"
|
||||
string="Confirm Order"
|
||||
|
@ -86,9 +85,6 @@
|
|||
<field name="date"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="20">
|
||||
<filter string="Cashbox" icon="terp-dolar" domain="[]" context="{'group_by':'cashmove'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<!-- <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product'}"/>-->
|
||||
<filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'category'}"/>
|
||||
</group>
|
||||
</search>
|
||||
|
@ -105,16 +101,16 @@
|
|||
<field name="context">{"search_default_Today":1}</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Lunch Order" parent="menu_lunch"
|
||||
<menuitem name="Lunch Orders" parent="menu_lunch"
|
||||
id="menu_lunch_order_form" action="action_lunch_order_form" />
|
||||
|
||||
<!-- Cash Box Form view -->
|
||||
|
||||
<record model="ir.ui.view" id="view_lunch_cashbox_form">
|
||||
<field name="name">CashBox</field>
|
||||
<field name="name">Cashboxes</field>
|
||||
<field name="model">lunch.cashbox</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="CashBox">
|
||||
<form string="Cashboxes">
|
||||
<field name="name" select="1"/>
|
||||
<field name="manager" select="1"/>
|
||||
</form>
|
||||
|
@ -124,11 +120,11 @@
|
|||
<!-- Cash Box Tree view -->
|
||||
|
||||
<record model="ir.ui.view" id="view_lunch_cashbox_tree">
|
||||
<field name="name">CashBox</field>
|
||||
<field name="name">Cashboxes</field>
|
||||
<field name="model">lunch.cashbox</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="CashBox" colors="red:sum_remain<=0">
|
||||
<tree string="Cashboxes" colors="red:sum_remain<=0">
|
||||
<field name="name" select="1"/>
|
||||
<field name="manager" select="1"/>
|
||||
<field name="sum_remain" select="1"/>
|
||||
|
@ -139,11 +135,11 @@
|
|||
<!-- Cash Box Action -->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_lunch_cashbox_form">
|
||||
<field name="name"> CashBox </field>
|
||||
<field name="name"> Cashboxes </field>
|
||||
<field name="res_model">lunch.cashbox</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="CashBox"
|
||||
<menuitem name="Cashboxes"
|
||||
parent="menu_lunch_category_root_configuration"
|
||||
id="menu_lunch_cashbox_form"
|
||||
action="action_lunch_cashbox_form" />
|
||||
|
@ -173,10 +169,10 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="CashMove" editable="top">
|
||||
<field name="create_date"/>
|
||||
<field name="box" select="1"/>
|
||||
<field name="name" select="1" required="1"/>
|
||||
<field name="user_cashmove" select="1"/>
|
||||
<field name="create_date"/>
|
||||
<field name="amount" select="1" sum="Total amount"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -200,6 +196,8 @@
|
|||
<filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_cashmove'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Box" icon="terp-dolar" domain="[]" context="{'group_by':'box'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Date" icon="terp-go-today" domain="[]" context="{'group_by':'create_date'}"/>
|
||||
</group>
|
||||
</search>
|
||||
|
||||
|
@ -209,7 +207,7 @@
|
|||
<!-- Cash Move Action -->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_lunch_cashmove_form">
|
||||
<field name="name">CashMove</field>
|
||||
<field name="name">Cash Moves</field>
|
||||
<field name="res_model">lunch.cashmove</field>
|
||||
<field name="search_view_id" ref="view_lunch_cashmove_filter"/>
|
||||
<field name="context">{"search_default_Today":1}</field>
|
||||
|
@ -248,7 +246,7 @@
|
|||
<!-- Lunch Category Action -->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_lunch_category_form">
|
||||
<field name="name"> Category of product </field>
|
||||
<field name="name"> Product Categories </field>
|
||||
<field name="res_model">lunch.category</field>
|
||||
</record>
|
||||
|
||||
|
@ -304,7 +302,7 @@
|
|||
<!-- Lunch Product Action -->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_lunch_product_form">
|
||||
<field name="name">Product</field>
|
||||
<field name="name">Products</field>
|
||||
<field name="res_model">lunch.product</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
@ -317,7 +315,7 @@
|
|||
id="menu_lunch_product_form" action="action_lunch_product_form"
|
||||
sequence="2" />
|
||||
|
||||
<menuitem name="Category of product"
|
||||
<menuitem name="Product Categories"
|
||||
parent="menu_lunch_category_root_configuration"
|
||||
id="menu_lunch_category_form"
|
||||
action="action_lunch_category_form" sequence="1" />
|
||||
|
@ -331,6 +329,10 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Box Amount by User">
|
||||
<field name="date" invisible="1"/>
|
||||
<field name="year" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="box" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="amount" select="1" sum="Total box" />
|
||||
|
@ -362,6 +364,19 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Box Amount by User">
|
||||
<group>
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(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 "
|
||||
name="month"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(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 "
|
||||
separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Box amount in last 7 days"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="box" select="1"/>
|
||||
<field name="amount" select="1"/>
|
||||
|
@ -377,7 +392,7 @@
|
|||
<!-- Lunch Amount Action -->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_lunch_amount_tree">
|
||||
<field name="name">Lunch amount</field>
|
||||
<field name="name">Cash Position by User</field>
|
||||
<field name="res_model">report.lunch.amount</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
|
|
@ -489,7 +489,7 @@
|
|||
<field name="view_id" ref="survey_page_tree"></field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Pages" id="menu_survey_page_form1"
|
||||
<menuitem name="Survey Pages" id="menu_survey_page_form1"
|
||||
action="action_survey_page_form" parent='menu_define_survey'
|
||||
groups="base.group_tool_manager,base.group_tool_user,base.group_system"/>
|
||||
|
||||
|
|
Loading…
Reference in New Issue