Particulars
@@ -213,7 +227,7 @@
[[ repeatIn(voucher.line_id,'line_id') ]]
-
+
[[ (line_id.partner_id and line_id.partner_id.name) or 'Account']]
@@ -242,7 +256,7 @@
|
- [[ line_id.name ]]-[[voucher.ref]]
+ [[ line_id.name ]]-[[voucher.ref]]
|
@@ -260,13 +274,88 @@
-
+
-
+
- Through :
+ Through :
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+ [[ voucher.narration or '']]
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+ On Account of :
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+ [[ voucher.line_id and voucher.line_id.name and voucher.line_id.name[1] or removeParentNode('para') ]]
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+ Amount (in words) :
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+ [[ convert(voucher.amount) ]]
|
@@ -279,84 +368,14 @@
|
+
+
+
+
+
- [[ voucher.narration or '']]
- |
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- On Account of :
- |
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- [[ voucher.line_id and voucher.line_id.name and voucher.line_id.name[1] or removeParentNode('para') ]]
- |
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- Amount (in words) :
- |
-
-
-
-
- |
-
-
-
-
- |
-
-
-
- [[ convert(voucher.amount) ]]
- |
-
-
-
-
- |
-
-
-
-
- |
-
-
-
-
+
|
@@ -368,57 +387,57 @@
-
+
-
+
-
+
-
+
-
+
-
+
|
-
+
|
-
+
|
-
+
|
- Receiver's Signature
+ Receiver's Signature
|
-
+
|
-
+
|
- Authorised Signatory
+ Authorised Signatory
|
diff --git a/addons/account/security/account_security.xml b/addons/account/security/account_security.xml
index 43e3e32eefd..7344c40754e 100644
--- a/addons/account/security/account_security.xml
+++ b/addons/account/security/account_security.xml
@@ -13,7 +13,7 @@
Accounting / Manager
-
+
Accounting / Accountant and Manager
diff --git a/addons/account/security/analytic_security.xml b/addons/account/security/analytic_security.xml
deleted file mode 100644
index b2543f5fa05..00000000000
--- a/addons/account/security/analytic_security.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/addons/account/test/account_use_model.yml b/addons/account/test/account_use_model.yml
index 20487fa86f4..4eb03a13026 100644
--- a/addons/account/test/account_use_model.yml
+++ b/addons/account/test/account_use_model.yml
@@ -3,7 +3,6 @@
-
!record {model: account.model, id: account_model_mymodelonyears0}:
journal_id: account.expenses_journal
- date: today
lines_id:
- account_id: account.a_recv
credit: 0.0
diff --git a/addons/account/wizard/account_automatic_reconcile.py b/addons/account/wizard/account_automatic_reconcile.py
index 436d320456e..e9a8ab04aac 100644
--- a/addons/account/wizard/account_automatic_reconcile.py
+++ b/addons/account/wizard/account_automatic_reconcile.py
@@ -18,6 +18,7 @@
# along with this program. If not, see .
#
##############################################################################
+
import time
import netsvc
@@ -54,7 +55,7 @@ class account_automatic_reconcile(osv.osv_memory):
'date2': time.strftime('%Y-%m-%d'),
'reconciled': _get_reconciled,
'unreconciled': _get_unreconciled,
- 'power':2
+ 'power': 2
}
#TODO: cleanup and comment this code... For now, it is awfulllll
@@ -143,18 +144,21 @@ class account_automatic_reconcile(osv.osv_memory):
form = self.read(cr, uid, ids, [])[0]
max_amount = form.get('max_amount', 0.0)
power = form['power']
+ allow_write_off = form['allow_write_off']
reconciled = unreconciled = 0
if not form['account_ids']:
raise osv.except_osv(_('UserError'), _('You must select accounts to reconcile'))
for account_id in form['account_ids']:
- if not context.get('allow_write_off', False):
+ if not allow_write_off:
query = "SELECT partner_id FROM account_move_line WHERE account_id=%s AND reconcile_id IS NULL \
AND state <> 'draft' GROUP BY partner_id \
- HAVING ABS(SUM(debit-credit)) <> %s AND count(*)>0"%(account_id, 0.0)
+ HAVING ABS(SUM(debit-credit)) = %s AND count(*)>0"%(account_id, 0.0)
+# HAVING ABS(SUM(debit-credit)) <> %s AND count(*)>0"%(account_id, 0.0)
+# HAVING count(*)>0"%(account_id,)
else:
query = "SELECT partner_id FROM account_move_line WHERE account_id=%s AND reconcile_id IS NULL \
AND state <> 'draft' GROUP BY partner_id \
- HAVING ABS(SUM(debit-credit)) <= %s AND count(*)>0"%(account_id, max_amount or 0.0)
+ HAVING ABS(SUM(debit-credit)) < %s AND count(*)>0"%(account_id, max_amount or 0.0)
# reconcile automatically all transactions from partners whose balance is 0
cr.execute(query)
partner_ids = [id for (id,) in cr.fetchall()]
@@ -170,10 +174,12 @@ class account_automatic_reconcile(osv.osv_memory):
line_ids = [id for (id,) in cr.fetchall()]
if len(line_ids):
reconciled += len(line_ids)
- if not context.get('allow_write_off', False):
- move_line_obj.reconcile_partial(cr, uid, line_ids, 'manual', context={})
- else:
+ if allow_write_off:
move_line_obj.reconcile(cr, uid, line_ids, 'auto', form['writeoff_acc_id'], form['period_id'], form['journal_id'], context)
+# move_line_obj.reconcile_partial(cr, uid, line_ids, 'manual', context={})
+ else:
+ move_line_obj.reconcile_partial(cr, uid, line_ids, 'manual', context={})
+# move_line_obj.reconcile(cr, uid, line_ids, 'auto', form['writeoff_acc_id'], form['period_id'], form['journal_id'], context)
# get the list of partners who have more than one unreconciled transaction
cr.execute(
@@ -240,9 +246,8 @@ class account_automatic_reconcile(osv.osv_memory):
'type': 'ir.actions.act_window',
'target': 'new',
'context': context,
- 'nodestroy':True,
}
account_automatic_reconcile()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py
index 7f89e700b74..8b9cf48d48c 100644
--- a/addons/account/wizard/account_move_journal.py
+++ b/addons/account/wizard/account_move_journal.py
@@ -161,7 +161,7 @@ class account_move_journal(osv.osv_memory):
'view_mode': 'tree,graph,form',
'res_model': 'account.move.line',
'view_id': False,
- 'context': "{'visible_id':%s, 'journal_id': %d, 'search_default_journal_id':%d, 'search_default_period_id':%d}" % (journal_id, journal_id, journal_id, period_id),
+ 'context': "{'visible_id':%s, 'search_default_journal_id':%d, 'search_default_period_id':%d}" % (journal_id, journal_id, period_id),
'type': 'ir.actions.act_window',
'search_view_id': res_id
}
diff --git a/addons/account/wizard/account_reconcile.py b/addons/account/wizard/account_reconcile.py
index 9d822b091d5..e18bd9f9555 100644
--- a/addons/account/wizard/account_reconcile.py
+++ b/addons/account/wizard/account_reconcile.py
@@ -49,38 +49,6 @@ class account_move_line_reconcile(osv.osv_memory):
res.update({'writeoff':data['writeoff']})
return res
- def partial_check(self, cr, uid, ids, context=None):
- mod_obj = self.pool.get('ir.model.data')
- data = self.trans_rec_get(cr, uid, ids, context)
- if context is None:
- context = {}
- if data['writeoff'] == 0:
- model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_account_move_line_reconcile_full')], context=context)
- resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
- return {
- 'name': _('Reconcile'),
- 'context': context,
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_model': 'account.move.line.reconcile',
- 'views': [(resource_id,'form')],
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
- else :
- model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_account_move_line_reconcile_partial')], context=context)
- resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
- return {
- 'name': _('Reconcile'),
- 'context': context,
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_model': 'account.move.line.reconcile',
- 'views': [(resource_id,'form')],
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
-
def trans_rec_get(self, cr, uid, ids, context=None):
account_move_line_obj = self.pool.get('account.move.line')
if context is None:
@@ -117,6 +85,7 @@ class account_move_line_reconcile(osv.osv_memory):
ids = self.pool.get('account.period').find(cr, uid, dt=date, context=context)
if len(ids):
period_id = ids[0]
+ context.update({'stop_reconcile': True})
account_move_line_obj.reconcile(cr, uid, context['active_ids'], 'manual', account_id,
period_id, journal_id, context=context)
return {}
@@ -183,6 +152,7 @@ class account_move_line_reconcile_writeoff(osv.osv_memory):
if len(ids):
period_id = ids[0]
+ context.update({'stop_reconcile': True})
account_move_line_obj.reconcile(cr, uid, context['active_ids'], 'manual', account_id,
period_id, journal_id, context=context)
return {}
diff --git a/addons/account/wizard/account_use_model.py b/addons/account/wizard/account_use_model.py
index b1087cbbcdc..edac082f32e 100644
--- a/addons/account/wizard/account_use_model.py
+++ b/addons/account/wizard/account_use_model.py
@@ -55,21 +55,22 @@ class account_use_model(osv.osv_memory):
mod_obj = self.pool.get('ir.model.data')
if context is None:
context = {}
-
+ move_ids = []
+ entry = {}
data = self.read(cr, uid, ids, context=context)[0]
record_id = context and context.get('model_line', False) or False
if record_id:
data_model = account_model_obj.browse(cr, uid, data['model'])
else:
data_model = account_model_obj.browse(cr, uid, context['active_ids'])
- move_ids = []
for model in data_model:
+ entry['name'] = model.name%{'year':time.strftime('%Y'), 'month':time.strftime('%m'), 'date':time.strftime('%d')}
period_id = account_period_obj.find(cr, uid, context=context)
if not period_id:
raise osv.except_osv(_('No period found !'), _('Unable to find a valid period !'))
period_id = period_id[0]
move_id = account_move_obj.create(cr, uid, {
- 'ref': model.name,
+ 'ref': entry['name'],
'period_id': period_id,
'journal_id': model.journal_id.id,
})
diff --git a/addons/account/wizard/account_use_model_view.xml b/addons/account/wizard/account_use_model_view.xml
index 232c1b8df88..f6ab3949abd 100644
--- a/addons/account/wizard/account_use_model_view.xml
+++ b/addons/account/wizard/account_use_model_view.xml
@@ -32,15 +32,7 @@
{'model_line':'model_line'}
-
-
-
- Manual Recurring
- client_action_multi
-
- action
- account.move.line
-
+
account.use.model.create.entry.form
diff --git a/addons/account_analytic_plans/account_analytic_plans_view.xml b/addons/account_analytic_plans/account_analytic_plans_view.xml
index ae2b6612a64..e732b483730 100644
--- a/addons/account_analytic_plans/account_analytic_plans_view.xml
+++ b/addons/account_analytic_plans/account_analytic_plans_view.xml
@@ -196,7 +196,7 @@
parent="account.menu_analytic_accounting"
name="Multi Plans"
id="menu_account_analytic_multi_plan_action"
- />
+ groups="analytic.group_analytic_accounting"/>
| |