Bugfixes
bzr revid: pinky-340b9578587457bcd1cf26c145909ad55ec64016
This commit is contained in:
parent
d046206db0
commit
cf6a2fa41e
|
@ -135,8 +135,12 @@ class crm_case_categ(osv.osv):
|
|||
_description = "Category of case"
|
||||
_columns = {
|
||||
'name': fields.char('Case Category Name', size=64, required=True),
|
||||
'probability': fields.float('Probability', required=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Case Section'),
|
||||
}
|
||||
_defaults = {
|
||||
'probability': lambda *args: 0.0
|
||||
}
|
||||
crm_case_categ()
|
||||
|
||||
class crm_case_rule(osv.osv):
|
||||
|
@ -256,6 +260,8 @@ class crm_case(osv.osv):
|
|||
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
}
|
||||
_order = 'priority, date_deadline, id'
|
||||
|
||||
|
||||
def _action(self, cr, uid, cases, state_to, scrit=[], context={}):
|
||||
action_ids = self.pool.get('crm.case.rule').search(cr, uid, scrit)
|
||||
level = MAX_LEVEL
|
||||
|
@ -453,6 +459,13 @@ class crm_case(osv.osv):
|
|||
data['email_from'] = self.pool.get('res.partner.address').browse(cr, uid, addr['contact']).email
|
||||
return {'value':data}
|
||||
|
||||
def onchange_categ_id(self, cr, uid, ids, categ, context={}):
|
||||
if not categ:
|
||||
return {'value':{}}
|
||||
cat = self.pool.get('crm.case.categ').browse(cr, uid, categ, context).probability
|
||||
return {'value':{'probability':cat}}
|
||||
|
||||
|
||||
def onchange_partner_address_id(self, cr, uid, ids, part, email=False):
|
||||
if not part:
|
||||
return {'value':{}}
|
||||
|
|
|
@ -91,6 +91,7 @@
|
|||
<form string="Case Category">
|
||||
<field name="name" select="1"/>
|
||||
<field name="section_id" select="1"/>
|
||||
<field name="probability"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -234,7 +235,7 @@
|
|||
<field name="name" select="1"/>
|
||||
<field name="id" select="1"/>
|
||||
<field name="section_id"/>
|
||||
<field name="categ_id" select="1"/>
|
||||
<field name="categ_id" select="1" on_change="onchange_categ_id(categ_id)"/>
|
||||
<field name="date" select="1"/>
|
||||
<field name="priority"/>
|
||||
<field name="partner_id" select="1" on_change="onchange_partner_id(partner_id, email_from)"/>
|
||||
|
|
|
@ -63,7 +63,7 @@ class invoice_create(wizard.interface):
|
|||
'payment_term': (partner.property_payment_term and partner.property_payment_term[0]) or False,
|
||||
'account_id': partner.property_account_receivable[0],
|
||||
'currency_id': account.pricelist_id.currency_id.id,
|
||||
'project_id': account.id
|
||||
#'project_id': account.id
|
||||
}
|
||||
last_invoice = pool.get('account.invoice').create(cr, uid, curr_invoice)
|
||||
invoices.append(last_invoice)
|
||||
|
|
Loading…
Reference in New Issue