[MERGE] merge from trunk addons
bzr revid: mra@mra-laptop-20100916133802-z1j6grp89ut0ijbb
This commit is contained in:
@@ -730,7 +730,7 @@ class account_bank_statement_line(osv.osv):
|
||||
'reconcile_amount': fields.function(_reconcile_amount,
|
||||
string='Amount reconciled', method=True, type='float'),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bank statement lines."),
|
||||
'company_id': fields.related('statement_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True),
|
||||
'company_id': fields.related('statement_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
'name': lambda self,cr,uid,context={}: self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement.line'),
|
||||
|
||||
@@ -267,7 +267,7 @@ class account_cash_statement(osv.osv):
|
||||
super(account_cash_statement, self).write(cr, uid, ids, vals)
|
||||
res = self._get_starting_balance(cr, uid, ids)
|
||||
for rs in res:
|
||||
super(account_cash_statement, self).write(cr, uid, rs, res.get(rs))
|
||||
super(account_cash_statement, self).write(cr, uid, [rs], res.get(rs))
|
||||
return True
|
||||
|
||||
def onchange_journal_id(self, cr, uid, statement_id, journal_id, context={}):
|
||||
|
||||
@@ -207,9 +207,9 @@
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Parent Account" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
|
||||
<filter string="Parent Account" icon="terp-folder-green" domain="" context="{'group_by':'parent_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="User Type" icon="terp-folder-blue" domain="" context="{'group_by':'user_type'}"/>
|
||||
<filter string="Account Type" icon="terp-folder-blue" domain="" context="{'group_by':'user_type'}"/>
|
||||
<filter string="Internal Type" icon="terp-folder-yellow" domain="" context="{'group_by':'type'}"/>
|
||||
</group>
|
||||
</search>
|
||||
|
||||
@@ -179,7 +179,7 @@ class mailgate_message(osv.osv):
|
||||
|
||||
_columns = {
|
||||
'server_id': fields.many2one('email.server', "Mail Server", readonly=True, select=True),
|
||||
'type':fields.selection([
|
||||
'server_type':fields.selection([
|
||||
('pop', 'POP Server'),
|
||||
('imap', 'IMAP Server'),
|
||||
], 'Server Type', select=True, readonly=True),
|
||||
|
||||
@@ -69,31 +69,4 @@ class account_cash_statement(osv.osv):
|
||||
|
||||
account_cash_statement()
|
||||
|
||||
class account_bank_statement_line(osv.osv):
|
||||
|
||||
def _default_company(self, cr, uid, context={}):
|
||||
""" To get default company for the object"
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of bank statement ids
|
||||
@param context: A standard dictionary for contextual values
|
||||
@return: company
|
||||
"""
|
||||
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
if user.company_id:
|
||||
return user.company_id.id
|
||||
|
||||
return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0]
|
||||
|
||||
_inherit = 'account.bank.statement.line'
|
||||
_columns = {
|
||||
'company_id':fields.many2one('res.company', 'Company', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
'company_id': _default_company,
|
||||
}
|
||||
account_bank_statement_line()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
Reference in New Issue
Block a user