[IMP] add bollean field in project.project for some module

bzr revid: sgo@tinyerp.com-20120327070940-238ejuwcrmcz6ax3
This commit is contained in:
Sanjay Gohel (Open ERP) 2012-03-27 12:39:40 +05:30
parent 162abf346d
commit 51647e7515
9 changed files with 29 additions and 3 deletions

View File

@ -191,6 +191,7 @@ class project(osv.osv):
'warn_header': fields.text('Mail Header', help="Header added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'warn_footer': fields.text('Mail Footer', help="Footer added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'type_ids': fields.many2many('project.task.type', 'project_task_type_rel', 'project_id', 'type_id', 'Tasks Stages', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'task': fields.boolean('Task',help = "If you check this field tasks appears in kanban view"),
}
def _get_type_common(self, cr, uid, context):
ids = self.pool.get('project.task.type').search(cr, uid, [('project_default','=',1)], context=context)

View File

@ -19,11 +19,12 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Project">
<group colspan="6" col="6">
<group colspan="4" col="8">
<field name="name" string="Project Name" select="1"/>
<field name="analytic_account_id" invisible="1" required="0"/>
<field name="parent_id" string="Parent" domain="[('id','!=',analytic_account_id)]" context="{'current_model': 'project.project'}"/>
<field name="user_id" string="Project Manager" select="1" attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"/>
<field name="task"/>
<field name="date_start" string="Start Date" attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"/>
<field name="date" string="End Date" attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"/>
<field name="progress_rate" widget="progressbar"/>

View File

@ -489,7 +489,8 @@ class project(osv.osv):
_inherit = "project.project"
_columns = {
'project_escalation_id' : fields.many2one('project.project','Project Escalation', help='If any issue is escalated from the current Project, it will be listed under the project selected here.', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'reply_to' : fields.char('Reply-To Email Address', size=256)
'reply_to' : fields.char('Reply-To Email Address', size=256),
'issues' : fields.boolean('Issues',help = "If you check this field issues are appears in kanban view")
}
def _check_escalation(self, cr, uid, ids, context=None):

View File

@ -53,7 +53,7 @@
view_mode="tree,form,calendar,graph"
view_type="form"/>
<menuitem name="Issues" id="menu_project_issue_track" parent="base.menu_aftersale"
<menuitem name="Issues" id="menu_project_issue_track"
action="project_issue_categ_act0" sequence="15"/>
</data>
</openerp>

View File

@ -370,6 +370,9 @@
<field name="type">form</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='progress_rate']" position="after">
<field name="issues"/>
</xpath>
<field name="priority" position="before">
<field name="project_escalation_id"/>
<field name="reply_to"/>

View File

@ -217,6 +217,7 @@ class project(osv.osv):
_inherit = "project.project"
_columns = {
'phase_ids': fields.one2many('project.phase', 'project_id', "Project Phases"),
'phase' : fields.boolean('Phase',help = "If you check this field Phases are appears in kanban view")
}
def schedule_phases(self, cr, uid, ids, context=None):
context = context or {}

View File

@ -98,6 +98,17 @@
# Project Phase
# ------------------------------------------------------
<record id="project_phase_form" model="ir.ui.view">
<field name="name">Inherit project form : Phase</field>
<field name="model">project.project</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='progress_rate']" position="after">
<field name="phase"/>
</xpath>
</field>
</record>
<record id="view_project_phase_form" model="ir.ui.view">
<field name="name">project.phase.form</field>
<field name="model">project.phase</field>

View File

@ -29,6 +29,9 @@ from tools.translate import _
class project_project(osv.osv):
_inherit = 'project.project'
_columns = {
'timesheets' : fields.boolean('Timesheets',help = "If you check this field timesheets appears in kanban view")
}
def onchange_partner_id(self, cr, uid, ids, part=False, context=None):
res = super(project_project, self).onchange_partner_id(cr, uid, ids, part, context)
if part and res and ('value' in res):

View File

@ -7,6 +7,11 @@
<field name="type">form</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='progress_rate']" position='after'>
<field name="timesheets"/>
</xpath>
<field name="warn_customer" position="after">
<group colspan="4" col="4">
<separator colspan="4" string="Invoicing Data"/>