bzr revid: mra@mra-laptop-20100621104801-f4l9hnqf4x9r5vm5
This commit is contained in:
Mustufa Rangwala
2010-06-21 16:18:01 +05:30
4 changed files with 69 additions and 4 deletions
+2 -1
View File
@@ -247,6 +247,7 @@
<field name="count_comments" />
<field name="count_votes" />
<field name="state"/>
<button name="idea_open" string="Open" states="draft" icon="terp-gtk-go-back-rtl"/>
<button name="%(idea.action_idea_post_vote)d" icon="gtk-execute" type="action" states="open" string="Submit Vote"/>
<button name="idea_close" string="Accept" states="open" icon="gtk-jump-to"/>
<button name="idea_cancel" string="Refuse" states="open" icon="gtk-cancel"/>
@@ -372,7 +373,7 @@
<field name="search_view_id" ref="view_idea_vote_search"/>
</record>
<menuitem name="Votes" parent="menu_ideas" id="menu_idea_vote" action="action_idea_vote"/>
<menuitem name="Votes" parent="menu_idea_reporting" id="menu_idea_vote" action="action_idea_vote"/>
</data>
</openerp>
+1
View File
@@ -101,6 +101,7 @@ class idea_post_vote(osv.osv_memory):
"""
vote_ids = context and context.get('active_ids', []) or []
vote_id = context['active_ids'][0]
vote_pool = self.pool.get('idea.vote')
idea_pool = self.pool.get('idea.idea')
comment_pool = self.pool.get('idea.comment')
+62 -2
View File
@@ -53,16 +53,51 @@
<field name="state"/>
<field name="descript"/>
<field name="price" sum="Total price"/>
<button colspan="1"
name="%(action_lunch_order_confirm)d"
string="Confirm Order"
type="action" states="draft"
icon="terp-gtk-go-back-rtl" />
<button colspan="1"
name="%(action_lunch_order_cancel)d"
string="Cancel Order"
type="action" states="confirmed"
icon="terp-gtk-stop" />
</tree>
</field>
</record>
<!-- Lunch order Search view -->
<record id="view_lunch_order_filter" model="ir.ui.view">
<field name="name">lunch.order.list.select</field>
<field name="model">lunch.order</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Lunch Order">
<filter icon="terp-check" string="To Confirm" domain="[('state','=','draft')]"/>
<filter icon="terp-camera_test" string="Confirmed" domain="[('state','=',('confirmed'))]"/>
<filter icon="terp-go-today" name="Today" string="Today" domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]"/>
<separator orientation="vertical"/>
<field name="user_id"/>
<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'}"/>
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product'}"/>
</group>
</search>
</field>
</record>
<!-- Lunch order Action -->
<record model="ir.actions.act_window" id="action_lunch_order_form">
<field name="name">Lunch Orders</field>
<field name="res_model">lunch.order</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_lunch_order_filter"/>
<field name="context">{"search_default_Today":1}</field>
</record>
<menuitem name="Lunch Order" parent="menu_lunch"
@@ -133,20 +168,45 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="CashMove" editable="top">
<field name="box" select="1"/>
<field name="name" select="1" required="1"/>
<field name="user_cashmove" select="1"/>
<field name="amount" select="1" sum="Total amount"/>
<field name="box" select="1"/>
<field name="create_date"/>
<field name="amount" select="1" sum="Total amount"/>
</tree>
</field>
</record>
<!-- Cash Move Search View -->
<record id="view_lunch_cashmove_filter" model="ir.ui.view">
<field name="name">lunch.cashmove.list.select</field>
<field name="model">lunch.cashmove</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search CashMove">
<filter icon="terp-go-today" name="Today" string="Today" domain="[('create_date','&lt;=',time.strftime('%%Y-%%m-%%d 23:59:59'))]"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="user_cashmove"/>
<field name="create_date"/>
<newline/>
<group expand="0" string="Group By..." colspan="4" col="20">
<filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_cashmove'}"/>
<filter string="Box" icon="terp-accessories-archiver+" domain="[]" context="{'group_by':'box'}"/>
</group>
</search>
</field>
</record>
<!-- Cash Move Action -->
<record model="ir.actions.act_window" id="action_lunch_cashmove_form">
<field name="name">CashMove</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>
</record>
<menuitem name="Cash Moves" parent="menu_lunch"
+4 -1
View File
@@ -152,6 +152,9 @@
<field name="view_type">form</field>
<field name="view_id" ref="document_tree"/>
</record>
<menuitem action="action_document_form" id="menu_action_document_form" parent="subscription.next_id_45"/>
<menuitem name="Configuration" parent="base.menu_tools"
id="base.menu_lunch_survey_root" sequence="20" />
<menuitem id="config_recuuring_event" name="Recurring Events" parent="base.menu_lunch_survey_root" sequence="4"/>
<menuitem action="action_document_form" id="menu_action_document_form" parent="config_recuuring_event"/>
</data>
</openerp>