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):
class idea_idea(osv.osv):
""" Idea """
_name = 'idea.idea'
- _rec_name = 'title'
+ _rec_name = 'name'
def _vote_avg_compute(self, cr, uid, ids, name, arg, context = None):
_columns = {
'user_id': fields.many2one('res.users', 'Creator', required=True, readonly=True),
- 'title': fields.char('Idea Summary', size=64, required=True, readonly=True, states={'draft':[('readonly',False)]}),
+ 'name': fields.char('Idea Summary', size=64, required=True, readonly=True, states={'draft':[('readonly',False)]}),
'description': fields.text('Description', help='Content of the idea', readonly=True, states={'draft':[('readonly',False)]}),
'comment_ids': fields.one2many('idea.comment', 'idea_id', 'Comments'),
'created_date': fields.datetime('Creation date', readonly=True),
<?xml version="1.0"?>
<openerp>
<data>
-
+
<record model="idea.category" id="idea_category_general">
<field name="name">General</field>
<field name="summary">General Ideas</field>
<field name="visibility">True</field>
</record>
-
+
<record model="idea.idea" id="idea_idea_one">
- <field name="title">TODO: Need to put a good idea on OpenERP</field>
+ <field name="name">TODO: Need to put a good idea on OpenERP</field>
<field name="description">TODO: Need to put a good idea on OpenERP</field>
<field name="category_id" ref="idea_category_general"/>
<field name="visibility">True</field>
<field name="arch" type="xml">
<tree string="Votes">
<field name="user_id" />
+ <field name="idea_id"/>
<field name="score"/>
<field name="date"/>
</tree>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="14">
- <filter string="Vote date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
- <filter string="Idea" icon="terp-idea" domain="[]" context="{'group_by':'idea_id'}"/>
<filter string="User" name="user" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
+ <separator orientation="vertical"/>
+ <filter string="Idea" icon="terp-idea" domain="[]" context="{'group_by':'idea_id'}"/>
+ <separator orientation="vertical"/>
+ <filter string="Vote date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
</group>
</search>
</field>
<field name="arch" type="xml">
<form string="New Idea">
<group col="6" colspan="4">
- <field name="title" select="1" />
+ <field name="name" select="1" />
<field name="category_id" select="1"/>
<field name="user_id" attrs="{'invisible':[('visibility','=',False)]}"/>
<field name="vote_avg" widget="progressbar"/>
</tree>
</field>
</page>
- <page string="Vote" groups="base.group_extended">
+ <page string="History" groups="base.group_extended">
<field name="vote_ids" nolabel="1" colspan="4" readonly="True">
<tree string="Votes">
<field name="user_id"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="blue:state in ('draft');black:state in ('open','close');gray:state in('cancel')" string="Ideas">
- <field name="title"/>
+ <field name="name"/>
<field name="category_id" />
<field name="created_date"/>
<field name="vote_avg" widget="progressbar"/>
<field name="arch" type="xml">
<search string="Ideas">
<group col="10" colspan="4">
- <filter icon="terp-document-new" string="Draft"
- domain="[('state','=','draft')]" help="Draft Ideas" />
- <filter icon="terp-camera_test" string="Open"
- domain="[('state','=','open')]" help="Open Ideas" />
+ <filter icon="terp-document-new" string="Current" domain="[('state','in', ('draft', 'open'))]" help="Draft and Open Ideas"/>
+ <filter icon="terp-check" string="Accepted"
+ domain="[('state','=','close')]" help="Accepted Ideas" />
<separator orientation="vertical"/>
- <field name="title" select="1"/>
+ <field name="name" select="1"/>
<field name="category_id" select="1"/>
<field name="user_id" select="1"/>
</group>
<field name="res_model">idea.idea</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
- <field name="context">{"search_default_user_id":uid}</field>
<field name="search_view_id" ref="view_idea_idea_search"/>
</record>
- <menuitem name="Ideas" parent="menu_ideas1" id="menu_idea_idea" action="action_idea_idea"/>
+ <menuitem name="Ideas" parent="menu_ideas1" id="menu_idea_idea" action="action_idea_idea" sequence="1"/>
<!-- Open Idea Action -->
<!-- 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>
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'user_id': fields.many2one('res.users', 'User Name'),
- 'score': fields.integer('Score'),
+ 'score': fields.integer('Score',group_operator="avg"),
'idea_id': fields.many2one('idea.idea', 'Idea'),
'nbr':fields.integer('# of Lines', readonly=True),
'idea_state': fields.selection([('draft', 'Draft'),('open', 'Opened'),
<field name="creater_id" invisible="1"/>
<field name="category_id" invisible="1"/>
<field name="nbr" sum="# of Lines"/>
- <field name="score" sum="Score"/>
+ <field name="score" avg="Score"/>
</tree>
</field>
</record>
separator="1"
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Idea Vote created last 7 days"/>
- <separator orientation="vertical"/>
+ <separator orientation="vertical"/>
<filter icon="terp-go-today"
string=" Today "
name="today"
<filter icon="terp-camera_test"
string="Open"
domain="[('idea_state','=',('open'))]"/>
+ <separator orientation="vertical"/>
<filter icon="terp-camera_test"
string="Accepted"
domain="[('idea_state','=',('close'))]"/>
<filter icon="terp-gtk-stop"
string="Refused"
domain="[('idea_state','=',('cancel'))]"/>
+ <separator orientation="vertical"/>
+ <field name="idea_id" string="Idea"/>
+ <field name="creater_id" string="Creater"/>
+ <field name="user_id"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="10" col="12">
+ <filter string="Creater" icon="terp-personal" context="{'group_by':'creater_id'}"/>
+ <filter string="User" icon="terp-personal" name="User" context="{'group_by':'user_id'}"/>
+ <separator orientation="vertical"/>
<filter string="Idea" icon="terp-personal" context="{'group_by':'idea_id'}"/>
+ <separator orientation="vertical"/>
<filter string="Category" icon="terp-stock_symbol-selection" context="{'group_by':'category_id'}"/>
<separator orientation="vertical"/>
- <filter string="User" icon="terp-personal" name="User" context="{'group_by':'user_id'}"/>
- <filter string="Creater" icon="terp-personal" context="{'group_by':'creater_id'}"/>
- <filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'idea_state'}"/>
+ <filter string="State" icon="terp-stock_effects-object-colorize" name="State" context="{'group_by':'idea_state'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
</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>
<field name="search_view_id" ref="view_report_vote_search"/>
- <field name="context">{'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
+ <field name="context">{'search_default_User':1,'search_default_State':1,'group_by_no_leaf':1,'group_by':[]}</field>
</record>
<menuitem action="action_report_vote_all" id="menu_report_vote_all" parent="menu_idea_reporting" sequence="1" groups="base.group_tool_manager,base.group_system"/>
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_idea_category","idea.category","model_idea_category","base.group_user",1,0,0,0
+"access_idea_category","idea.category","model_idea_category","base.group_user",1,1,1,1
"access_idea_idea","idea.idea","model_idea_idea","base.group_user",1,1,1,1
"access_idea_vote","idea.vote","model_idea_vote","base.group_user",1,1,1,1
-"access_idea_vote_stat","idea.vote.stat","model_idea_vote_stat","base.group_user",1,0,0,0
+"access_idea_vote_stat","idea.vote.stat","model_idea_vote_stat","base.group_user",1,1,1,1
"access_idea_category_system","idea.category system","model_idea_category","base.group_system",1,1,1,1
"access_idea_comment","idea.comment","model_idea_comment","base.group_system",1,1,1,1
-"access_idea_comment_user","idea.comment","model_idea_comment","base.group_user",1,1,1,0
+"access_idea_comment_base_user","idea.comment.base.user","model_idea_comment","base.group_user",1,1,1,1
"access_report_vote","report.vote","model_report_vote","base.group_user",1,1,1,1
"access_idea_idea_sale_salesman","idea.idea.sale","model_idea_idea","base.group_sale_salesman",1,1,1,1
"access_idea_vote_sale_salesman","idea.vote.sale","model_idea_vote","base.group_sale_salesman",1,1,1,1
"access_idea_category_user","idea.category user","model_idea_category","base.group_tool_user",1,1,1,1
"access_idea_idea_user","idea.idea user","model_idea_idea","base.group_tool_user",1,1,1,1
"access_idea_vote_user","idea.vote user","model_idea_vote","base.group_tool_user",1,1,1,1
-"access_idea_category_manager","idea.category manager","model_idea_category","base.group_tool_manager",1,0,0,0
-"access_idea_idea_manager","idea.idea manager","model_idea_idea","base.group_tool_manager",1,0,0,0
-"access_idea_vote_manager","idea.vote manager","model_idea_vote","base.group_tool_manager",1,0,0,0
+"access_idea_category_manager","idea.category manager","model_idea_category","base.group_tool_manager",1,1,1,1
+"access_idea_idea_manager","idea.idea manager","model_idea_idea","base.group_tool_manager",1,1,1,1
+"access_idea_vote_manager","idea.vote manager","model_idea_vote","base.group_tool_manager",1,1,1,1
"access_idea_vote_stat_user","idea.vote.stat user","model_idea_vote_stat","base.group_tool_user",1,1,1,1
"access_idea_comment_user","idea.comment user","model_idea_comment","base.group_tool_user",1,1,1,1
"access_report_vote_manager","report.vote manager","model_report_vote","base.group_tool_manager",1,1,1,1
"access_report_vote_system","report.vote system","model_report_vote","base.group_system",1,0,0,0
"access_idea_vote_stat_manager","idea.vote.stat manager","model_idea_vote_stat","base.group_tool_manager",1,1,1,1
"access_idea_vote_stat_system","idea.vote.stat system","model_idea_vote_stat","base.group_system",1,1,1,1
+"access_idea_comment_manager","idea.comment.manager","model_idea_comment","base.group_tool_manager",1,1,1,1
description: I want that Technical presentation are arranged for 1 hours in every
day.\nso, on that presentation, we can know all things what improvement and development
are done in our company.\n\n\n\n\n
- title: Technical presentation for 1 hours in every day
+ name: Technical presentation for 1 hours in every day
user_id: base.user_root
- |
raise osv.except_osv(_('Warning !'),_("You can not give Vote for this idea more than %s times") % (user_limit))
if idea.state != 'open':
- raise osv.except_osv(_('Warning !'), _('Idea should be in \
+ raise osv.except_osv(_('Warning !'), _('Idea must be in \
\'Open\' state before vote for that idea.'))
return False
_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()
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 = {
'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):
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
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()
id="menu_lunch" sequence="1" />
<menuitem name="Reporting" parent="base.menu_tools"
- id="base.menu_lunch_reporting" sequence="6" />
+ id="base.menu_lunch_reporting" sequence="6" groups="base.group_system,base.group_tool_manager"/>
<menuitem name="Lunch Orders"
parent="base.menu_lunch_reporting"
id="menu_lunch_reporting_order" sequence="1" />
<menuitem name="Configuration" parent="base.menu_tools"
- id="base.menu_lunch_survey_root" sequence="20" />
+ id="base.menu_lunch_survey_root" sequence="20" groups="base.group_system"/>
<menuitem name="Lunch" parent="base.menu_lunch_survey_root"
id="menu_lunch_category_root_configuration" sequence="1" />
<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"
<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>
<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>
<!-- 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"/>
<!-- 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" />
<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>
<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>
<!-- 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>
<!-- 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>
<field name="arch" type="xml">
<form string="Products">
<field name="name" select="1"/>
- <field name="category_id" widget='selection' select="1"/>
- <field name="description" select="1"/>
- <field name="price" select="1"/>
- <field name="active" select="1"/>
+ <field name="category_id" widget="selection"/>
+ <field name="description" />
+ <field name="price" />
+ <field name="active"/>
</form>
</field>
</record>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Products">
- <field name="name" select="1"/>
- <field name="category_id" select="1"/>
- <field name="description" select="1"/>
- <field name="price" select="1"/>
+ <field name="name"/>
+ <field name="category_id"/>
+ <field name="description"/>
+ <field name="price"/>
</tree>
</field>
</record>
+<!-- Lunch Product Search view -->
+
+ <record model="ir.ui.view" id="view_lunch_product_search">
+ <field name="name">Products</field>
+ <field name="model">lunch.product</field>
+ <field name="type">search</field>
+ <field name="arch" type="xml">
+ <search string="Products">
+ <field name="name" />
+ <field name="category_id" widget="selection"/>
+ <field name="description" />
+ <field name="price"/>
+ </search>
+ </field>
+ </record>
+
<!-- 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>
+ <field name="view_id" ref="view_lunch_product_tree"/>
+ <field name="search_view_id" ref="view_lunch_product_search"/>
</record>
- <menuitem name="Tools/Lunch/Configuration/Products"
- id="menu_lunch_product_form" action="action_lunch_product_form"
- sequence="1" />
-
<menuitem name="Products"
parent="menu_lunch_category_root_configuration"
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" />
<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" />
<field name="arch" type="xml">
<search string="Box Amount by User">
<group>
+ <filter icon="terp-go-year" string=" Year "
+ domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>=',time.strftime('%%Y-01-01'))]"
+ help="Box amount in current year"/>
+ <filter icon="terp-go-month" string=" Month "
+ name="month"
+ domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>=',time.strftime('%%Y-%%m-01'))]"
+ help="Box amount in current month"/>
+ <filter icon="terp-go-week"
+ string=" Month-1 "
+ separator="1"
+ domain="[('date','<=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('date','>',(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"/>
<field name="amount" select="1"/>
<!-- 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>
"access_lunch_category","lunch.category","model_lunch_category","base.group_user",1,1,1,1
"access_lunch_product","lunch.product","model_lunch_product","base.group_user",1,1,1,1
"access_lunch_cashbox","lunch.cashbox","model_lunch_cashbox","base.group_user",1,1,1,1
-"access_lunch_cashmove","lunch.cashmove","model_lunch_cashmove","base.group_user",1,1,1,1
"access_lunch_order","lunch.order","model_lunch_order","base.group_user",1,1,1,1
"access_report_lunch_amount","report.lunch.amount","model_report_lunch_amount","base.group_user",1,1,1,1
"access_lunch_order_sale_salesman","lunch.order.sale","model_lunch_order","base.group_sale_salesman",1,1,1,1
"access_lunch_order_user","lunch.order user","model_lunch_order","base.group_tool_user",1,1,1,1
-"access_lunch_order_manager","lunch.order manager","model_lunch_order","base.group_tool_manager",1,0,0,0
+"access_lunch_order_manager","lunch.order manager","model_lunch_order","base.group_tool_manager",1,1,1,1
"access_lunch_cashmove_user","lunch.cashmove user","model_lunch_cashmove","base.group_tool_user",1,1,1,1
-"access_lunch_cashmove_manager","lunch.cashmove manager","model_lunch_cashmove","base.group_tool_manager",1,0,0,0
+"access_lunch_cashmove_manager","lunch.cashmove manager","model_lunch_cashmove","base.group_tool_manager",1,1,1,1
"access_report_lunch_amount_manager","report.lunch.amount manager","model_report_lunch_amount","base.group_tool_manager",1,1,1,1
"access_lunch_category_system","lunch.category system","model_lunch_category","base.group_system",1,1,1,1
"access_lunch_product_system","lunch.product system","model_lunch_product","base.group_system",1,1,1,1
<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>
<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>
'lunch':fields.boolean('Lunch Orders',help='Installs tools for lunch module'),
'subscription':fields.boolean('Recurring Documents',help='Installs tools for subscription module'),
'survey':fields.boolean('Survey',help='Installs tools for survey module'),
+ 'idea':fields.boolean('Idea',help='Installs tools for idea module'),
'audittrail':fields.boolean('Audit Trail',help='Installs tools for audittrail module'),
}
_defaults = {
<field name="lunch"/>
<field name="subscription"/>
<field name="survey"/>
+ <field name="idea"/>
<field name="audittrail"/>
</group>
</data>
'depends': ['base'],
'init_xml': [],
'update_xml': ['security/subcription_security.xml', 'security/ir.model.access.csv', 'subscription_view.xml'],
- 'demo_xml': [],
+ 'demo_xml': ['subscription_demo.xml',],
'installable': True,
'active': False,
'certificate': '0029454782573',
--- /dev/null
+<?xml version="1.0" ?>
+<openerp>
+ <data>
+ <record id="subscription_document_partner0" model="subscription.document">
+ <field eval="1" name="active"/>
+ <field name="model" ref="base.model_res_partner"/>
+ <field name="name">Partner</field>
+ </record>
+ <record id="subscription_document_fields_2" model="subscription.document.fields">
+ <field name="field" ref="base.field_res_partner_name"/>
+ <field name="value">false</field>
+ <field model="subscription.document" name="document_id" search="[('name', '=', u'Partner')]"/>
+ </record>
+ <record id="subscription_document_fields_3" model="subscription.document.fields">
+ <field name="field" ref="base.field_res_partner_address"/>
+ <field model="subscription.document" name="document_id" search="[('name', '=', u'Partner')]"/>
+ </record>
+ </data>
+</openerp>
\ No newline at end of file
<field name="arch" type="xml">
<tree string="Subscriptions">
<field name="name"/>
- <field name="active" groups="base.group_extended"/>
- <field name="user_id"/>
<field name="partner_id"/>
+ <field name="active" groups="base.group_extended"/>
+ <field name="user_id" select="1"/>
<field name="state"/>
+ <button name="set_process" states="draft" string="Process" type="object" icon="terp-check"/>
+ <button name="set_done" states="running" string="Done" type="object" icon="terp-gtk-stop"/>
+ <button name="set_draft" states="done" string="Set to Draft" type="object" icon="terp-document-new"/>
</tree>
</field>
</record>
<field name="arch" type="xml">
<search string="Search Subscription">
<group col="10" colspan="4">
+ <filter icon="terp-check"
+ string="Running"
+ domain="[('state','=','running')]"/>
+ <separator orientation="vertical"/>
+ <filter string="This Week" icon="terp-go-week" domain="[('date_init','<=', time.strftime('%%Y-%%m-%%d')), ('date_init','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
+ <filter icon="terp-go-today" string="Today"
+ domain="[('date_init','<', time.strftime('%%Y-%%m-%%d 23:59:59')), ('date_init','>=', time.strftime('%%Y-%%m-%%d 00:00:00'))]"/>
+ <separator orientation="vertical"/>
<field name="name"/>
- <field name="user_id" widget="selection"/>
+ <field name="user_id" select="1"/>
+ <field name="partner_id"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="4" col="4">
- <filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
+ <filter string="User" icon="terp-personal" name="User" domain="[]" context="{'group_by':'user_id'}"/>
+ <filter string="Partner" icon="terp-personal" name="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
+ <separator orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
<field name="res_model">subscription.subscription</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_subscription_tree"/>
+ <field name="context">{'search_default_User':1}</field>
<field name="search_view_id" ref="view_subscription_filter" />
</record>
<menuitem action="action_subscription_form" id="menu_action_subscription_form" parent="subscription.next_id_45"/>
<group col="10" colspan="4">
<field name="name"/>
<field name="model"/>
- </group>
+ </group>
</search>
</field>
</record>
<field name="arch" type="xml">
<form string="Subscription Document Fields">
<field name="field" select="1"/>
+ <newline/>
<field name="value"/>
</form>
</field>