[Merge]: lp:~openerp-dev/openobject-addons/trunk-bugfixes-Ind
bzr revid: rch@tinyerp.com-20110415104918-6fi8wpzyk66ogp04
This commit is contained in:
@@ -454,7 +454,7 @@
|
||||
</group>
|
||||
<group colspan="2" col="2" groups="base.group_extended">
|
||||
<separator string="Sequence" colspan="4"/>
|
||||
<field name="sequence_id" required="0"/>
|
||||
<field name="sequence_id"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Entry Controls" groups="base.group_extended">
|
||||
|
||||
@@ -328,7 +328,7 @@ class payment_line(osv.osv):
|
||||
required=True, help='Payment amount in the partner currency'),
|
||||
'currency': fields.many2one('res.currency','Partner Currency', required=True),
|
||||
'company_currency': fields.many2one('res.currency', 'Company Currency', readonly=True),
|
||||
'bank_id': fields.many2one('res.partner.bank', 'Destination Bank account'),
|
||||
'bank_id': fields.many2one('res.partner.bank', 'Destination Bank Account'),
|
||||
'order_id': fields.many2one('payment.order', 'Order', required=True,
|
||||
ondelete='cascade', select=True),
|
||||
'partner_id': fields.many2one('res.partner', string="Partner", required=True, help='The Ordering Customer'),
|
||||
|
||||
@@ -1296,7 +1296,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
|
||||
if name == "UNTIL":
|
||||
is_until = True
|
||||
value = parser.parse(value)
|
||||
rrule_until_date = parser.parse(value.strftime("%Y-%m-%d"))
|
||||
rrule_until_date = parser.parse(value.strftime("%Y-%m-%d %H:%M:%S"))
|
||||
if until_date and until_date >= rrule_until_date:
|
||||
until_date = rrule_until_date
|
||||
if until_date:
|
||||
|
||||
@@ -15,8 +15,10 @@
|
||||
<separator string="Description" colspan="4"/>
|
||||
<field name="description" colspan="4" nolabel="1"/>
|
||||
<separator colspan="4"/>
|
||||
|
||||
|
||||
<group col="4" colspan="4">
|
||||
<label string="" colspan="2"/>
|
||||
<button special="cancel" string="_Close" icon="gtk-close"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -199,6 +199,13 @@ class crm_case(object):
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
return user.context_section_id.id or False
|
||||
|
||||
def unlink(self, cr, uid, ids, context={}):
|
||||
for case in self.browse(cr, uid, ids, context):
|
||||
if (not case.section_id.allow_unlink) and (case.state <> 'draft'):
|
||||
raise osv.except_osv(_('Warning !'),
|
||||
_('You can not delete this case. You should better cancel it.'))
|
||||
return super(crm_case, self).unlink(cr, uid, ids, context)
|
||||
|
||||
def _find_next_stage(self, cr, uid, stage_list, index, current_seq, stage_pool, context=None):
|
||||
if index + 1 == len(stage_list):
|
||||
return False
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
<tree string="Invitation details" editable="top">
|
||||
<field name="sent_by_uid" string="From"/>
|
||||
<field name="user_id" string="To"/>
|
||||
<field name="email" string="Mail TO"/>
|
||||
<field name="email" string="Mail To"/>
|
||||
<field name="role" select="1" />
|
||||
<field name="state" />
|
||||
<button name="do_tentative"
|
||||
@@ -179,7 +179,7 @@
|
||||
<field name="count" attrs="{'invisible' : [('end_type', '!=', 'count')] }"/>
|
||||
<label string=" " colspan="2" />
|
||||
<newline />
|
||||
<field name="end_date" attrs="{'invisible' : [('end_type', '!=', 'end_date')] }"/>
|
||||
<field name="end_date" attrs="{'invisible' : [('end_type', '!=', 'end_date')], 'required': [('end_type', '=', 'end_date')]}"/>
|
||||
<newline />
|
||||
|
||||
|
||||
|
||||
@@ -136,6 +136,26 @@
|
||||
</group>
|
||||
</page>
|
||||
|
||||
<page string="Extra Info" groups="base.group_extended">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Dates" colspan="2"/>
|
||||
<field name="create_date"/>
|
||||
<field name="write_date"/>
|
||||
<field name="date_closed"/>
|
||||
<field name="date_open"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Misc" colspan="2"/>
|
||||
<field name="active"/>
|
||||
<field name="day_open"/>
|
||||
<field name="day_close"/>
|
||||
<field name="referred"/>
|
||||
</group>
|
||||
<separator colspan="4" string="References"/>
|
||||
<field name="ref"/>
|
||||
<field name="ref2"/>
|
||||
</page>
|
||||
|
||||
<page string="Communication & History" groups="base.group_extended">
|
||||
<group colspan="4">
|
||||
<field colspan="4" name="email_cc" string="Global CC" widget="char" size="512"/>
|
||||
@@ -188,25 +208,7 @@
|
||||
context="{'mail':'new', 'model': 'crm.lead'}"
|
||||
icon="terp-mail-message-new" type="action" />
|
||||
</page>
|
||||
<page string="Extra Info" groups="base.group_extended">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Dates" colspan="2"/>
|
||||
<field name="create_date"/>
|
||||
<field name="write_date"/>
|
||||
<field name="date_closed"/>
|
||||
<field name="date_open"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Misc" colspan="2"/>
|
||||
<field name="active"/>
|
||||
<field name="day_open"/>
|
||||
<field name="day_close"/>
|
||||
<field name="referred"/>
|
||||
</group>
|
||||
<separator colspan="4" string="References"/>
|
||||
<field name="ref"/>
|
||||
<field name="ref2"/>
|
||||
</page>
|
||||
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
@@ -253,6 +255,9 @@
|
||||
<button name="case_close" string="Won"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-apply" />
|
||||
<button name="case_cancel" string="Lost"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-cancel" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<data>
|
||||
|
||||
<menuitem icon="terp-partner" id="base.menu_base_partner" name="Sales" sequence="0"
|
||||
groups="base.group_sale_manager,base.group_sale_salesman,base.group_partner_manager"/>
|
||||
groups="base.group_sale_manager,base.group_sale_salesman"/>
|
||||
|
||||
<menuitem id="base.menu_crm_config_lead" name="Leads & Opportunities"
|
||||
parent="base.menu_base_config" sequence="1" groups="base.group_sale_manager"/>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<field name="model">crm.partner2opportunity</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Convert To Opportunity">
|
||||
<form string="Create Opportunity">
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<newline/>
|
||||
|
||||
@@ -177,9 +177,10 @@
|
||||
<group colspan="4">
|
||||
<field colspan="4" name="email_cc" string="Global CC" widget="char"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form" readonly="1">
|
||||
<tree string="History">
|
||||
<field name="display_text" string="History Information"/>
|
||||
<field name="history" invisible="1"/>
|
||||
<button
|
||||
string="Reply"
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
|
||||
@@ -29,7 +29,7 @@ class hr_action_reason(osv.osv):
|
||||
_description = "Action Reason"
|
||||
_columns = {
|
||||
'name': fields.char('Reason', size=64, required=True, help='Specifies the reason for Signing In/Signing Out.'),
|
||||
'action_type': fields.selection([('sign_in', 'Sign in'), ('sign_out', 'Sign out')], "Action's type"),
|
||||
'action_type': fields.selection([('sign_in', 'Sign in'), ('sign_out', 'Sign out')], "Action Type"),
|
||||
}
|
||||
_defaults = {
|
||||
'action_type': 'sign_in',
|
||||
@@ -137,7 +137,7 @@ class hr_employee(osv.osv):
|
||||
|
||||
res = {'action': type, 'employee_id': emp['id']}
|
||||
if dt:
|
||||
res['name'] = dt
|
||||
res['name'] = dt
|
||||
id = obj_attendance.create(cr, uid, res, context=context)
|
||||
|
||||
if type != 'action':
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Evaluation">
|
||||
<group col='10' colspan='4'>
|
||||
<filter icon="terp-check" string="Current" domain="[('state','=','wait'))]" help="Evaluations that are in waiting state"/>
|
||||
<filter icon="terp-check" string="Current" domain="[('state','=','wait')]" help="Evaluations that are in waiting state"/>
|
||||
<filter icon="terp-camera_test" string="In progress" domain="[('state','=','progress')]" help="Evaluations that are in progress state"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-go-week" string="7 Days" help="Evaluations to close within the next 7 days"
|
||||
|
||||
@@ -113,8 +113,10 @@ class hr_holidays(osv.osv):
|
||||
'name': fields.char('Description', required=True, size=64),
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
|
||||
('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')],
|
||||
'State', readonly=True, help='When the holiday request is created the state is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the state is \'Waiting Approval\'.\
|
||||
If the admin accepts it, the state is \'Approved\'. If it is refused, the state is \'Refused\'.'),
|
||||
'State', readonly=True, help='The state is set to \'Draft\', when a holiday request is created.\
|
||||
\nThe state is \'Waiting Approval\', when holiday request is confirmed by user.\
|
||||
\nThe state is \'Refused\', when holiday request is refused by manager.\
|
||||
\nThe state is \'Approved\', when holiday request is approved by manager.'),
|
||||
'user_id':fields.related('employee_id', 'user_id', type='many2one', relation='res.users', string='User', store=True),
|
||||
'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'date_to': fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<newline/>
|
||||
<field name="state" colspan="2"/>
|
||||
<group colspan="2" col="6">
|
||||
<button string="Refuse" name="refuse" states="confirm" type="workflow" icon="gtk-no" groups="base.group_hr_user,base.group_hr_manager"/>
|
||||
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_user,base.group_hr_manager"/>
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
|
||||
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_user"/>
|
||||
<button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_user"/>
|
||||
|
||||
@@ -31,11 +31,28 @@ DefaultVoteValue = '50'
|
||||
class idea_category(osv.osv):
|
||||
""" Category of Idea """
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if not len(ids):
|
||||
return []
|
||||
reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
|
||||
res = []
|
||||
for record in reads:
|
||||
name = record['name']
|
||||
if record['parent_id']:
|
||||
name = record['parent_id'][1]+' / '+name
|
||||
res.append((record['id'], name))
|
||||
return res
|
||||
|
||||
def _categ_name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):
|
||||
res = self.name_get(cr, uid, ids, context=context)
|
||||
return dict(res)
|
||||
|
||||
_name = "idea.category"
|
||||
_description = "Idea Category"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Category', size=64, required=True),
|
||||
'complete_name': fields.function(_categ_name_get_fnc, method=True, type="char", string='Name'),
|
||||
'summary': fields.text('Summary'),
|
||||
'parent_id': fields.many2one('idea.category', 'Parent Categories', ondelete='set null'),
|
||||
'child_ids': fields.one2many('idea.category', 'parent_id', 'Child Categories'),
|
||||
@@ -46,6 +63,10 @@ class idea_category(osv.osv):
|
||||
]
|
||||
_order = 'parent_id,name asc'
|
||||
|
||||
_constraints = [
|
||||
(osv.osv._check_recursion, 'Error ! You can not create recursive categories.', ['parent_id'])
|
||||
]
|
||||
|
||||
idea_category()
|
||||
|
||||
class idea_idea(osv.osv):
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<field name="field_parent">child_ids</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Category of ideas">
|
||||
<field name="name"/>
|
||||
<field name="complete_name"/>
|
||||
<field name="parent_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -234,11 +234,11 @@
|
||||
<field name="count_votes" />
|
||||
</group>
|
||||
<field name="stat_vote_ids" colspan="4" mode="graph,tree" nolabel="1">
|
||||
<graph string="Vots Statistics" type="bar">
|
||||
<graph string="Votes Statistics" type="bar">
|
||||
<field name="score"/>
|
||||
<field name="nbr"/>
|
||||
</graph>
|
||||
<tree string="Vots Statistics">
|
||||
<tree string="Votes Statistics">
|
||||
<field name="score"/>
|
||||
<field name="nbr"/>
|
||||
</tree>
|
||||
|
||||
@@ -267,7 +267,7 @@ class pos_order(osv.osv):
|
||||
'lines': fields.one2many('pos.order.line', 'order_id', 'Order Lines', states={'draft': [('readonly', False)]}, readonly=True),
|
||||
'price_type': fields.selection([
|
||||
('tax_excluded','Tax excluded')],
|
||||
'Price method', required=True),
|
||||
'Price Method', required=True),
|
||||
'statement_ids': fields.one2many('account.bank.statement.line', 'pos_statement_id', 'Payments', states={'draft': [('readonly', False)]}, readonly=True),
|
||||
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, states={'draft': [('readonly', False)]}, readonly=True),
|
||||
'partner_id': fields.many2one('res.partner', 'Customer', change_default=True, select=1, states={'draft': [('readonly', False)], 'paid': [('readonly', False)]}),
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<field domain="[('project_id','=',project_id), ('state','in', ['draft','open'])]" name="sprint_id" select="1"/>
|
||||
<button name="%(action_postpone_wizard)d" string="Postpone" type="action"
|
||||
help="Postpone backlog" colspan="2"
|
||||
icon="gtk-convert" attrs="{'invisible':[('state','=','done')]}"/>
|
||||
icon="gtk-convert" attrs="{'invisible':[('state','in',['done', 'cancel'])]}"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="sequence" groups="base.group_extended"/>
|
||||
<field name="create_date"/>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"access_stock_incoterms_manager","stock.incoterms manager","model_stock_incoterms","stock.group_stock_manager",1,1,1,1
|
||||
"access_stock_warehouse_manager","stock.warehouse.manager","model_stock_warehouse","stock.group_stock_manager",1,1,1,1
|
||||
"access_stock_warehouse_user","stock.warehouse.user","model_stock_warehouse","base.group_user",1,0,0,0
|
||||
"access_stock_location__partner_manager","stock.location.partner.manager","model_stock_location","base.group_partner_manager",1,1,1,1
|
||||
"access_stock_location_manager","stock.location.manager","model_stock_location","stock.group_stock_manager",1,1,1,1
|
||||
"access_stock_location_user","stock.location.user","model_stock_location","base.group_user",1,0,0,0
|
||||
"access_stock_journal_user","stock.journal.user","model_stock_journal","base.group_user",1,0,0,0
|
||||
|
||||
|
Reference in New Issue
Block a user