@@ -531,6 +531,7 @@ class account_move_line(osv.osv):
|
||||
|
||||
def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context={}):
|
||||
id_set = ','.join(map(str, ids))
|
||||
|
||||
lines = self.browse(cr, uid, ids, context=context)
|
||||
unrec_lines = filter(lambda x: not x['reconcile_id'], lines)
|
||||
credit = debit = 0.0
|
||||
@@ -707,7 +708,6 @@ class account_move_line(osv.osv):
|
||||
return result
|
||||
|
||||
def unlink(self, cr, uid, ids, context={}, check=True):
|
||||
print "CC"
|
||||
self._update_check(cr, uid, ids, context)
|
||||
result = False
|
||||
for line in self.browse(cr, uid, ids, context):
|
||||
|
||||
@@ -63,7 +63,8 @@ def _data_save(self, cr, uid, data, context):
|
||||
|
||||
period = pool.get('account.period').browse(cr, uid, data['form']['period_id'], context=context)
|
||||
new_fyear = pool.get('account.fiscalyear').browse(cr, uid, data['form']['fy2_id'], context=context)
|
||||
|
||||
old_fyear = pool.get('account.fiscalyear').browse(cr, uid, data['form']['fy_id'], context=context)
|
||||
|
||||
new_journal = data['form']['journal_id']
|
||||
new_journal = pool.get('account.journal').browse(cr, uid, new_journal, context=context)
|
||||
|
||||
@@ -192,8 +193,12 @@ def _data_save(self, cr, uid, data, context):
|
||||
offset += limit
|
||||
|
||||
ids = pool.get('account.move.line').search(cr, uid, [('journal_id','=',new_journal.id),
|
||||
('period_id.fiscalyear_id','=',new_fyear.id)])
|
||||
('period_id.fiscalyear_id','=',old_fyear.id)])
|
||||
context['fy_closing'] = True
|
||||
if not ids:
|
||||
raise wizard.except_wizard(_('UserError'),
|
||||
_('The old fiscal year does not have any entry to reconcile!'))
|
||||
|
||||
pool.get('account.move.line').reconcile(cr, uid, ids, context=context)
|
||||
new_period = data['form']['period_id']
|
||||
ids = pool.get('account.journal.period').search(cr, uid, [('journal_id','=',new_journal.id),('period_id','=',new_period)])
|
||||
|
||||
+1
-1
@@ -327,7 +327,7 @@ class crm_case(osv.osv):
|
||||
|
||||
_columns = {
|
||||
'id': fields.integer('ID', readonly=True),
|
||||
'name': fields.char('Description',size=64),
|
||||
'name': fields.char('Description',size=64,required=True),
|
||||
'priority': fields.selection(AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'active': fields.boolean('Active'),
|
||||
'description': fields.text('Your action'),
|
||||
|
||||
@@ -65,7 +65,7 @@ class hr_expense_expense(osv.osv):
|
||||
'date_valid': fields.date('Date Valided'),
|
||||
'user_valid': fields.many2one('res.users', 'Validation User'),
|
||||
'account_move_id': fields.many2one('account.move', 'Account Move'),
|
||||
'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines'),
|
||||
'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ),
|
||||
'note': fields.text('Note'),
|
||||
'amount': fields.function(_amount, method=True, string='Total Amount'),
|
||||
'invoice_id': fields.many2one('account.invoice', 'Invoice'),
|
||||
@@ -186,10 +186,10 @@ class hr_expense_line(osv.osv):
|
||||
'date_value': fields.date('Date', required=True),
|
||||
'expense_id': fields.many2one('hr.expense.expense', 'Expense', ondelete='cascade', select=True),
|
||||
'total_amount': fields.function(_amount, method=True, string='Total'),
|
||||
'unit_amount': fields.float('Unit Price', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'unit_quantity': fields.float('Quantities', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'product_id': fields.many2one('product.product', 'Product', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'uom_id': fields.many2one('product.uom', 'UoM', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'unit_amount': fields.float('Unit Price'),
|
||||
'unit_quantity': fields.float('Quantities' ),
|
||||
'product_id': fields.many2one('product.product', 'Product' ),
|
||||
'uom_id': fields.many2one('product.uom', 'UoM' ),
|
||||
'description': fields.text('Description'),
|
||||
'analytic_account': fields.many2one('account.analytic.account','Analytic account'),
|
||||
'ref': fields.char('Reference', size=32),
|
||||
|
||||
Reference in New Issue
Block a user