[MRG] From trunk

bzr revid: yannick.vaucher@camptocamp.com-20111101100257-c2elvbbr0bp6lek6
This commit is contained in:
Yannick Vaucher 2011-11-01 11:02:57 +01:00
commit 35c24ae1a1
6082 changed files with 136722 additions and 57335 deletions

View File

@ -23,7 +23,7 @@ import account
import installer
import project
import partner
import invoice
import account_invoice
import account_bank_statement
import account_bank
import account_cash_statement
@ -32,7 +32,7 @@ import account_analytic_line
import wizard
import report
import product
import sequence
import ir_sequence
import company
import res_currency

View File

@ -22,7 +22,7 @@
"name" : "Accounting and Financial Management",
"version" : "1.1",
"author" : "OpenERP SA",
"category": 'Finance',
"category": 'Accounting & Finance',
'complexity': "normal",
"description": """
Accounting and Financial Management.
@ -98,12 +98,12 @@ module named account_voucher.
'wizard/account_reconcile_view.xml',
'wizard/account_reconcile_partner_process_view.xml',
'wizard/account_automatic_reconcile_view.xml',
'wizard/account_financial_report_view.xml',
'project/wizard/project_account_analytic_line_view.xml',
'account_end_fy.xml',
'account_invoice_view.xml',
'partner_view.xml',
'data/account_invoice.xml',
'data/account_data2.xml',
'data/account_data.xml',
'account_invoice_workflow.xml',
'project/project_view.xml',
'project/project_report.xml',
@ -118,7 +118,7 @@ module named account_voucher.
'process/statement_process.xml',
'process/customer_invoice_process.xml',
'process/supplier_invoice_process.xml',
'sequence_view.xml',
'ir_sequence_view.xml',
'company_view.xml',
'board_account_view.xml',
"wizard/account_report_profit_loss_view.xml",

View File

@ -139,7 +139,7 @@ class account_account_type(osv.osv):
'Balance' will generally be used for cash accounts.
'Detail' will copy each existing journal item of the previous year, even the reconciled ones.
'Unreconciled' will copy only the journal items that were unreconciled on the first day of the new fiscal year."""),
'sign': fields.selection([(-1, 'Negative'), (1, 'Positive')], 'Sign on Reports', required=True, help='Allows you to change the sign of the balance amount displayed in the reports, so that you can see positive figures instead of negative ones in expenses accounts.'),
'sign': fields.selection([(-1, 'Reverse balance sign'), (1, 'Preserve balance sign')], 'Sign on Reports', required=True, help='For accounts that are typically more debited than credited and that you would like to print as negative amounts in your reports, you should reverse the sign of the balance; e.g.: Expense account. The same applies for accounts that are typically more credited than debited and that you would like to print as positive amounts in your reports; e.g.: Income account.'),
'report_type':fields.selection([
('none','/'),
('income','Profit & Loss (Income Accounts)'),
@ -243,13 +243,15 @@ class account_account(osv.osv):
'balance': "COALESCE(SUM(l.debit),0) " \
"- COALESCE(SUM(l.credit), 0) as balance",
'debit': "COALESCE(SUM(l.debit), 0) as debit",
'credit': "COALESCE(SUM(l.credit), 0) as credit"
'credit': "COALESCE(SUM(l.credit), 0) as credit",
'foreign_balance': "COALESCE(SUM(l.amount_currency), 0) as foreign_balance",
}
#get all the necessary accounts
children_and_consolidated = self._get_children_and_consol(cr, uid, ids, context=context)
#compute for each account the balance/debit/credit from the move lines
accounts = {}
res = {}
null_result = dict((fn, 0.0) for fn in field_names)
if children_and_consolidated:
aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
@ -269,7 +271,7 @@ class account_account(osv.osv):
# ON l.account_id = tmp.id
# or make _get_children_and_consol return a query and join on that
request = ("SELECT l.account_id as id, " +\
', '.join(map(mapping.__getitem__, field_names)) +
', '.join(map(mapping.__getitem__, mapping.keys())) +
" FROM account_move_line l" \
" WHERE l.account_id IN %s " \
+ filters +
@ -288,7 +290,7 @@ class account_account(osv.osv):
sums = {}
currency_obj = self.pool.get('res.currency')
while brs:
current = brs[0]
current = brs.pop(0)
# can_compute = True
# for child in current.child_id:
# if child.id not in sums:
@ -298,7 +300,6 @@ class account_account(osv.osv):
# except ValueError:
# brs.insert(0, child)
# if can_compute:
brs.pop(0)
for fn in field_names:
sums.setdefault(current.id, {})[fn] = accounts.get(current.id, {}).get(fn, 0.0)
for child in current.child_id:
@ -306,12 +307,21 @@ class account_account(osv.osv):
sums[current.id][fn] += sums[child.id][fn]
else:
sums[current.id][fn] += currency_obj.compute(cr, uid, child.company_id.currency_id.id, current.company_id.currency_id.id, sums[child.id][fn], context=context)
null_result = dict((fn, 0.0) for fn in field_names)
# as we have to relay on values computed before this is calculated separately than previous fields
if current.currency_id and current.exchange_rate and \
('adjusted_balance' in field_names or 'unrealized_gain_loss' in field_names):
# Computing Adjusted Balance and Unrealized Gains and losses
# Adjusted Balance = Foreign Balance / Exchange Rate
# Unrealized Gains and losses = Adjusted Balance - Balance
adj_bal = sums[current.id].get('foreign_balance', 0.0) / current.exchange_rate
sums[current.id].update({'adjusted_balance': adj_bal, 'unrealized_gain_loss': adj_bal - sums[current.id].get('balance', 0.0)})
for id in ids:
res[id] = sums.get(id, null_result)
else:
for id in ids:
res[id] = 0.0
res[id] = null_result
return res
def _get_company_currency(self, cr, uid, ids, field_name, arg, context=None):
@ -340,12 +350,59 @@ class account_account(osv.osv):
accounts = self.browse(cr, uid, ids, context=context)
for account in accounts:
level = 0
if account.parent_id:
obj = self.browse(cr, uid, account.parent_id.id)
level = obj.level + 1
parent = account.parent_id
while parent:
level += 1
parent = parent.parent_id
res[account.id] = level
return res
def _set_credit_debit(self, cr, uid, account_id, name, value, arg, context=None):
if context.get('config_invisible', True):
return True
account = self.browse(cr, uid, account_id, context=context)
diff = value - getattr(account,name)
if not diff:
return True
journal_obj = self.pool.get('account.journal')
jids = journal_obj.search(cr, uid, [('type','=','situation'),('centralisation','=',1),('company_id','=',account.company_id.id)], context=context)
if not jids:
raise osv.except_osv(_('Error!'),_("You need an Opening journal with centralisation checked to set the initial balance!"))
period_obj = self.pool.get('account.period')
pids = period_obj.search(cr, uid, [('special','=',True),('company_id','=',account.company_id.id)], context=context)
if not pids:
raise osv.except_osv(_('Error!'),_("No opening/closing period defined, please create one to set the initial balance!"))
move_obj = self.pool.get('account.move.line')
move_id = move_obj.search(cr, uid, [
('journal_id','=',jids[0]),
('period_id','=',pids[0]),
('account_id','=', account_id),
(name,'>', 0.0),
('name','=', _('Opening Balance'))
], context=context)
if move_id:
move = move_obj.browse(cr, uid, move_id[0], context=context)
move_obj.write(cr, uid, move_id[0], {
name: diff+getattr(move,name)
}, context=context)
else:
if diff<0.0:
raise osv.except_osv(_('Error!'),_("Unable to adapt the initial balance (negative value)!"))
nameinv = (name=='credit' and 'debit') or 'credit'
move_id = move_obj.create(cr, uid, {
'name': _('Opening Balance'),
'account_id': account_id,
'journal_id': jids[0],
'period_id': pids[0],
name: diff,
nameinv: 0.0
}, context=context)
return True
_columns = {
'name': fields.char('Name', size=128, required=True, select=True),
'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."),
@ -370,9 +427,16 @@ class account_account(osv.osv):
'child_consol_ids': fields.many2many('account.account', 'account_account_consol_rel', 'child_id', 'parent_id', 'Consolidated Children'),
'child_id': fields.function(_get_child_ids, type='many2many', relation="account.account", string="Child Accounts"),
'balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Balance', multi='balance'),
'credit': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Credit', multi='balance'),
'debit': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Debit', multi='balance'),
'reconcile': fields.boolean('Reconcile', help="Check this if the user is allowed to reconcile entries in this account."),
'credit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Account'), string='Credit', multi='balance'),
'debit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Account'), string='Debit', multi='balance'),
'foreign_balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Foreign Balance', multi='balance',
help="Total amount (in Secondary currency) for transactions held in secondary currency for this account."),
'adjusted_balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Adjusted Balance', multi='balance',
help="Total amount (in Company currency) for transactions held in secondary currency for this account."),
'unrealized_gain_loss': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Unrealized Gain or Loss', multi='balance',
help="Value of Loss or Gain due to changes in exchange rate when doing multi-currency transactions."),
'reconcile': fields.boolean('Allow Reconciliation', help="Check this box if this account allows reconciliation of journal items."),
'exchange_rate': fields.related('currency_id', 'rate', type='float', string='Exchange Rate', digits=(12,6)),
'shortcut': fields.char('Shortcut', size=12),
'tax_ids': fields.many2many('account.tax', 'account_account_tax_default_rel',
'account_id', 'tax_id', 'Default Taxes'),
@ -390,7 +454,10 @@ class account_account(osv.osv):
'manage this. So if you import from another software system you may have to use the rate at date. ' \
'Incoming transactions always use the rate at date.', \
required=True),
'level': fields.function(_get_level, string='Level', store=True, type='integer'),
'level': fields.function(_get_level, string='Level', method=True, type='integer',
store={
'account.account': (_get_children_and_consol, ['level', 'parent_id'], 10),
}),
}
_defaults = {
@ -439,8 +506,8 @@ class account_account(osv.osv):
_constraints = [
(_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id']),
(_check_type, 'Configuration Error! \nYou cannot define children to an account with internal type different of "View"! ', ['type']),
(_check_account_type, 'Configuration Error! \nYou cannot select an account type with a deferral method different of "Unreconciled" for accounts with internal type "Payable/Receivable"! ', ['user_type','type']),
(_check_type, 'Configuration Error! \nYou can not define children to an account with internal type different of "View"! ', ['type']),
(_check_account_type, 'Configuration Error! \nYou can not select an account type with a deferral method different of "Unreconciled" for accounts with internal type "Payable/Receivable"! ', ['user_type','type']),
]
_sql_constraints = [
('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !')
@ -516,14 +583,14 @@ class account_account(osv.osv):
if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]):
if method == 'write':
raise osv.except_osv(_('Error !'), _('You cannot deactivate an account that contains account moves.'))
raise osv.except_osv(_('Error !'), _('You can not desactivate an account that contains some journal items.'))
elif method == 'unlink':
raise osv.except_osv(_('Error !'), _('You cannot remove an account which has account entries!. '))
raise osv.except_osv(_('Error !'), _('You can not remove an account containing journal items!. '))
#Checking whether the account is set as a property to any Partner or not
value = 'account.account,' + str(ids[0])
partner_prop_acc = self.pool.get('ir.property').search(cr, uid, [('value_reference','=',value)], context=context)
if partner_prop_acc:
raise osv.except_osv(_('Warning !'), _('You cannot remove/deactivate an account which is set as a property to any Partner.'))
raise osv.except_osv(_('Warning !'), _('You can not remove/desactivate an account which is set on a customer or supplier.'))
return True
def _check_allow_type_change(self, cr, uid, ids, new_type, context=None):
@ -536,15 +603,20 @@ class account_account(osv.osv):
if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]):
#Check for 'Closed' type
if old_type == 'closed' and new_type !='closed':
raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from 'Closed' to any other type which contains account entries!"))
raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from 'Closed' to any other type which contains journal items!"))
#Check for change From group1 to group2 and vice versa
if (old_type in group1 and new_type in group2) or (old_type in group2 and new_type in group1):
raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from '%s' to '%s' type as it contains account entries!") % (old_type,new_type,))
raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from '%s' to '%s' type as it contains journal items!") % (old_type,new_type,))
return True
def write(self, cr, uid, ids, vals, context=None):
if context is None:
context = {}
if not ids:
return True
if isinstance(ids, (int, long)):
ids = [ids]
# Dont allow changing the company_id when account_move_line already exist
if 'company_id' in vals:
@ -657,40 +729,32 @@ class account_journal(osv.osv):
def write(self, cr, uid, ids, vals, context=None):
if context is None:
context = {}
if isinstance(ids, (int, long)):
ids = [ids]
for journal in self.browse(cr, uid, ids, context=context):
if 'company_id' in vals and journal.company_id.id != vals['company_id']:
move_lines = self.pool.get('account.move.line').search(cr, uid, [('journal_id', 'in', ids)])
if move_lines:
raise osv.except_osv(_('Warning !'), _('You cannot modify company of this journal as its related record exist in Entry Lines'))
raise osv.except_osv(_('Warning !'), _('You can not modify the company of this journal as its related record exist in journal items'))
return super(account_journal, self).write(cr, uid, ids, vals, context=context)
def create_sequence(self, cr, uid, vals, context=None):
""" Create new no_gap entry sequence for every new Joural
"""
Create new entry sequence for every new Joural
"""
seq_pool = self.pool.get('ir.sequence')
seq_typ_pool = self.pool.get('ir.sequence.type')
name = vals['name']
code = vals['code'].lower()
types = {
'name': name,
'code': code
}
seq_typ_pool.create(cr, uid, types)
# in account.journal code is actually the prefix of the sequence
# whereas ir.sequence code is a key to lookup global sequences.
prefix = vals['code'].upper()
seq = {
'name': name,
'code': code,
'active': True,
'prefix': code + "/%(year)s/",
'name': vals['name'],
'implementation':'no_gap',
'prefix': prefix + "/%(year)s/",
'padding': 4,
'number_increment': 1
}
if 'company_id' in vals:
seq['company_id'] = vals['company_id']
return seq_pool.create(cr, uid, seq)
return self.pool.get('ir.sequence').create(cr, uid, seq)
def create(self, cr, uid, vals, context=None):
if not 'sequence_id' in vals or not vals['sequence_id']:
@ -715,8 +779,6 @@ class account_journal(osv.osv):
name = rs.name
if rs.currency:
name = "%s (%s)" % (rs.name, rs.currency.name)
else:
name = "%s (%s)" % (rs.name, rs.company_id.currency_id.name)
res += [(rs.id, name)]
return res
@ -807,8 +869,8 @@ class account_fiscalyear(osv.osv):
return True
_constraints = [
(_check_duration, 'Error! The duration of the Fiscal Year is invalid. ', ['date_stop']),
(_check_fiscal_year, 'Error! You cannot define overlapping fiscal years',['date_start', 'date_stop'])
(_check_duration, 'Error! The start date of the fiscal year must be before his end date.', ['date_start','date_stop']),
(_check_fiscal_year, 'Error! You can not define overlapping fiscal years for the same company.',['date_start', 'date_stop'])
]
def create_period3(self, cr, uid, ids, context=None):
@ -843,9 +905,16 @@ class account_fiscalyear(osv.osv):
return True
def find(self, cr, uid, dt=None, exception=True, context=None):
if context is None: context = {}
if not dt:
dt = time.strftime('%Y-%m-%d')
ids = self.search(cr, uid, [('date_start', '<=', dt), ('date_stop', '>=', dt)])
args = [('date_start', '<=' ,dt), ('date_stop', '>=', dt)]
if context.get('company_id', False):
args.append(('company_id', '=', context['company_id']))
else:
company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
args.append(('company_id', '=', company_id))
ids = self.search(cr, uid, args, context=context)
if not ids:
if exception:
raise osv.except_osv(_('Error !'), _('No fiscal year defined for this date !\nPlease create one.'))
@ -886,6 +955,9 @@ class account_period(osv.osv):
'state': 'draft',
}
_order = "date_start, special desc"
_sql_constraints = [
('name_company_uniq', 'unique(name, company_id)', 'The name of the period must be unique per company!'),
]
def _check_duration(self,cr,uid,ids,context=None):
obj_period = self.browse(cr, uid, ids[0], context=context)
@ -959,7 +1031,7 @@ class account_period(osv.osv):
if 'company_id' in vals:
move_lines = self.pool.get('account.move.line').search(cr, uid, [('period_id', 'in', ids)])
if move_lines:
raise osv.except_osv(_('Warning !'), _('You cannot modify company of this period as its related record exist in Entry Lines'))
raise osv.except_osv(_('Warning !'), _('You can not modify company of this period as some journal items exists.'))
return super(account_period, self).write(cr, uid, ids, vals, context=context)
def build_ctx_periods(self, cr, uid, period_from_id, period_to_id):
@ -1176,22 +1248,10 @@ class account_move(osv.osv):
return False
return True
def _check_period_journal(self, cursor, user, ids, context=None):
for move in self.browse(cursor, user, ids, context=context):
for line in move.line_id:
if line.period_id.id != move.period_id.id:
return False
if line.journal_id.id != move.journal_id.id:
return False
return True
_constraints = [
(_check_centralisation,
'You cannot create more than one move per period on centralized journal',
'You can not create more than one move per period on centralized journal',
['journal_id']),
(_check_period_journal,
'You cannot create entries on different periods/journals in the same move',
['line_id']),
]
def post(self, cr, uid, ids, context=None):
@ -1201,7 +1261,7 @@ class account_move(osv.osv):
valid_moves = self.validate(cr, uid, ids, context)
if not valid_moves:
raise osv.except_osv(_('Integrity Error !'), _('You cannot validate a non-balanced entry !\nMake sure you have configured Payment Term properly !\nIt should contain atleast one Payment Term Line with type "Balance" !'))
raise osv.except_osv(_('Integrity Error !'), _('You can not validate a non-balanced entry !\nMake sure you have configured payment terms properly !\nThe latest payment term line should be of the type "Balance" !'))
obj_sequence = self.pool.get('ir.sequence')
for move in self.browse(cr, uid, valid_moves, context=context):
if move.name =='/':
@ -1213,7 +1273,7 @@ class account_move(osv.osv):
else:
if journal.sequence_id:
c = {'fiscalyear_id': move.period_id.fiscalyear_id.id}
new_name = obj_sequence.get_id(cr, uid, journal.sequence_id.id, context=c)
new_name = obj_sequence.next_by_id(cr, uid, journal.sequence_id.id, c)
else:
raise osv.except_osv(_('Error'), _('No sequence defined on the journal !'))
@ -1237,7 +1297,7 @@ class account_move(osv.osv):
if not top:
top = account2.id
elif top<>account2.id:
raise osv.except_osv(_('Error !'), _('You cannot validate a Journal Entry unless all journal items are in same chart of accounts !'))
raise osv.except_osv(_('Error !'), _('You can not validate a journal entry unless all journal items belongs to the same chart of accounts !'))
return self.post(cursor, user, ids, context=context)
def button_cancel(self, cr, uid, ids, context=None):
@ -1255,7 +1315,7 @@ class account_move(osv.osv):
context = {}
c = context.copy()
c['novalidate'] = True
result = super(osv.osv, self).write(cr, uid, ids, vals, c)
result = super(account_move, self).write(cr, uid, ids, vals, c)
self.validate(cr, uid, ids, context=context)
return result
@ -1324,7 +1384,7 @@ class account_move(osv.osv):
for move in self.browse(cr, uid, ids, context=context):
if move['state'] != 'draft':
raise osv.except_osv(_('UserError'),
_('You can not delete posted movement: "%s"!') % \
_('You can not delete a posted journal entry "%s"!') % \
move['name'])
line_ids = map(lambda x: x.id, move.line_id)
context['journal_id'] = move.journal_id.id
@ -1344,7 +1404,7 @@ class account_move(osv.osv):
def _centralise(self, cr, uid, move, mode, context=None):
assert mode in ('debit', 'credit'), 'Invalid Mode' #to prevent sql injection
currency_obj = self.pool.get('res.currency')
currency_obj = self.pool.get('res.currency')
if context is None:
context = {}
@ -1474,8 +1534,6 @@ class account_move(osv.osv):
# Update the move lines (set them as valid)
obj_move_line.write(cr, uid, line_draft_ids, {
'journal_id': move.journal_id.id,
'period_id': move.period_id.id,
'state': 'valid'
}, context, check=False)
@ -1516,8 +1574,6 @@ class account_move(osv.osv):
# We can't validate it (it's unbalanced)
# Setting the lines as draft
obj_move_line.write(cr, uid, line_ids, {
'journal_id': move.journal_id.id,
'period_id': move.period_id.id,
'state': 'draft'
}, context, check=False)
# Create analytic lines for the valid moves
@ -1542,11 +1598,15 @@ class account_move_reconcile(osv.osv):
_defaults = {
'name': lambda self,cr,uid,ctx={}: self.pool.get('ir.sequence').get(cr, uid, 'account.reconcile') or '/',
}
def reconcile_partial_check(self, cr, uid, ids, type='auto', context=None):
total = 0.0
for rec in self.browse(cr, uid, ids, context=context):
for line in rec.line_partial_ids:
total += (line.debit or 0.0) - (line.credit or 0.0)
if line.account_id.currency_id:
total += line.amount_currency
else:
total += (line.debit or 0.0) - (line.credit or 0.0)
if not total:
self.pool.get('account.move.line').write(cr, uid,
map(lambda x: x.id, rec.line_partial_ids),
@ -1606,7 +1666,7 @@ class account_tax_code(osv.osv):
(parent_ids,) + where_params)
res=dict(cr.fetchall())
obj_precision = self.pool.get('decimal.precision')
res2 = {}
res2 = {}
for record in self.browse(cr, uid, ids, context=context):
def _rec_get(record):
amount = res.get(record.id, 0.0)
@ -1775,6 +1835,9 @@ class account_tax(osv.osv):
'type_tax_use': fields.selection([('sale','Sale'),('purchase','Purchase'),('all','All')], 'Tax Application', required=True)
}
_sql_constraints = [
('name_company_uniq', 'unique(name, company_id)', 'Tax Name must be unique per company!'),
]
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
"""
@ -2132,8 +2195,13 @@ class account_model(osv.osv):
raise osv.except_osv(_('No period found !'), _('Unable to find a valid period !'))
period_id = period_id[0]
move_date = context.get('date', time.strftime('%Y-%m-%d'))
move_date = datetime.strptime(move_date,"%Y-%m-%d")
for model in self.browse(cr, uid, ids, context=context):
entry['name'] = model.name%{'year':time.strftime('%Y'), 'month':time.strftime('%m'), 'date':time.strftime('%Y-%m')}
try:
entry['name'] = model.name%{'year': move_date.strftime('%Y'), 'month': move_date.strftime('%m'), 'date': move_date.strftime('%Y-%m')}
except:
raise osv.except_osv(_('Wrong model !'), _('You have a wrong expression "%(...)s" in your model !'))
move_id = account_move_obj.create(cr, uid, {
'ref': entry['name'],
'period_id': period_id,
@ -2154,7 +2222,7 @@ class account_model(osv.osv):
'analytic_account_id': analytic_account_id
}
date_maturity = time.strftime('%Y-%m-%d')
date_maturity = context.get('date',time.strftime('%Y-%m-%d'))
if line.date_maturity == 'partner':
if not line.partner_id:
raise osv.except_osv(_('Error !'), _("Maturity date of entry line generated by model line '%s' of model '%s' is based on partner payment term!" \
@ -2205,8 +2273,8 @@ class account_model_line(osv.osv):
}
_order = 'sequence'
_sql_constraints = [
('credit_debit1', 'CHECK (credit*debit=0)', 'Wrong credit or debit value in model (Credit Or Debit Must Be "0")!'),
('credit_debit2', 'CHECK (credit+debit>=0)', 'Wrong credit or debit value in model (Credit + Debit Must Be greater "0")!'),
('credit_debit1', 'CHECK (credit*debit=0)', 'Wrong credit or debit value in model, they must be positive!'),
('credit_debit2', 'CHECK (credit+debit>=0)', 'Wrong credit or debit value in model, they must be positive!'),
]
account_model_line()
@ -2372,7 +2440,7 @@ class account_account_template(osv.osv):
_check_recursion = check_cycle
_constraints = [
(_check_recursion, 'Error ! You can not create recursive account templates.', ['parent_id']),
(_check_type, 'Configuration Error! \nYou cannot define children to an account with internal type different of "View"! ', ['type']),
(_check_type, 'Configuration Error!\nYou can not define children to an account with internal type different of "View"! ', ['type']),
]
@ -2405,7 +2473,7 @@ class account_add_tmpl_wizard(osv.osv_memory):
ptids = tmpl_obj.read(cr, uid, [tids[0]['parent_id'][0]], ['code'])
res = None
if not ptids or not ptids[0]['code']:
raise osv.except_osv(_('Error !'), _('Cannot locate parent code for template account!'))
raise osv.except_osv(_('Error !'), _('I can not locate a parent code for the template account!'))
res = acc_obj.search(cr, uid, [('code','=',ptids[0]['code'])])
return res and res[0] or False
@ -2590,7 +2658,8 @@ class account_fiscal_position_template(osv.osv):
'name': fields.char('Fiscal Position Template', size=64, required=True),
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
'account_ids': fields.one2many('account.fiscal.position.account.template', 'position_id', 'Account Mapping'),
'tax_ids': fields.one2many('account.fiscal.position.tax.template', 'position_id', 'Tax Mapping')
'tax_ids': fields.one2many('account.fiscal.position.tax.template', 'position_id', 'Tax Mapping'),
'note': fields.text('Notes', translate=True),
}
account_fiscal_position_template()
@ -2620,7 +2689,88 @@ class account_fiscal_position_account_template(osv.osv):
account_fiscal_position_account_template()
# Multi charts of Accounts wizard
# ---------------------------------------------------------
# Account Financial Report
# ---------------------------------------------------------
class account_financial_report(osv.osv):
_name = "account.financial.report"
_description = "Account Report"
def _get_level(self, cr, uid, ids, field_name, arg, context=None):
res = {}
for report in self.browse(cr, uid, ids, context=context):
level = 0
if report.parent_id:
level = report.parent_id.level + 1
res[report.id] = level
return res
def _get_children_by_order(self, cr, uid, ids, context=None):
res = []
for id in ids:
res.append(id)
ids2 = self.search(cr, uid, [('parent_id', '=', id)], order='sequence ASC', context=context)
res += self._get_children_by_order(cr, uid, ids2, context=context)
return res
def _get_balance(self, cr, uid, ids, name, args, context=None):
res = {}
res_all = {}
for report in self.browse(cr, uid, ids, context=context):
balance = 0.0
if report.id in res_all:
balance = res_all[report.id]
elif report.type == 'accounts':
# it's the sum of balance of the linked accounts
for a in report.account_ids:
balance += a.balance
elif report.type == 'account_report' and report.account_report_id:
# it's the amount of the linked report
res2 = self._get_balance(cr, uid, [report.account_report_id.id], 'balance', False, context=context)
res_all.update(res2)
for key, value in res2.items():
balance += value
elif report.type == 'sum':
# it's the sum of balance of the children of this account.report
#for child in report.children_ids:
res2 = self._get_balance(cr, uid, [rec.id for rec in report.children_ids], 'balance', False, context=context)
res_all.update(res2)
for key, value in res2.items():
balance += value
res[report.id] = balance
res_all[report.id] = balance
return res
_columns = {
'name': fields.char('Report Name', size=128, required=True, translate=True),
'parent_id': fields.many2one('account.financial.report', 'Parent'),
'children_ids': fields.one2many('account.financial.report', 'parent_id', 'Account Report'),
'sequence': fields.integer('Sequence'),
'note': fields.text('Notes'),
'balance': fields.function(_get_balance, 'Balance'),
'level': fields.function(_get_level, string='Level', store=True, type='integer'),
'type': fields.selection([
('sum','View'),
('accounts','Accounts'),
('account_type','Account Type'),
('account_report','Report Value'),
],'Type'),
'account_ids': fields.many2many('account.account', 'account_account_financial_report', 'report_line_id', 'account_id', 'Accounts'),
'display_detail': fields.boolean('Display details', help='Display every account with its balance instead of the sum.'),
'account_report_id': fields.many2one('account.financial.report', 'Report Value'),
'account_type_ids': fields.many2many('account.account.type', 'account_account_financial_report_type', 'report_id', 'account_type_id', 'Account Types'),
}
_defaults = {
'type': 'sum',
}
account_financial_report()
# ---------------------------------------------------------
# Account generation from template wizards
# ---------------------------------------------------------
class wizard_multi_charts_accounts(osv.osv_memory):
"""
@ -2641,7 +2791,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
_columns = {
'company_id':fields.many2one('res.company', 'Company', required=True),
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
'bank_accounts_id': fields.one2many('account.bank.accounts.wizard', 'bank_account_id', 'Bank Accounts', required=True),
'bank_accounts_id': fields.one2many('account.bank.accounts.wizard', 'bank_account_id', 'Cash and Banks', required=True),
'code_digits':fields.integer('# of Digits', required=True, help="No. of Digits to use for account code"),
'seq_journal':fields.boolean('Separated Journal Sequences', help="Check this box if you want to use a different sequence for each created journal. Otherwise, all will use the same sequence."),
"sale_tax": fields.many2one("account.tax.template", "Default Sale Tax"),
@ -2689,7 +2839,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
def _get_default_accounts(self, cr, uid, context=None):
return [
{'acc_name': _('Bank Account'),'account_type':'bank'},
{'acc_name': _('Cash'),'account_type':'cash'}
]
@ -2713,7 +2862,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
unconfigured_cmp = list(set(company_ids)-set(configured_cmp))
for field in res['fields']:
if field == 'company_id':
res['fields'][field]['domain'] = unconfigured_cmp
res['fields'][field]['domain'] = [('id','in',unconfigured_cmp)]
res['fields'][field]['selection'] = [('', '')]
if unconfigured_cmp:
cmp_select = [(line.id, line.name) for line in self.pool.get('res.company').browse(cr, uid, unconfigured_cmp)]

View File

@ -123,7 +123,7 @@ class account_analytic_line(osv.osv):
ctx['uom'] = unit
amount_unit = prod.price_get(pricetype.field, context=ctx)[prod.id]
prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
amount = amount_unit * quantity or 1.0
amount = amount_unit * quantity or 0.0
result = round(amount, prec)
if not flag:
result *= -1

View File

@ -83,7 +83,8 @@ class account_bank_statement(osv.osv):
res[statement.id] -= res_currency_obj.compute(cursor,
user, company_currency_id, currency_id,
line.credit, context=context)
if statement.state == 'draft':
if statement.state in ('draft', 'open'):
for line in statement.line_ids:
res[statement.id] += line.amount
for r in res:
@ -116,11 +117,17 @@ class account_bank_statement(osv.osv):
res[statement_id] = (currency_id, currency_names[currency_id])
return res
def _get_statement(self, cr, uid, ids, context=None):
result = {}
for line in self.pool.get('account.bank.statement.line').browse(cr, uid, ids, context=context):
result[line.statement_id.id] = True
return result.keys()
_order = "date desc, id desc"
_name = "account.bank.statement"
_description = "Bank Statement"
_columns = {
'name': fields.char('Name', size=64, required=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself', states={'confirm': [('readonly', True)]}),
'name': fields.char('Name', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'), # readonly for account_cash_statement
'date': fields.date('Date', required=True, states={'confirm': [('readonly', True)]}),
'journal_id': fields.many2one('account.journal', 'Journal', required=True,
readonly=True, states={'draft':[('readonly',False)]}),
@ -129,19 +136,25 @@ class account_bank_statement(osv.osv):
'balance_start': fields.float('Starting Balance', digits_compute=dp.get_precision('Account'),
states={'confirm':[('readonly',True)]}),
'balance_end_real': fields.float('Ending Balance', digits_compute=dp.get_precision('Account'),
states={'confirm':[('readonly', True)]}),
'balance_end': fields.function(_end_balance, string='Balance'),
states={'confirm': [('readonly', True)]}),
'balance_end': fields.function(_end_balance,
store = {
'account.bank.statement': (lambda self, cr, uid, ids, c={}: ids, ['line_ids','move_line_ids'], 10),
'account.bank.statement.line': (_get_statement, ['amount'], 10),
},
string="Computed Balance", help='Balance as calculated based on Starting Balance and transaction lines'),
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
'line_ids': fields.one2many('account.bank.statement.line',
'statement_id', 'Statement lines',
states={'confirm':[('readonly', True)]}),
'move_line_ids': fields.one2many('account.move.line', 'statement_id',
'Entry lines', states={'confirm':[('readonly',True)]}),
'state': fields.selection([('draft', 'Draft'),('confirm', 'Confirmed')],
'State', required=True,
states={'confirm': [('readonly', True)]}, readonly="1",
help='When new statement is created the state will be \'Draft\'. \
\n* And after getting confirmation from the bank it will be in \'Confirmed\' state.'),
'state': fields.selection([('draft', 'New'),
('open','Open'), # used by cash statements
('confirm', 'Closed')],
'State', required=True, readonly="1",
help='When new statement is created the state will be \'Draft\'.\n'
'And after getting confirmation from the bank it will be in \'Confirmed\' state.'),
'currency': fields.function(_currency, string='Currency',
type='many2one', relation='res.currency'),
'account_id': fields.related('journal_id', 'default_debit_account_id', type='many2one', relation='account.account', string='Account used in this journal', readonly=True, help='used in statement reconciliation domain, but shouldn\'t be used elswhere.'),
@ -206,6 +219,7 @@ class account_bank_statement(osv.osv):
'period_id': st.period_id.id,
'date': st_line.date,
'name': st_line_number,
'ref': st_line.ref,
}, context=context)
account_bank_statement_line_obj.write(cr, uid, [st_line.id], {
'move_ids': [(4, move_id, False)]
@ -303,7 +317,7 @@ class account_bank_statement(osv.osv):
return self.write(cr, uid, ids, {'state':'confirm'}, context=context)
def check_status_condition(self, cr, uid, state, journal_type='bank'):
return state=='draft'
return state in ('draft','open')
def button_confirm_bank(self, cr, uid, ids, context=None):
obj_seq = self.pool.get('ir.sequence')
@ -327,9 +341,9 @@ class account_bank_statement(osv.osv):
else:
if st.journal_id.sequence_id:
c = {'fiscalyear_id': st.period_id.fiscalyear_id.id}
st_number = obj_seq.get_id(cr, uid, st.journal_id.sequence_id.id, context=c)
st_number = obj_seq.next_by_id(cr, uid, st.journal_id.sequence_id.id, context=c)
else:
st_number = obj_seq.get(cr, uid, 'account.bank.statement')
st_number = obj_seq.next_by_code(cr, uid, 'account.bank.statement')
for line in st.move_line_ids:
if line.state <> 'valid':
@ -378,7 +392,7 @@ class account_bank_statement(osv.osv):
if t['state'] in ('draft'):
unlink_ids.append(t['id'])
else:
raise osv.except_osv(_('Invalid action !'), _('Cannot delete bank statement(s) which are already confirmed !'))
raise osv.except_osv(_('Invalid action !'), _('In order to delete a bank statement, you must first cancel it to delete related journal items.'))
osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
return True
@ -462,7 +476,7 @@ class account_bank_statement_line(osv.osv):
}
_defaults = {
'name': lambda self,cr,uid,context={}: self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement.line'),
'date': lambda *a: time.strftime('%Y-%m-%d'),
'date': lambda self,cr,uid,context={}: context.get('date', time.strftime('%Y-%m-%d')),
'type': 'general',
}

View File

@ -13,7 +13,7 @@
<field name="inherit_id" ref="base.view_partner_bank_form"/>
<field name="arch" type="xml">
<group name="bank" position="after">
<group name="accounting" col="2" colspan="2" attrs="{'invisible': [('company_id','=', False)]}">
<group name="accounting" col="2" colspan="2" attrs="{'invisible': [('company_id','=', False)]}" groups="base.group_extended">
<separator string="Accounting Information" colspan="2"/>
<field name="journal_id"/>
</group>
@ -23,16 +23,16 @@
<record id="action_bank_tree" model="ir.actions.act_window">
<field name="name">Bank Accounts</field>
<field name="name">Setup your Bank Accounts</field>
<field name="res_model">res.partner.bank</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context" eval="{'default_partner_id':ref('base.main_partner'), 'company_hide':False, 'default_company_id':ref('base.main_company'), 'search_default_my_bank':1}"/>
<field name="help">Configure your company's bank account and select those that must appear on the report footer. You can drag &amp; drop bank in the list view to reorder bank accounts. If you use the accounting application of OpenERP, journals and accounts will be created automatically based on these data.</field>
<field name="help">Configure your company's bank account and select those that must appear on the report footer. You can reorder banks in the list view. If you use the accounting application of OpenERP, journals and accounts will be created automatically based on these data.</field>
</record>
<menuitem
sequence="0"
parent="account.account_account_menu"
parent="account.account_account_menu"
id="menu_action_bank_tree"
action="action_bank_tree"/>

View File

@ -119,39 +119,6 @@ class account_cash_statement(osv.osv):
res2[statement.id] = encoding_total
return res2
def _end_balance(self, cursor, user, ids, name, attr, context=None):
res_currency_obj = self.pool.get('res.currency')
res_users_obj = self.pool.get('res.users')
res = {}
company_currency_id = res_users_obj.browse(cursor, user, user,
context=context).company_id.currency_id.id
statements = self.browse(cursor, user, ids, context=context)
for statement in statements:
res[statement.id] = statement.balance_start
currency_id = statement.currency.id
for line in statement.move_line_ids:
if line.debit > 0:
if line.account_id.id == \
statement.journal_id.default_debit_account_id.id:
res[statement.id] += res_currency_obj.compute(cursor,
user, company_currency_id, currency_id,
line.debit, context=context)
else:
if line.account_id.id == \
statement.journal_id.default_credit_account_id.id:
res[statement.id] -= res_currency_obj.compute(cursor,
user, company_currency_id, currency_id,
line.credit, context=context)
if statement.state in ('draft', 'open'):
for line in statement.line_ids:
res[statement.id] += line.amount
for r in res:
res[r] = round(res[r], 2)
return res
def _get_company(self, cr, uid, context=None):
user_pool = self.pool.get('res.users')
company_pool = self.pool.get('res.company')
@ -217,38 +184,33 @@ class account_cash_statement(osv.osv):
res['end'] = end_l
return res
def _get_statement(self, cr, uid, ids, context=None):
result = {}
for line in self.pool.get('account.bank.statement.line').browse(cr, uid, ids, context=context):
result[line.statement_id.id] = True
return result.keys()
_columns = {
'balance_end_real': fields.float('Closing Balance', digits_compute=dp.get_precision('Account'), states={'confirm': [('readonly', True)]}, help="closing balance entered by the cashbox verifier"),
'state': fields.selection(
[('draft', 'Draft'),
('confirm', 'Closed'),
('open','Open')], 'State', required=True, states={'confirm': [('readonly', True)]}, readonly="1"),
'total_entry_encoding': fields.function(_get_sum_entry_encoding, store=True, string="Cash Transaction", help="Total cash transactions"),
'total_entry_encoding': fields.function(_get_sum_entry_encoding, string="Cash Transaction", help="Total cash transactions",
store = {
'account.bank.statement': (lambda self, cr, uid, ids, c={}: ids, ['line_ids','move_line_ids'], 10),
'account.bank.statement.line': (_get_statement, ['amount'], 10),
}),
'closing_date': fields.datetime("Closed On"),
'balance_end': fields.function(_end_balance, store=True, string='Balance', help="Closing balance based on Starting Balance and Cash Transactions"),
'balance_end_cash': fields.function(_balance_end_cash, store=True, string='Balance', help="Closing balance based on cashBox"),
'balance_end_cash': fields.function(_balance_end_cash, store=True, string='Closing Balance', help="Closing balance based on cashBox"),
'starting_details_ids': fields.one2many('account.cashbox.line', 'starting_id', string='Opening Cashbox'),
'ending_details_ids': fields.one2many('account.cashbox.line', 'ending_id', string='Closing Cashbox'),
'name': fields.char('Name', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'),
'user_id': fields.many2one('res.users', 'Responsible', required=False),
}
_defaults = {
'state': 'draft',
'date': lambda *a: time.strftime("%Y-%m-%d %H:%M:%S"),
'date': lambda self,cr,uid,context={}: context.get('date', time.strftime("%Y-%m-%d %H:%M:%S")),
'user_id': lambda self, cr, uid, context=None: uid,
'starting_details_ids': _get_cash_open_box_lines,
'ending_details_ids': _get_default_cash_close_box_lines
}
def create(self, cr, uid, vals, context=None):
sql = [
('journal_id', '=', vals.get('journal_id', False)),
('state', '=', 'open')
]
open_jrnl = self.search(cr, uid, sql)
if open_jrnl:
raise osv.except_osv(_('Error'), _('You can not have two open register for the same journal'))
if self.pool.get('account.journal').browse(cr, uid, vals['journal_id'], context=context).type == 'cash':
open_close = self._get_cash_open_close_box_lines(cr, uid, context)
if vals.get('starting_details_ids', False):
@ -332,15 +294,14 @@ class account_cash_statement(osv.osv):
if statement.name and statement.name == '/':
if statement.journal_id.sequence_id:
c = {'fiscalyear_id': statement.period_id.fiscalyear_id.id}
st_number = obj_seq.get_id(cr, uid, statement.journal_id.sequence_id.id, context=c)
st_number = obj_seq.next_by_id(cr, uid, statement.journal_id.sequence_id.id, context=c)
else:
st_number = obj_seq.get(cr, uid, 'account.cash.statement')
st_number = obj_seq.next_by_code(cr, uid, 'account.cash.statement')
vals.update({
'name': st_number
})
vals.update({
'date': time.strftime("%Y-%m-%d %H:%M:%S"),
'state': 'open',
})
self.write(cr, uid, [statement.id], vals, context=context)
@ -350,7 +311,7 @@ class account_cash_statement(osv.osv):
if journal_type == 'bank':
return super(account_cash_statement, self).balance_check(cr, uid, cash_id, journal_type, context)
if not self._equal_balance(cr, uid, cash_id, context):
raise osv.except_osv(_('Error !'), _('CashBox Balance is not matching with Calculated Balance !'))
raise osv.except_osv(_('Error !'), _('The closing balance should be the same than the computed balance !'))
return True
def statement_close(self, cr, uid, ids, journal_type='bank', context=None):

View File

@ -11,7 +11,7 @@
<attribute name="string">Accounting Application Configuration</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string">Configure Your Accounting Chart</attribute>
<attribute name="string">Configure Your Chart of Accounts</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">The default Chart of Accounts is matching your country selection. If no certified Chart of Accounts exists for your specified country, a generic one can be installed and will be selected by default.</attribute>
@ -23,10 +23,10 @@
<attribute name="rowspan">23</attribute>
<attribute name="string"/>
</xpath>
<group colspan="8">
<group colspan="8" position="inside">
<group colspan="4" width="600">
<field name="charts"/>
<group colspan="4" groups="base.group_extended">
<group colspan="4" groups="account.group_account_user">
<separator col="4" colspan="4" string="Configure Fiscal Year"/>
<field name="company_id" colspan="4" widget="selection"/><!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
<field name="date_start" on_change="on_change_start_date(date_start)"/>
@ -43,28 +43,8 @@
</field>
</record>
<record id="view_account_modules_installer" model="ir.ui.view">
<field name="name">account.installer.modules.form</field>
<field name="model">base.setup.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base_setup.view_base_setup_installer"/>
<field name="arch" type="xml">
<data>
<xpath expr="//group[@name='account_accountant']" position="replace">
<newline/>
<separator string="Accounting &amp; Finance Features" colspan="4"/>
<field name="account_followup"/>
<field name="account_payment"/>
<field name="account_analytic_plans"/>
<field name="account_anglo_saxon"/>
<field name="account_asset"/>
</xpath>
</data>
</field>
</record>
<record id="action_account_configuration_installer" model="ir.actions.act_window">
<field name="name">Accounting Chart Configuration</field>
<field name="name">Install your Chart of Accounts</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.installer</field>
<field name="view_id" ref="view_account_configuration_installer"/>
@ -85,5 +65,48 @@
<field name="type">automatic</field>
</record>
<record id="action_view_financial_accounts_installer" model="ir.actions.act_window">
<field name="name">Review your Financial Accounts</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'config_invisible': False}</field>
</record>
<record id="view_financial_accounts_todo" model="ir.actions.todo">
<field name="action_id" ref="action_view_financial_accounts_installer" />
<field name="category_id" ref="category_accounting_configuration" />
<field name="groups_id" eval="[(6, 0, [ref('account.group_account_user')])]" />
</record>
<record id="action_review_financial_journals_installer" model="ir.actions.act_window">
<field name="name">Review your Financial Journals</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.journal</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help">Setup your accounting journals. For bank accounts, it's better to use the 'Setup Your Bank Accounts' tool that will automatically create the accounts and journals for you.</field>
</record>
<record id="review_financial_journals_todo" model="ir.actions.todo">
<field name="action_id" ref="action_review_financial_journals_installer" />
<field name="category_id" ref="category_accounting_configuration" />
<field name="groups_id" eval="[(6, 0, [ref('account.group_account_user')])]" />
</record>
<record id="action_review_payment_terms_installer" model="ir.actions.act_window">
<field name="name">Review your Payment Terms</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.payment.term</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help">Payment terms define the conditions to pay a customer or supplier invoice in one or several payments. Customers periodic reminders will use the payment terms for each letter. Each customer or supplier can be assigned to one of these payment terms.</field>
</record>
<record id="review_payment_terms_todo" model="ir.actions.todo">
<field name="action_id" ref="action_review_payment_terms_installer" />
<field name="category_id" ref="category_accounting_configuration" />
<field name="groups_id" eval="[(6, 0, [ref('account.group_account_user')])]" />
</record>
</data>
</openerp>

View File

@ -375,7 +375,7 @@ class account_invoice(osv.osv):
if t['state'] in ('draft', 'cancel') and t['internal_number']== False:
unlink_ids.append(t['id'])
else:
raise osv.except_osv(_('Invalid action !'), _('Cannot delete invoice(s) that are already opened(or been in opened state ever) or paid!'))
raise osv.except_osv(_('Invalid action !'), _('You can not delete an invoice which is open or paid. We suggest you to refund it instead.'))
osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
return True
@ -828,7 +828,7 @@ class account_invoice(osv.osv):
total_percent += line.value_amount
total_fixed = (total_fixed * 100) / (inv.amount_total or 1.0)
if (total_fixed + total_percent) > 100:
raise osv.except_osv(_('Error !'), _("Cannot create the invoice !\nThe payment term defined gives a computed amount greater than the total invoiced amount."))
raise osv.except_osv(_('Error !'), _("Can not create the invoice !\nThe related payment term is probably misconfigured as it gives a computed amount greater than the total invoiced amount."))
# one move line per tax line
iml += ait_obj.move_line_get(cr, uid, inv.id)
@ -860,10 +860,10 @@ class account_invoice(osv.osv):
if totlines:
res_amount_currency = total_currency
i = 0
ctx.update({'date': inv.date_invoice})
for t in totlines:
if inv.currency_id.id != company_currency:
amount_currency = cur_obj.compute(cr, uid,
company_currency, inv.currency_id.id, t[1])
amount_currency = cur_obj.compute(cr, uid, company_currency, inv.currency_id.id, t[1], context=ctx)
else:
amount_currency = False
@ -880,7 +880,7 @@ class account_invoice(osv.osv):
'account_id': acc_id,
'date_maturity': t[0],
'amount_currency': diff_currency_p \
and amount_currency or False,
and amount_currency or False,
'currency_id': diff_currency_p \
and inv.currency_id.id or False,
'ref': ref,
@ -910,7 +910,7 @@ class account_invoice(osv.osv):
journal = self.pool.get('account.journal').browse(cr, uid, journal_id)
if journal.centralisation:
raise osv.except_osv(_('UserError'),
_('Cannot create invoice move on centralised journal'))
_('You cannot create an invoice on a centralised journal. Uncheck the centralised counterpart box in the related journal from the configuration menu.'))
line = self.finalize_invoice_move_lines(cr, uid, inv, line)
@ -1019,7 +1019,7 @@ class account_invoice(osv.osv):
pay_ids = account_move_line_obj.browse(cr, uid, i['payment_ids'])
for move_line in pay_ids:
if move_line.reconcile_partial_id and move_line.reconcile_partial_id.line_partial_ids:
raise osv.except_osv(_('Error !'), _('You cannot cancel the Invoice which is Partially Paid! You need to unreconcile concerned payment entries!'))
raise osv.except_osv(_('Error !'), _('You can not cancel an invoice which is partially paid! You need to unreconcile related payment entries first!'))
# First, set the invoices as cancelled and detach the move ids
self.write(cr, uid, ids, {'state':'cancel', 'move_id':False})
@ -1241,6 +1241,7 @@ class account_invoice(osv.osv):
account_invoice()
class account_invoice_line(osv.osv):
def _amount_line(self, cr, uid, ids, prop, unknow_none, unknow_dict):
res = {}
tax_obj = self.pool.get('account.tax')

View File

@ -205,13 +205,13 @@
<field name="amount_tax"/>
<field name="reconciled"/>
<field name="amount_total"/>
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
<field name="residual"/>
<group col="6" colspan="4">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
<button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="base.group_no_one"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','&lt;&gt;','paid'), ('reconciled', '=', True)]}" icon="gtk-convert" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
<button name="invoice_open" states="draft,proforma2" string="Approve" icon="terp-camera_test"/>
</group>
</group>
@ -294,20 +294,20 @@
</field>
</group>
<group col="4" colspan="2">
<button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" groups="base.group_user" icon="terp-stock_format-scientific" help="This action will erase taxes"/>
<button colspan="2" name="button_reset_taxes" states="draft,proforma2" string="Compute Taxes" type="object" groups="base.group_user" icon="terp-stock_format-scientific" help="This action will erase taxes"/>
<field name="amount_untaxed"/>
<label string="" colspan="2"/>
<field name="amount_tax"/>
<field name="reconciled"/>
<field name="amount_total"/>
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
<field name="residual"/>
<group col="8" colspan="4" groups="base.group_user">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/>
<button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','&lt;&gt;','paid'), ('reconciled', '=', True)]}" icon="gtk-convert" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="base.group_no_one"/>
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-gtk-media-pause" groups="account.group_account_user"/>
<button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-go-forward"/>
<button name="%(account_invoices)d" string="Print Invoice" type="action" icon="gtk-print" states="open,paid,proforma,sale,proforma2"/>
@ -355,7 +355,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Invoice">
<group col="10" colspan="4">
<group>
<filter name="draft" icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Invoices"/>
<filter name="proforma" icon="terp-gtk-media-pause" string="Proforma" domain="[('state','=','proforma2')]" help="Proforma Invoices"/>
<filter name="invoices" icon="terp-dolar" string="Invoices" domain="[('state','not in',['draft','cancel'])]" help="Proforma/Open/Paid Invoices"/>
@ -364,16 +364,16 @@
<separator orientation="vertical"/>
<field name="number"/>
<field name="partner_id"/>
<field name="user_id" select="1" widget="selection" string="Salesman">
<filter domain="[('user_id','=',uid)]" help="My invoices" icon="terp-personal" separator="1"/>
<field name="user_id" widget="selection" string="Salesman">
<filter domain="[('user_id','=',uid)]" help="My invoices" icon="terp-personal" />
</field>
<field name="origin"/>
<field name="amount_total"/>
</group>
<newline/>
<group col="10" colspan="4">
<field name="journal_id" widget="selection" select='1'/>
<field name="period_id" select='1' string="Period"/>
<group>
<field name="journal_id" widget="selection"/>
<field name="period_id" string="Period"/>
</group>
<newline/>
<group expand="0" string="Group By...">

View File

@ -30,6 +30,7 @@
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
<menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="menu_finance_reporting" sequence="100"/>
<menuitem id="menu_finance_entries" name="Journal Entries" parent="menu_finance" sequence="5" groups="group_account_user,group_account_manager"/>
<menuitem id="menu_account_reports" name="Financial Reports" parent="menu_finance_accounting" sequence="18"/>
<menuitem id="account.menu_finance_recurrent_entries" name="Recurring Entries"
parent="menu_finance_periodical_processing" sequence="15"
@ -42,6 +43,7 @@
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="menu_finance_reporting" sequence="300"/>
<menuitem id="next_id_22" name="Partners" parent="menu_finance_generic_reporting" sequence="1"/>
<menuitem id="menu_multi_currency" name="Multi-Currencies" parent="menu_finance_generic_reporting" sequence="10"/>
<menuitem
parent="account.menu_finance_legal_statement"
id="final_accounting_reports"

View File

@ -23,8 +23,10 @@ import time
from datetime import datetime
from operator import itemgetter
from lxml import etree
import netsvc
from osv import fields, osv
from osv import fields, osv, orm
from tools.translate import _
import decimal_precision as dp
import tools
@ -492,8 +494,14 @@ class account_move_line(osv.osv):
'amount_residual_currency': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in its currency (maybe different of the company currency)."),
'amount_residual': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in the company currency."),
'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."),
'period_id': fields.many2one('account.period', 'Period', required=True, select=2),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, select=1),
'journal_id': fields.related('move_id', 'journal_id', string='Journal', type='many2one', relation='account.journal', required=True, select=True, readonly=True,
store = {
'account.move': (_get_move_lines, ['journal_id'], 20)
}),
'period_id': fields.related('move_id', 'period_id', string='Period', type='many2one', relation='account.period', required=True, select=True, readonly=True,
store = {
'account.move': (_get_move_lines, ['period_id'], 20)
}),
'blocked': fields.boolean('Litigation', help="You can check this box to mark this journal item as a litigation with the associated partner"),
'partner_id': fields.many2one('res.partner', 'Partner', select=1, ondelete='restrict'),
'date_maturity': fields.date('Due date', select=True ,help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line."),
@ -595,11 +603,19 @@ class account_move_line(osv.osv):
return False
return True
def _check_currency(self, cr, uid, ids, context=None):
for l in self.browse(cr, uid, ids, context=context):
if l.account_id.currency_id:
if not l.currency_id or not l.currency_id.id == l.account_id.currency_id.id:
return False
return True
_constraints = [
(_check_no_view, 'You can not create move line on view account.', ['account_id']),
(_check_no_closed, 'You can not create move line on closed account.', ['account_id']),
(_check_company_id, 'Company must be same for its related account and period.',['company_id'] ),
(_check_date, 'The date of your Journal Entry is not in the defined period!',['date'] ),
(_check_company_id, 'Company must be same for its related account and period.', ['company_id']),
(_check_date, 'The date of your Journal Entry is not in the defined period!', ['date']),
(_check_currency, 'The selected account of your Journal Entry must receive a value in its secondary currency', ['currency_id']),
]
#TODO: ONCHANGE_ACCOUNT_ID: set account_tax_id
@ -650,14 +666,15 @@ class account_move_line(osv.osv):
id2 = part.property_account_receivable.id
if journal:
jt = journal_obj.browse(cr, uid, journal).type
#FIXME: Bank and cash journal are such a journal we can not assume a account based on this 2 journals
# Bank and cash journal can have a payment or receipt transaction, and in both type partner account
# will not be same id payment then payable, and if receipt then receivable
#if jt in ('sale', 'purchase_refund', 'bank', 'cash'):
if jt in ('sale', 'purchase_refund'):
val['account_id'] = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, id2)
elif jt in ('purchase', 'sale_refund', 'expense', 'bank', 'cash'):
elif jt in ('purchase', 'sale_refund'):
val['account_id'] = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, id1)
elif jt in ('general', 'bank', 'cash'):
if part.customer:
val['account_id'] = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, id2)
elif part.supplier:
val['account_id'] = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, id1)
if val.get('account_id', False):
d = self.onchange_account_id(cr, uid, ids, val['account_id'])
val.update(d['value'])
@ -717,7 +734,7 @@ class account_move_line(osv.osv):
)
return cr.fetchone()
def reconcile_partial(self, cr, uid, ids, type='auto', context=None):
def reconcile_partial(self, cr, uid, ids, type='auto', context=None, writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False):
move_rec_obj = self.pool.get('account.move.reconcile')
merges = []
unmerge = []
@ -732,7 +749,10 @@ class account_move_line(osv.osv):
company_list.append(line.company_id.id)
for line in self.browse(cr, uid, ids, context=context):
company_currency_id = line.company_id.currency_id
if line.account_id.currency_id:
currency_id = line.account_id.currency_id
else:
currency_id = line.company_id.currency_id
if line.reconcile_id:
raise osv.except_osv(_('Warning'), _('Already Reconciled!'))
if line.reconcile_partial_id:
@ -740,13 +760,19 @@ class account_move_line(osv.osv):
if not line2.reconcile_id:
if line2.id not in merges:
merges.append(line2.id)
total += (line2.debit or 0.0) - (line2.credit or 0.0)
if line2.account_id.currency_id:
total += line2.amount_currency
else:
total += (line2.debit or 0.0) - (line2.credit or 0.0)
merges_rec.append(line.reconcile_partial_id.id)
else:
unmerge.append(line.id)
total += (line.debit or 0.0) - (line.credit or 0.0)
if self.pool.get('res.currency').is_zero(cr, uid, company_currency_id, total):
res = self.reconcile(cr, uid, merges+unmerge, context=context)
if line.account_id.currency_id:
total += line.amount_currency
else:
total += (line.debit or 0.0) - (line.credit or 0.0)
if self.pool.get('res.currency').is_zero(cr, uid, currency_id, total):
res = self.reconcile(cr, uid, merges+unmerge, context=context, writeoff_acc_id=writeoff_acc_id, writeoff_period_id=writeoff_period_id, writeoff_journal_id=writeoff_journal_id)
return res
r_id = move_rec_obj.create(cr, uid, {
'type': type,
@ -811,7 +837,7 @@ class account_move_line(osv.osv):
if (not currency_obj.is_zero(cr, uid, account.company_id.currency_id, writeoff)) or \
(account.currency_id and (not currency_obj.is_zero(cr, uid, account.currency_id, currency))):
if not writeoff_acc_id:
raise osv.except_osv(_('Warning'), _('You have to provide an account for the write off entry !'))
raise osv.except_osv(_('Warning'), _('You have to provide an account for the write off/exchange difference entry !'))
if writeoff > 0:
debit = writeoff
credit = 0.0
@ -969,7 +995,6 @@ class account_move_line(osv.osv):
fields = {}
flds = []
title = _("Accounting Entries") #self.view_header_get(cr, uid, view_id, view_type, context)
xml = '''<?xml version="1.0"?>\n<tree string="%s" editable="top" refresh="5" on_write="on_create_write" colors="red:state==\'draft\';black:state==\'valid\'">\n\t''' % (title)
ids = journal_pool.search(cr, uid, [])
journals = journal_pool.browse(cr, uid, ids, context=context)
@ -981,14 +1006,14 @@ class account_move_line(osv.osv):
for field in journal.view_id.columns_id:
if not field.field in fields:
fields[field.field] = [journal.id]
fld.append((field.field, field.sequence, field.name))
fld.append((field.field, field.sequence))
flds.append(field.field)
common_fields[field.field] = 1
else:
fields.get(field.field).append(journal.id)
common_fields[field.field] = common_fields[field.field] + 1
fld.append(('period_id', 3, _('Period')))
fld.append(('journal_id', 10, _('Journal')))
fld.append(('period_id', 3))
fld.append(('journal_id', 10))
flds.append('period_id')
flds.append('journal_id')
fields['period_id'] = all_journal
@ -1000,62 +1025,71 @@ class account_move_line(osv.osv):
'tax_code_id': 50,
'move_id': 40,
}
for field_it in fld:
field = field_it[0]
document = etree.Element('tree', string=title, editable="top",
refresh="5", on_write="on_create_write",
colors="red:state=='draft';black:state=='valid'")
fields_get = self.fields_get(cr, uid, flds, context)
for field, _seq in fld:
if common_fields.get(field) == total:
fields.get(field).append(None)
# if field=='state':
# state = 'colors="red:state==\'draft\'"'
attrs = []
# if field=='state':
# state = 'colors="red:state==\'draft\'"'
f = etree.SubElement(document, 'field', name=field)
if field == 'debit':
attrs.append('sum = "%s"' % _("Total debit"))
f.set('sum', _("Total debit"))
elif field == 'credit':
attrs.append('sum = "%s"' % _("Total credit"))
f.set('sum', _("Total credit"))
elif field == 'move_id':
attrs.append('required = "False"')
f.set('required', 'False')
elif field == 'account_tax_id':
attrs.append('domain="[(\'parent_id\', \'=\' ,False)]"')
attrs.append("context=\"{'journal_id': journal_id}\"")
f.set('domain', "[('parent_id', '=' ,False)]")
f.set('context', "{'journal_id': journal_id}")
elif field == 'account_id' and journal.id:
attrs.append('domain="[(\'journal_id\', \'=\', '+str(journal.id)+'),(\'type\',\'&lt;&gt;\',\'view\'), (\'type\',\'&lt;&gt;\',\'closed\')]" on_change="onchange_account_id(account_id, partner_id)"')
f.set('domain', "[('journal_id', '=', journal_id),('type','!=','view'), ('type','!=','closed')]")
f.set('on_change', 'onchange_account_id(account_id, partner_id)')
elif field == 'partner_id':
attrs.append('on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"')
f.set('on_change', 'onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)')
elif field == 'journal_id':
attrs.append("context=\"{'journal_id': journal_id}\"")
f.set('context', "{'journal_id': journal_id}")
elif field == 'statement_id':
attrs.append("domain=\"[('state', '!=', 'confirm'),('journal_id.type', '=', 'bank')]\"")
f.set('domain', "[('state', '!=', 'confirm'),('journal_id.type', '=', 'bank')]")
elif field == 'date':
attrs.append('on_change="onchange_date(date)"')
f.set('on_change', 'onchange_date(date)')
elif field == 'analytic_account_id':
attrs.append('''groups="analytic.group_analytic_accounting"''') # Currently it is not working due to framework problem may be ..
# Currently it is not working due to being executed by superclass's fields_view_get
# f.set('groups', 'analytic.group_analytic_accounting')
pass
if field in ('amount_currency', 'currency_id'):
attrs.append('on_change="onchange_currency(account_id, amount_currency, currency_id, date, journal_id)"')
attrs.append('''attrs="{'readonly': [('state', '=', 'valid')]}"''')
f.set('on_change', 'onchange_currency(account_id, amount_currency, currency_id, date, journal_id)')
f.set('attrs', "{'readonly': [('state', '=', 'valid')]}")
if field in widths:
attrs.append('width="'+str(widths[field])+'"')
f.set('width', str(widths[field]))
if field in ('journal_id',):
attrs.append("invisible=\"context.get('journal_id', False)\"")
f.set("invisible", "context.get('journal_id', False)")
elif field in ('period_id',):
attrs.append("invisible=\"context.get('period_id', False)\"")
f.set("invisible", "context.get('period_id', False)")
else:
attrs.append("invisible=\"context.get('visible_id') not in %s\"" % (fields.get(field)))
xml += '''<field name="%s" %s/>\n''' % (field,' '.join(attrs))
f.set('invisible', "context.get('visible_id') not in %s" % (fields.get(field)))
xml += '''</tree>'''
result['arch'] = xml
result['fields'] = self.fields_get(cr, uid, flds, context)
orm.setup_modifiers(f, fields_get[field], context=context,
in_tree_view=True)
result['arch'] = etree.tostring(document, pretty_print=True)
result['fields'] = fields_get
return result
def _check_moves(self, cr, uid, context=None):
@ -1220,7 +1254,7 @@ class account_move_line(osv.osv):
vals['move_id'] = res[0]
if not vals.get('move_id', False):
if journal.sequence_id:
#name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id)
#name = self.pool.get('ir.sequence').next_by_id(cr, uid, journal.sequence_id.id)
v = {
'date': vals.get('date', time.strftime('%Y-%m-%d')),
'period_id': context['period_id'],
@ -1231,7 +1265,7 @@ class account_move_line(osv.osv):
move_id = move_obj.create(cr, uid, v, context)
vals['move_id'] = move_id
else:
raise osv.except_osv(_('No piece number !'), _('Can not create an automatic sequence for this piece !\n\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.'))
raise osv.except_osv(_('No piece number !'), _('Can not create an automatic sequence for this piece!\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.'))
ok = not (journal.type_control_ids or journal.account_control_ids)
if ('account_id' in vals):
account = account_obj.browse(cr, uid, vals['account_id'], context=context)
@ -1248,7 +1282,7 @@ class account_move_line(osv.osv):
break
# Automatically convert in the account's secondary currency if there is one and
# the provided values were not already multi-currency
if account.currency_id and 'amount_currency' not in vals and account.currency_id.id != account.company_id.currency_id.id:
if account.currency_id and (vals.get('amount_currency', False) is False) and account.currency_id.id != account.company_id.currency_id.id:
vals['currency_id'] = account.currency_id.id
ctx = {}
if 'date' in vals:
@ -1256,7 +1290,7 @@ class account_move_line(osv.osv):
vals['amount_currency'] = cur_obj.compute(cr, uid, account.company_id.currency_id.id,
account.currency_id.id, vals.get('debit', 0.0)-vals.get('credit', 0.0), context=ctx)
if not ok:
raise osv.except_osv(_('Bad account !'), _('You can not use this general account in this journal !'))
raise osv.except_osv(_('Bad account !'), _('You can not use this general account in this journal, check the tab \'Entry Controls\' on the related journal !'))
if vals.get('analytic_account_id',False):
if journal.analytic_journal_id:
@ -1272,7 +1306,7 @@ class account_move_line(osv.osv):
'user_id': uid
})]
result = super(osv.osv, self).create(cr, uid, vals, context=context)
result = super(account_move_line, self).create(cr, uid, vals, context=context)
# CREATE Taxes
if vals.get('account_tax_id', False):
tax_id = tax_obj.browse(cr, uid, vals['account_tax_id'])

View File

@ -23,8 +23,6 @@
<report id="account_transfers" model="account.transfer" name="account.transfer" string="Transfers" xml="account/report/transfer.xml" xsl="account/report/transfer.xsl"/>
<report auto="False" id="account_intracom" menu="False" model="account.move.line" name="account.intracom" string="IntraCom"/>
<report id="account_move_line_list" model="account.tax.code" name="account.tax.code.entries" rml="account/report/account_tax_code.rml" string="All Entries"/>
<report
auto="False"
id="account_vat_declaration"

View File

@ -162,17 +162,21 @@
<field name="arch" type="xml">
<form string="Account">
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<newline/>
<field name="parent_id"/>
<field name="type" select="1"/>
<field name="user_type" select="1"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<newline/>
<field name="parent_id"/>
<field name="type" select="1"/>
<field name="user_type" select="1"/>
<field name="active" groups="base.group_extended" />
<newline/>
<field name="debit" invisible="context.get('config_invisible', True)"/>
<field name="credit" invisible="context.get('config_invisible', True)"/>
<field name="balance" invisible="context.get('config_invisible', True)"/>
</group>
<notebook colspan="4">
<page string="General Information">
<field name="active" groups="base.group_extended" />
<newline/>
<group col="2" colspan="2">
<separator string="Currency" colspan="2"/>
@ -202,14 +206,13 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Accounts">
<group col="10" colspan="4">
<group>
<filter icon="terp-sale" string="Receivable Accounts" domain="[('type','=','receivable')]"/>
<filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
<separator orientation="vertical"/>
<field name="code"/>
<field name="name"/>
<field name="user_type"/>
<field name="type"/>
</group>
<newline/>
<group expand="0" string="Group By...">
@ -292,6 +295,40 @@
<field name="domain">[('parent_id','=',False)]</field>
</record>
<record id="view_account_gain_loss_tree" model="ir.ui.view">
<field name="name">Unrealized Gain or Loss</field>
<field name="model">account.account</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Unrealized Gains and losses">
<field name="code"/>
<field name="name"/>
<field name="currency_id"/>
<field name="exchange_rate"/>
<field name="foreign_balance"/>
<field name="adjusted_balance"/>
<field name="balance"/>
<field name="unrealized_gain_loss"/>
</tree>
</field>
</record>
<record id="action_account_gain_loss" model="ir.actions.act_window">
<field name="name">Unrealized Gain or Loss</field>
<field name="res_model">account.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_account_gain_loss_tree"/>
<field name="domain">[('currency_id','!=',False)]</field>
<field name="help">When doing multi-currency transactions, you may loose or gain some amount due to changes of exchange rate. This menu gives you a forecast of the Gain or Loss you'd realized if those transactions were ended today. Only for accounts having a secondary currency set.</field>
</record>
<menuitem
name="Unrealized Gain or Loss"
action="action_account_gain_loss"
id="menu_unrealized_gains_losses"
parent="account.menu_multi_currency"/>
<!--
Journal
@ -387,7 +424,7 @@
<field name="model">account.journal</field>
<field name="type">search</field>
<field name="arch" type="xml">
<tree string="Search Account Journal">
<search string="Search Account Journal">
<group>
<filter domain="['|', ('type', '=', 'sale'), ('type', '=', 'sale_refund')]" string="Sale" icon="terp-camera_test"/>
<filter domain="['|', ('type', '=', 'purchase'), ('type', '=', 'purchase_refund')]" string="Purchase" icon="terp-purchase"/>
@ -404,7 +441,7 @@
<separator orientation="vertical"/>
<filter string="Type" context="{'group_by':'type'}" icon="terp-stock_symbol-selection"/>
</group>
</tree>
</search>
</field>
</record>
<record id="view_account_journal_form" model="ir.ui.view">
@ -438,9 +475,9 @@
<field name="user_id" groups="base.group_extended"/>
<field name="currency"/>
</group>
<group colspan="2" col="2">
<group colspan="2" col="2" groups="base.group_extended">
<separator string="Validations" colspan="4"/>
<field name="allow_date" groups="base.group_extended"/>
<field name="allow_date"/>
</group>
<group colspan="2" col="2">
<separator string="Other Configuration" colspan="4"/>
@ -452,9 +489,9 @@
<!-- <field name="invoice_sequence_id"/>-->
<field name="group_invoice_lines"/>
</group>
<group colspan="2" col="2" groups="base.group_extended">
<group colspan="2" col="2"> <!-- can't set the field as hidden for certain groups as it's required in the object and not in the view, and GTK doesn't handle that correctly -->
<separator string="Sequence" colspan="4"/>
<field name="sequence_id"/>
<field name="sequence_id" required="0"/>
</group>
</page>
<page string="Entry Controls" groups="base.group_extended">
@ -482,7 +519,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Bank Statements">
<group col="8" colspan="4">
<group>
<filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
<filter string="Confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
<separator orientation="vertical"/>
@ -526,7 +563,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Bank Statements">
<group col="8" colspan="4">
<group>
<filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
<filter string="Confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
<separator orientation="vertical"/>
@ -564,7 +601,7 @@
</group>
<notebook colspan="4">
<page string="Transaction" name="statement_line_ids">
<field colspan="4" name="line_ids" nolabel="1">
<field colspan="4" name="line_ids" nolabel="1" context="{'date':date}">
<tree editable="bottom" string="Statement lines">
<field name="sequence" readonly="1" invisible="1"/>
<field name="date" groups="base.group_extended"/>
@ -596,7 +633,7 @@
</page>
</notebook>
<group col="8" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
<field name="balance_end"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
@ -749,6 +786,7 @@
<group col="2" colspan="2">
<separator string="Reporting Configuration" colspan="4"/>
<field name="report_type" select="2"/>
<field name="sign" />
</group>
<group col="2" colspan="2">
<separator string="Closing Method" colspan="4"/>
@ -907,7 +945,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Taxes">
<group col="10" colspan="4">
<group>
<field name="name"/>
<field name="description"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
@ -1102,7 +1140,7 @@
<separator string="Internal Note" colspan="4"/>
<field name="narration" colspan="4" nolabel="1"/>
</page>
<page string="Analytic Lines" groups="base.group_analytic_accounting">
<page string="Analytic Lines" groups="analytic.group_analytic_accounting">
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
</page>
</notebook>
@ -1149,7 +1187,7 @@
<field name="reconcile_partial_id"/>
<field name="state"/>
</page>
<page string="Analytic Lines" groups="base.group_analytic_accounting">
<page string="Analytic Lines" groups="analytic.group_analytic_accounting">
<field colspan="4" name="analytic_lines" nolabel="1" />
</page>
</notebook>
@ -1176,7 +1214,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Journal Items">
<group col='10' colspan='4'>
<group>
<filter icon="terp-document-new" string="Unbalanced" domain="[('state','=','draft')]" help="Unbalanced Journal Items"/>
<separator orientation="vertical"/>
<filter icon="terp-document-new" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Journal Items"/>
@ -1188,20 +1226,20 @@
domain="[('reconcile_id','=',False), ('account_id.reconcile','=',True)]" help="Unreconciled Journal Items"
name="unreconciled"/>
<separator orientation="vertical"/>
<field name="move_id" select="1" string="Number (Move)"/>
<field name="date" select='1'/>
<field name="account_id" select='1'/>
<field name="partner_id" select='1'>
<filter help="Next Partner Entries to reconcile" name="next_partner" string="Next Partner to reconcile" context="{'next_partner_only': 1}" icon="terp-gtk-jump-to-ltr" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>
<field name="move_id" string="Number (Move)"/>
<field name="date"/>
<field name="account_id"/>
<field name="partner_id">
<filter help="Next Partner Entries to reconcile" name="next_partner" context="{'next_partner_only': 1}" icon="terp-gtk-jump-to-ltr" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>
</field>
</group>
<newline/>
<group col="10" colspan="4">
<group>
<field name="journal_id" widget="selection" context="{'journal_id':self, 'visible_id':self, 'normal_view':False}"/>
<field name="period_id" context="{'period_id':self, 'search_default_period_id':self}"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="12" col="10">
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
@ -1390,7 +1428,7 @@
<separator string="Internal Note" colspan="4"/>
<field name="narration" colspan="4" nolabel="1"/>
</page>
<page string="Analytic Lines" groups="base.group_analytic_accounting">
<page string="Analytic Lines" groups="analytic.group_analytic_accounting">
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
</page>
</notebook>
@ -1433,7 +1471,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Move">
<group col='8' colspan='4'>
<group>
<filter icon="terp-document-new" string="Unposted" domain="[('state','=','draft')]" help="Unposted Journal Entries"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Journal Entries"/>
<separator orientation="vertical"/>
@ -1445,12 +1483,12 @@
<field name="date"/>
</group>
<newline/>
<group col='8' colspan='4'>
<group>
<field name="journal_id" widget="selection"/>
<field name="period_id"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="12" col="10">
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
@ -1710,35 +1748,37 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Payment Term">
<field name="name" select="1"/>
<field name="sequence"/>
<group colspan="2" col="4">
<separator string="Amount Computation" colspan="4"/>
<field name="value" colspan="4"/>
<field name="value_amount" colspan="4" attrs="{'readonly':[('value','=','balance')]}"/>
<group>
<group colspan="2" col="4">
<field name="name" select="1"/>
<separator string="Amount Computation" colspan="4"/>
<field name="value" colspan="4"/>
<field name="value_amount" colspan="4" attrs="{'readonly':[('value','=','balance')]}"/>
</group>
<group colspan="2" col="4">
<field name="sequence"/>
<separator string="Due Date Computation" colspan="4"/>
<field name="days" colspan="4"/>
<field name="days2" colspan="4"/>
</group>
</group>
<group colspan="2" col="4">
<separator string="Due date Computation" colspan="4"/>
<field name="days" colspan="4"/>
<field name="days2" colspan="4"/>
</group>
<label string=""/>
<newline/>
<label string="Example: at 14 net days 2 percents, remaining amount at 30 days end of month." colspan="4"/>
<separator string="Example" colspan="4"/>
<label string="At 14 net days 2 percent, remaining amount at 30 days end of month." colspan="4"/>
<group colspan="2" col="2">
<label string="Line 1:" colspan="2"/>
<label string=" valuation: percent"/>
<label string=" number of days: 14"/>
<label string=" value amount: 0.02"/>
<label string=" day of the month: 0"/>
<label string=" Valuation: Percent"/>
<label string=" Number of Days: 14"/>
<label string=" Value amount: 0.02"/>
<label string=" Day of the Month: 0"/>
</group>
<newline/>
<group colspan="2" col="2">
<label string="Line 2:" colspan="2"/>
<label string=" valuation: balance"/>
<label string=" number of days: 30"/>
<label string=" value amount: n.a"/>
<label string=" day of the month= -1"/>
<label string=" Valuation: Balance"/>
<label string=" Number of Days: 30"/>
<label string=" Value amount: n.a"/>
<label string=" Day of the Month= -1"/>
</group>
</form>
</field>
@ -1765,7 +1805,7 @@
<separator colspan="4" string="Information"/>
<field name="name" select="1"/>
<field name="active" select="1"/>
<separator colspan="4" string="Description on invoices"/>
<separator colspan="4" string="Description On Invoices"/>
<field colspan="4" name="note" nolabel="1"/>
<separator colspan="4" string="Computation"/>
<field colspan="4" name="line_ids" nolabel="1"/>
@ -1832,7 +1872,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Entry Subscription">
<group col="8" colspan="4">
<group>
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Subscription"/>
<filter icon="terp-camera_test" string="Running" domain="[('state','=','running')]" help="Running Subscription"/>
<separator orientation="vertical"/>
@ -2278,7 +2318,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Tax Templates">
<group col="10" colspan="4">
<group>
<filter icon="terp-sale" string="Sale" domain="[('type_tax_use','=','sale')]" help="Taxes used in Sales"/>
<filter icon="terp-purchase" string="Purchase" domain="[('type_tax_use','=','purchase')]" help="Taxes used in Purchases"/>
<separator orientation="vertical"/>
@ -2374,8 +2414,7 @@
<attribute name="string">Accounting Application Configuration</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string"
>Generate Your Accounting Chart from a Chart Template</attribute>
<attribute name="string">Generate Your Chart of Accounts from a Chart Template</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template</attribute>
@ -2387,13 +2426,13 @@
</xpath>
<group string="res_config_contents" position="replace">
<field name="company_id" widget="selection"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
<field name ="code_digits" groups="base.group_extended"/>
<field name ="code_digits" groups="account.group_account_user"/>
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)"/>
<field name ="seq_journal" groups="base.group_extended"/>
<field name ="seq_journal" groups="account.group_account_user"/>
<field name="sale_tax" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
<field name="purchase_tax" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
<newline/> <!-- extended view because the web UI is not good for one2many -->
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list" groups="base.group_extended">
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list" groups="account.group_account_user">
<form string="Bank Information">
<field name="acc_name"/>
<field name="account_type"/>
@ -2555,7 +2594,7 @@ action = pool.get('res.config').next(cr, uid, [], context)
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="company_id" select="1" groups="base.group_multi_company"/>
<field name="journal_id" on_change="onchange_journal_id(journal_id)" domain="[('type','=','cash')]" select="1" widget="selection"/>
<field name="journal_id" on_change="onchange_journal_id(journal_id)" select="1" widget="selection"/>
<field name="user_id" select="1" readonly="1"/>
<field name="period_id" select="1"/>
<field name="currency" invisible="1"/>
@ -2563,7 +2602,7 @@ action = pool.get('res.config').next(cr, uid, [], context)
<notebook colspan="4">
<page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
<field colspan="4" name="line_ids" nolabel="1">
<field colspan="4" name="line_ids" nolabel="1" context="{'date':date}">
<tree editable="bottom" string="Statement lines">
<field name="sequence" invisible="1"/>
<field name="date" groups="base.group_extended"/>
@ -2637,12 +2676,12 @@ action = pool.get('res.config').next(cr, uid, [], context)
</group>
<group col="2" colspan="2">
<separator string="Closing Balance" colspan="4"/>
<field name="balance_end" string="Calculated Balance"/>
<field name="balance_end_cash" string="CashBox Balance"/>
<field name="balance_end"/>
<field name="balance_end_cash"/>
</group>
</group>
<group col="8" colspan="4">
<field name="state" colspan="4"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm" colspan="4"/>
<button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object" groups="base.group_extended"/>
<button name="button_confirm_cash" states="open" string="Close CashBox" icon="terp-dialog-close" type="object"/>
<button name="button_open" states="draft" string="Open CashBox" icon="gtk-go-forward" type="object"/>
@ -2703,5 +2742,113 @@ action = pool.get('res.config').next(cr, uid, [], context)
parent="menu_finance_payables"
action="base.action_partner_supplier_form" sequence="100"/>
<!--
Account Reports
-->
<record id="view_account_financial_report_form" model="ir.ui.view">
<field name="name">account.financial.report.form</field>
<field name="model">account.financial.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account Report">
<group col="6" colspan="4">
<field name="name"/>
<field name="parent_id"/>
<field name="sequence"/>
<field name="type"/>
</group>
<notebook colspan="4">
<page string="Report" attrs="{'invisible': [('state','!=','confirm')]}">
<field name="display_detail" attrs="{'invisible': [('type','!=','accounts')]}"/>
<newline/>
<field name="account_ids" nolabel="1" colspan="6" attrs="{'invisible': [('type', '!=', 'accounts')]}"/>
<newline/>
<field name="account_report_id" attrs="{'invisible': [('type', '!=', 'account_report')]}"/>
<newline/>
<field name="account_type_ids" nolabel="1" attrs="{'invisible': [('type', '!=', 'account_type')]}"/>
<newline/>
</page>
<page string="Notes" attrs="{'invisible': [('state','!=','confirm')]}">
<field name="note" nolabel="1" colspan="4"/>
</page>
</notebook>
</form>
</field>
</record>
<record id="view_account_financial_report_tree" model="ir.ui.view">
<field name="name">account.financial.report.tree</field>
<field name="model">account.financial.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Account Report">
<field name="name"/>
<field name="parent_id" invisible="1"/>
<field name="type"/>
<field name="account_report_id"/>
</tree>
</field>
</record>
<record id="view_account_financial_report_search" model="ir.ui.view">
<field name="name">account.financial.report.search</field>
<field name="model">account.financial.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Account Report">
<group>
<field name="name"/>
<field name="type"/>
<field name="account_report_id"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Parent Report" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
<separator orientation="vertical"/>
<filter string="Report Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
</group>
</search>
</field>
</record>
<record id="action_account_financial_report_tree" model="ir.actions.act_window">
<field name="name">Financial Reports</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.financial.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_account_financial_report_search"/>
<field name="view_id" ref="view_account_financial_report_tree"/>
<field name="help">Makes a generic system to draw financial reports easily.</field>
</record>
<menuitem id="menu_account_financial_reports_tree" name="Account Reports" parent="menu_account_reports" action="action_account_financial_report_tree"/>
<record id="view_account_report_tree_hierarchy" model="ir.ui.view">
<field name="name">account.report.hierarchy</field>
<field name="model">account.financial.report</field>
<field name="type">tree</field>
<field name="field_parent">children_ids</field>
<field name="arch" type="xml">
<tree string="Account Reports Hierarchy">
<field name="name"/>
<field name="type"/>
<field name="parent_id" invisible="1"/>
<field name="account_report_id"/>
</tree>
</field>
</record>
<record id="action_account_report_tree_hierarchy" model="ir.actions.act_window">
<field name="name">Financial Reports Hierarchy</field>
<field name="res_model">account.financial.report</field>
<field name="view_type">tree</field>
<field name="view_id" ref="view_account_report_tree_hierarchy"/>
<field name="domain">[('parent_id','=',False)]</field>
</record>
<menuitem id="menu_account_report_tree_hierarchy" name="Account Reports Hierarchy"
parent="menu_account_reports" action="action_account_report_tree_hierarchy"/>
</data>
</openerp>

View File

@ -40,7 +40,7 @@
<form string="Account Board">
<hpaned>
<child1>
<action colspan="4" height="160" width="400" name="%(account.action_invoice_tree1)d" string="Customer Invoices to Approve" domain="[('state','=','draft'),('type','=','out_invoice')]"/>
<action colspan="4" height="160" width="400" name="%(account.action_invoice_tree1)d" string="Customer Invoices to Approve" domain="[('state','in',('draft','proforma2')), ('type','=','out_invoice')]"/>
<action colspan="4" height="160" width="400" name="%(action_company_analysis_tree)d" string="Company Analysis" groups="account.group_account_manager"/>
</child1>
<child2>

View File

@ -32,7 +32,7 @@ class res_company(osv.osv):
string="Reserve and Profit/Loss Account",
view_load=True,
domain="[('type', '=', 'other')]",
help="This Account is used for transferring Profit/Loss(If It is Profit: Amount will be added, Loss : Amount will be deducted.), Which is calculated from Profit & Loss Report"),
help="This account is used for transferring Profit/Loss (If It is Profit: Amount will be added, Loss : Amount will be deducted.), as calculated in Profit & Loss Report"),
}
_defaults = {

View File

@ -7,7 +7,7 @@
<field name="model">res.company</field>
<field name="type">form</field>
<field name="arch" type="xml">
<notebook>
<notebook position="inside">
<page string="Overdue Payments" position="inside">
<separator string="Overdue Payments Message" colspan="4"/>
<field name="overdue_msg" nolabel="1" colspan ="4"/>

View File

@ -21,26 +21,26 @@
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_income_view1">
<field name="name">Income View</field>
<field name="code">view</field>
<field name="report_type">income</field>
</record>
<record model="account.account.type" id="account_type_expense_view1">
<field name="name">Expense View</field>
<field name="code">expense</field>
<field name="report_type">expense</field>
</record>
<record model="account.account.type" id="account_type_asset_view1">
<field name="name">Asset View</field>
<field name="code">asset</field>
<field name="report_type">asset</field>
</record>
<record model="account.account.type" id="account_type_liability_view1">
<field name="name">Liability View</field>
<field name="code">liability</field>
<field name="report_type">liability</field>
</record>
<record model="account.account.type" id="account_type_income_view1">
<field name="name">Income View</field>
<field name="code">view</field>
<field name="report_type">income</field>
</record>
<record model="account.account.type" id="account_type_expense_view1">
<field name="name">Expense View</field>
<field name="code">expense</field>
<field name="report_type">expense</field>
</record>
<record model="account.account.type" id="account_type_asset_view1">
<field name="name">Asset View</field>
<field name="code">asset</field>
<field name="report_type">asset</field>
</record>
<record model="account.account.type" id="account_type_liability_view1">
<field name="name">Liability View</field>
<field name="code">liability</field>
<field name="report_type">liability</field>
</record>
<record model="account.account.type" id="conf_account_type_income">
<field name="name">Income</field>
@ -87,7 +87,7 @@
<record model="account.account.type" id="conf_account_type_equity">
<field name="name">Equity</field>
<field name="code">equity</field>
<field name="report_type">asset</field>
<field name="report_type">liability</field>
<field name="close_method">balance</field>
</record>
@ -106,16 +106,16 @@
<!-- Account Templates-->
<record id="conf_chart0" model="account.account.template">
<field name="code">0</field>
<field name="name">Configurable Account Chart</field>
<field eval="0" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_view"/>
</record>
<!-- Account Templates-->
<record id="conf_chart0" model="account.account.template">
<field name="code">0</field>
<field name="name">Configurable Account Chart</field>
<field eval="0" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_view"/>
</record>
<!-- Balance Sheet -->
<!-- Balance Sheet -->
<record id="conf_bal" model="account.account.template">
<field name="code">1</field>
@ -125,120 +125,120 @@
<field name="user_type" ref="conf_account_type_view"/>
</record>
<record id="conf_fas" model="account.account.template">
<field name="code">10</field>
<field name="name">Fixed Assets</field>
<field ref="conf_bal" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_fas" model="account.account.template">
<field name="code">10</field>
<field name="name">Fixed Assets</field>
<field ref="conf_bal" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_xfa" model="account.account.template">
<field name="code">100</field>
<field name="name">Fixed Asset Account</field>
<field ref="conf_fas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_xfa" model="account.account.template">
<field name="code">100</field>
<field name="name">Fixed Asset Account</field>
<field ref="conf_fas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_nca" model="account.account.template">
<field name="code">11</field>
<field name="name">Net Current Assets</field>
<field ref="conf_bal" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_nca" model="account.account.template">
<field name="code">11</field>
<field name="name">Net Current Assets</field>
<field ref="conf_bal" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_cas" model="account.account.template">
<field name="code">110</field>
<field name="name">Current Assets</field>
<field ref="conf_nca" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_cas" model="account.account.template">
<field name="code">110</field>
<field name="name">Current Assets</field>
<field ref="conf_nca" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_stk" model="account.account.template">
<field name="code">1101</field>
<field name="name">Purchased Stocks</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_stk" model="account.account.template">
<field name="code">1101</field>
<field name="name">Purchased Stocks</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_a_recv" model="account.account.template">
<field name="code">1102</field>
<field name="name">Debtors</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">receivable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_a_recv" model="account.account.template">
<field name="code">1102</field>
<field name="name">Debtors</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">receivable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_receivable"/>
</record>
<record id="conf_ova" model="account.account.template">
<field name="code">1103</field>
<field name="name">Tax Paid</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_ova" model="account.account.template">
<field name="code">1103</field>
<field name="name">Tax Paid</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_bnk" model="account.account.template">
<field name="code">1104</field>
<field name="name">Bank Current Account</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">liquidity</field>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_bnk" model="account.account.template">
<field name="code">1104</field>
<field name="name">Bank Current Account</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_o_income" model="account.account.template">
<field name="code">1106</field>
<field name="name">Opening Income Account</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_income"/>
</record>
<record id="conf_o_income" model="account.account.template">
<field name="code">1106</field>
<field name="name">Opening Income Account</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_income"/>
</record>
<record id="conf_cli" model="account.account.template">
<field name="code">111</field>
<field name="name">Current Liabilities</field>
<field ref="conf_nca" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_liability_view1"/>
</record>
<record id="conf_cli" model="account.account.template">
<field name="code">111</field>
<field name="name">Current Liabilities</field>
<field ref="conf_nca" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_liability_view1"/>
</record>
<record id="conf_a_pay" model="account.account.template">
<field name="code">1111</field>
<field name="name">Creditors</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">payable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_liability"/>
</record>
<record id="conf_a_pay" model="account.account.template">
<field name="code">1111</field>
<field name="name">Creditors</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">payable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_payable"/>
</record>
<record id="conf_iva" model="account.account.template">
<field name="code">1112</field>
<field name="name">Tax Received</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_liability"/>
</record>
<record id="conf_iva" model="account.account.template">
<field name="code">1112</field>
<field name="name">Tax Received</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_liability"/>
</record>
<record id="conf_a_reserve_and_surplus" model="account.account.template">
<field name="code">1113</field>
<field name="name">Reserve and Profit/Loss Account</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">other</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_liability"/>
</record>
<record id="conf_a_reserve_and_surplus" model="account.account.template">
<field name="code">1113</field>
<field name="name">Reserve and Profit/Loss Account</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">other</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_liability"/>
</record>
<record id="conf_o_expense" model="account.account.template">
<field name="code">1114</field>
<field name="name">Opening Expense Account</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<record id="conf_o_expense" model="account.account.template">
<field name="code">1114</field>
<field name="name">Opening Expense Account</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<!-- Profit and Loss -->
@ -250,53 +250,53 @@
<field name="user_type" ref="conf_account_type_view"/>
</record>
<record id="conf_rev" model="account.account.template">
<field name="code">20</field>
<field name="name">Revenue</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_income_view1"/>
</record>
<record id="conf_rev" model="account.account.template">
<field name="code">20</field>
<field name="name">Revenue</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_income_view1"/>
</record>
<record id="conf_a_sale" model="account.account.template">
<field name="code">200</field>
<field name="name">Product Sales</field>
<field ref="conf_rev" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_income"/>
</record>
<record id="conf_a_sale" model="account.account.template">
<field name="code">200</field>
<field name="name">Product Sales</field>
<field ref="conf_rev" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_income"/>
</record>
<record id="conf_cos" model="account.account.template">
<field name="code">21</field>
<field name="name">Cost of Sales</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_income_view1"/>
</record>
<record id="conf_cos" model="account.account.template">
<field name="code">21</field>
<field name="name">Cost of Sales</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_income_view1"/>
</record>
<record id="conf_cog" model="account.account.template">
<field name="code">210</field>
<field name="name">Cost of Goods Sold</field>
<field ref="conf_cos" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<record id="conf_cog" model="account.account.template">
<field name="code">210</field>
<field name="name">Cost of Goods Sold</field>
<field ref="conf_cos" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<record id="conf_ovr" model="account.account.template">
<field name="code">22</field>
<field name="name">Overheads</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_expense_view1"/>
</record>
<record id="conf_ovr" model="account.account.template">
<field name="code">22</field>
<field name="name">Overheads</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_expense_view1"/>
</record>
<record id="conf_a_expense" model="account.account.template">
<field name="code">220</field>
<field name="name">Expenses</field>
<field ref="conf_ovr" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<record id="conf_a_expense" model="account.account.template">
<field name="code">220</field>
<field name="name">Expenses</field>
<field ref="conf_ovr" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<record id="conf_a_salary_expense" model="account.account.template">
<field name="code">221</field>
@ -315,126 +315,126 @@
<field name="name">Plan Fees </field>
</record>
<record id="tax_code_balance_net" model="account.tax.code.template">
<field name="name">Tax Balance to Pay</field>
<field name="parent_id" ref="tax_code_chart_root"/>
</record>
<record id="tax_code_balance_net" model="account.tax.code.template">
<field name="name">Tax Balance to Pay</field>
<field name="parent_id" ref="tax_code_chart_root"/>
</record>
<!-- Input TAX -->
<record id="tax_code_input" model="account.tax.code.template">
<field name="name">Tax Received</field>
<field name="parent_id" ref="tax_code_balance_net"/>
<field eval="-1" name="sign"/>
</record>
<!-- Input TAX -->
<record id="tax_code_input" model="account.tax.code.template">
<field name="name">Tax Received</field>
<field name="parent_id" ref="tax_code_balance_net"/>
<field eval="-1" name="sign"/>
</record>
<record id="tax_code_input_S" model="account.tax.code.template">
<field name="name">Tax Received Rate S (15%)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_S" model="account.tax.code.template">
<field name="name">Tax Received Rate S (15%)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_R" model="account.tax.code.template">
<field name="name">Tax Received Rate R (5%)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_R" model="account.tax.code.template">
<field name="name">Tax Received Rate R (5%)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_X" model="account.tax.code.template">
<field name="name">Tax Received Rate X (Exempt)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_X" model="account.tax.code.template">
<field name="name">Tax Received Rate X (Exempt)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_O" model="account.tax.code.template">
<field name="name">Tax Received Rate O (Out of scope)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_O" model="account.tax.code.template">
<field name="name">Tax Received Rate O (Out of scope)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<!-- Output TAX -->
<!-- Output TAX -->
<record id="tax_code_output" model="account.tax.code.template">
<field name="name">Tax Paid</field>
<field name="parent_id" ref="tax_code_balance_net"/>
</record>
<record id="tax_code_output" model="account.tax.code.template">
<field name="name">Tax Paid</field>
<field name="parent_id" ref="tax_code_balance_net"/>
</record>
<record id="tax_code_output_S" model="account.tax.code.template">
<field name="name">Tax Paid Rate S (15%)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_S" model="account.tax.code.template">
<field name="name">Tax Paid Rate S (15%)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_R" model="account.tax.code.template">
<field name="name">Tax Paid Rate R (5%)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_R" model="account.tax.code.template">
<field name="name">Tax Paid Rate R (5%)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_X" model="account.tax.code.template">
<field name="name">Tax Paid Rate X (Exempt)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_X" model="account.tax.code.template">
<field name="name">Tax Paid Rate X (Exempt)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_O" model="account.tax.code.template">
<field name="name">Tax Paid Rate O (Out of scope)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_O" model="account.tax.code.template">
<field name="name">Tax Paid Rate O (Out of scope)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<!-- Invoiced Base of TAX -->
<!-- Invoiced Base of TAX -->
<!-- Purchases -->
<!-- Purchases -->
<record id="tax_code_base_net" model="account.tax.code.template">
<field name="name">Tax Bases</field>
<field name="parent_id" ref="tax_code_chart_root"/>
</record>
<record id="tax_code_base_net" model="account.tax.code.template">
<field name="name">Tax Bases</field>
<field name="parent_id" ref="tax_code_chart_root"/>
</record>
<record id="tax_code_base_purchases" model="account.tax.code.template">
<field name="name">Taxable Purchases Base</field>
<field name="parent_id" ref="tax_code_base_net"/>
</record>
<record id="tax_code_base_purchases" model="account.tax.code.template">
<field name="name">Taxable Purchases Base</field>
<field name="parent_id" ref="tax_code_base_net"/>
</record>
<record id="tax_code_purch_S" model="account.tax.code.template">
<field name="name">Taxable Purchases Rated S (15%)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_S" model="account.tax.code.template">
<field name="name">Taxable Purchases Rated S (15%)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_R" model="account.tax.code.template">
<field name="name">Taxable Purchases Rated R (5%)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_R" model="account.tax.code.template">
<field name="name">Taxable Purchases Rated R (5%)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_X" model="account.tax.code.template">
<field name="name">Taxable Purchases Type X (Exempt)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_X" model="account.tax.code.template">
<field name="name">Taxable Purchases Type X (Exempt)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_O" model="account.tax.code.template">
<field name="name">Taxable Purchases Type O (Out of scope)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_O" model="account.tax.code.template">
<field name="name">Taxable Purchases Type O (Out of scope)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<!-- Sales -->
<!-- Sales -->
<record id="tax_code_base_sales" model="account.tax.code.template">
<field name="name">Base of Taxable Sales</field>
<field name="parent_id" ref="tax_code_base_net"/>
</record>
<record id="tax_code_base_sales" model="account.tax.code.template">
<field name="name">Base of Taxable Sales</field>
<field name="parent_id" ref="tax_code_base_net"/>
</record>
<record id="tax_code_sales_S" model="account.tax.code.template">
<field name="name">Taxable Sales Rated S (15%)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_S" model="account.tax.code.template">
<field name="name">Taxable Sales Rated S (15%)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_R" model="account.tax.code.template">
<field name="name">Taxable Sales Rated R (5%)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_R" model="account.tax.code.template">
<field name="name">Taxable Sales Rated R (5%)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_X" model="account.tax.code.template">
<field name="name">Taxable Sales Type X (Exempt)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_X" model="account.tax.code.template">
<field name="name">Taxable Sales Type X (Exempt)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_O" model="account.tax.code.template">
<field name="name">Taxable Sales Type O (Out of scope)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_O" model="account.tax.code.template">
<field name="name">Taxable Sales Type O (Out of scope)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="configurable_chart_template" model="account.chart.template">
<field name="name">Configurable Account Chart Template</field>
@ -446,11 +446,11 @@
<field name="property_account_expense_categ" ref="conf_a_expense"/>
<field name="property_account_income_categ" ref="conf_a_sale"/>
<field name="property_account_income_opening" ref="conf_o_income"/>
<field name="property_account_expense_opening" ref="conf_o_expense"/>
<field name="property_account_expense_opening" ref="conf_o_expense"/>
<field name="property_reserve_and_surplus_account" ref="conf_a_reserve_and_surplus"/>
</record>
<!-- VAT Codes -->
<!-- VAT Codes -->
<!-- Purchases + Output VAT -->
<record id="otaxs" model="account.tax.template">
@ -569,9 +569,9 @@
<!-- = = = = = = = = = = = = = = = -->
<!-- Fiscal Mapping Templates -->
<!-- = = = = = = = = = = = = = = = -->
<!-- = = = = = = = = = = = = = = = -->
<!-- Fiscal Mapping Templates -->
<!-- = = = = = = = = = = = = = = = -->
<record id="fiscal_position_normal_taxes_template1" model="account.fiscal.position.template">
@ -584,40 +584,40 @@
<field name="chart_template_id" ref="configurable_chart_template"/>
</record>
<!-- = = = = = = = = = = = = = = = -->
<!-- Fiscal Position Tax Templates -->
<!-- = = = = = = = = = = = = = = = -->
<!-- = = = = = = = = = = = = = = = -->
<!-- Fiscal Position Tax Templates -->
<!-- = = = = = = = = = = = = = = = -->
<record id="fiscal_position_normal_taxes" model="account.fiscal.position.tax.template">
<record id="fiscal_position_normal_taxes" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_normal_taxes_template1"/>
<field name="tax_src_id" ref="itaxs"/>
<field name="tax_dest_id" ref="otaxs"/>
</record>
<record id="fiscal_position_tax_exempt" model="account.fiscal.position.tax.template">
<record id="fiscal_position_tax_exempt" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_tax_exempt_template2"/>
<field name="tax_src_id" ref="itaxx"/>
<field name="tax_dest_id" ref="otaxx"/>
</record>
<!-- Assigned Default Taxes For Different Account -->
<!-- Assigned Default Taxes For Different Account -->
<record id="conf_a_sale" model="account.account.template">
<field name="tax_ids" eval="[(6,0,[ref('itaxs')])]"/>
</record>
<record id="conf_a_sale" model="account.account.template">
<field name="tax_ids" eval="[(6,0,[ref('itaxs')])]"/>
</record>
<record id="conf_a_expense" model="account.account.template">
<field name="tax_ids" eval="[(6,0,[ref('otaxs')])]"/>
</record>
<record id="action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="category_id" ref="account.category_accounting_configuration"/>
<field name="type">automatic</field>
</record>
<record id="conf_a_expense" model="account.account.template">
<field name="tax_ids" eval="[(6,0,[ref('otaxs')])]"/>
</record>
<record id="action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="category_id" ref="account.category_accounting_configuration"/>
<field name="type">automatic</field>
</record>
</data>

View File

@ -469,66 +469,48 @@
Account Journal Sequences
-->
<record id="sequence_journal_type" model="ir.sequence.type">
<field name="name">Account Journal</field>
<field name="code">account.journal</field>
</record>
<record id="sequence_journal" model="ir.sequence">
<field name="name">Account Journal</field>
<field name="code">account.journal</field>
<field name="prefix"/>
</record>
<record id="sequence_sale_journal" model="ir.sequence">
<field name="name">Sale Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Sales Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">SAJ/%(year)s/</field>
</record>
<record id="sequence_refund_sales_journal" model="ir.sequence">
<field name="name">Sales Credit Note Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Sales Credit Note Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">SCNJ/%(year)s/</field>
</record>
<record id="sequence_purchase_journal" model="ir.sequence">
<field name="name">Purchase Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Expenses Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">EXJ/%(year)s/</field>
</record>
<record id="sequence_refund_purchase_journal" model="ir.sequence">
<field name="name">Expenses Credit Notes Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Expenses Credit Notes Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">ECNJ/%(year)s/</field>
</record>
<record id="sequence_bank_journal" model="ir.sequence">
<field name="name">Bank Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Bank Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">BNK/%(year)s/</field>
</record>
<record id="sequence_check_journal" model="ir.sequence">
<field name="name">Checks Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Checks Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">CHK/%(year)s/</field>
</record>
<record id="sequence_cash_journal" model="ir.sequence">
<field name="name">Cash Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Cash Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">CSH/%(year)s/</field>
</record>
<record id="sequence_opening_journal" model="ir.sequence">
<field name="name">Opening Entries Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Opening Entries Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">OPEJ/%(year)s/</field>
</record>
<record id="sequence_miscellaneous_journal" model="ir.sequence">
<field name="name">Miscellaneous Journal</field>
<field name="code">account.journal</field>
<field name="name">Account Default Miscellaneous Journal</field>
<field eval="3" name="padding"/>
<field name="prefix">MISJ/%(year)s/</field>
</record>
@ -538,7 +520,7 @@
-->
<record id="sequence_reconcile" model="ir.sequence.type">
<field name="name">Account reconcile sequence</field>
<field name="name">Account Reconcile</field>
<field name="code">account.reconcile</field>
</record>
<record id="sequence_reconcile_seq" model="ir.sequence">
@ -550,7 +532,7 @@
</record>
<record id="sequence_statement_type" model="ir.sequence.type">
<field name="name">Bank Statement</field>
<field name="name">Account Bank Statement</field>
<field name="code">account.bank.statement</field>
</record>
<record id="sequence_statement" model="ir.sequence">
@ -562,7 +544,7 @@
</record>
<record id="cash_sequence_statement_type" model="ir.sequence.type">
<field name="name">Cash Statement</field>
<field name="name">Account Cash Statement</field>
<field name="code">account.cash.statement</field>
</record>
<record id="cash_sequence_statement" model="ir.sequence">
@ -572,5 +554,30 @@
<field eval="1" name="number_next"/>
<field eval="1" name="number_increment"/>
</record>
<!--
Sequence for analytic account
-->
<record id="seq_type_analytic_account" model="ir.sequence.type">
<field name="name">Analytic account</field>
<field name="code">account.analytic.account</field>
</record>
<record id="seq_analytic_account" model="ir.sequence">
<field name="name">Analytic account sequence</field>
<field name="code">account.analytic.account</field>
<field eval="3" name="padding"/>
<field eval="2708" name="number_next"/>
</record>
<!--
Invoice requests (deprecated)
-->
<record id="req_link_invoice" model="res.request.link">
<field name="name">Invoice</field>
<field name="object">account.invoice</field>
</record>
</data>
</openerp>

View File

@ -1,75 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="req_link_invoice" model="res.request.link">
<field name="name">Invoice</field>
<field name="object">account.invoice</field>
</record>
<!--
Sequences types for invoices
-->
<record id="seq_type_out_invoice" model="ir.sequence.type">
<field name="name">Account Invoice Out</field>
<field name="code">account.invoice.out_invoice</field>
</record>
<record id="seq_type_in_invoice" model="ir.sequence.type">
<field name="name">Account Invoice In</field>
<field name="code">account.invoice.in_invoice</field>
</record>
<record id="seq_type_out_refund" model="ir.sequence.type">
<field name="name">Account Refund Out</field>
<field name="code">account.invoice.out_refund</field>
</record>
<record id="seq_type_in_refund" model="ir.sequence.type">
<field name="name">Account Refund In</field>
<field name="code">account.invoice.in_refund</field>
</record>
<!--
Sequences for invoices
-->
<record id="seq_out_invoice" model="ir.sequence">
<field name="name">Account Invoice Out</field>
<field name="code">account.invoice.out_invoice</field>
<field eval="3" name="padding"/>
<field name="prefix">%(year)s/</field>
</record>
<record id="seq_in_invoice" model="ir.sequence">
<field name="name">Account Invoice In</field>
<field name="code">account.invoice.in_invoice</field>
<field eval="3" name="padding"/>
<field name="prefix">%(year)s/</field>
</record>
<record id="seq_out_refund" model="ir.sequence">
<field name="name">Account Refund Out</field>
<field name="code">account.invoice.out_refund</field>
<field eval="3" name="padding"/>
<field name="prefix">%(year)s/</field>
</record>
<record id="seq_in_refund" model="ir.sequence">
<field name="name">Account Refund In</field>
<field name="code">account.invoice.in_refund</field>
<field eval="3" name="padding"/>
<field name="prefix">%(year)s/</field>
</record>
<!--
Sequences types for analytic account
-->
<record id="seq_type_analytic_account" model="ir.sequence.type">
<field name="name">Analytic account</field>
<field name="code">account.analytic.account</field>
</record>
<!--
Sequence for analytic account
-->
<record id="seq_analytic_account" model="ir.sequence">
<field name="name">Analytic account sequence</field>
<field name="code">account.analytic.account</field>
<field eval="3" name="padding"/>
<field eval="2708" name="number_next"/>
</record>
</data>
</openerp>

View File

@ -49,7 +49,7 @@
<record id="account_type_cash_equity" model="account.account.type">
<field name="name">Equity</field>
<field name="code">equity</field>
<field name="report_type">asset</field>
<field name="report_type">liability</field>
<field name="close_method">balance</field>
</record>
<record id="account_type_cash_moves" model="account.account.type">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

9130
addons/account/i18n/es_MX.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -65,21 +65,6 @@ class account_installer(osv.osv_memory):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.company_id and user.company_id.id or False
def _get_default_charts(self, cr, uid, context=None):
module_name = False
company_id = self._default_company(cr, uid, context=context)
company = self.pool.get('res.company').browse(cr, uid, company_id, context=context)
address_id = self.pool.get('res.partner').address_get(cr, uid, [company.partner_id.id])
if address_id['default']:
address = self.pool.get('res.partner.address').browse(cr, uid, address_id['default'], context=context)
code = address.country_id.code
module_name = (code and 'l10n_' + code.lower()) or False
if module_name:
module_id = self.pool.get('ir.module.module').search(cr, uid, [('name', '=', module_name)], context=context)
if module_id:
return module_name
return 'configurable'
_defaults = {
'date_start': lambda *a: time.strftime('%Y-01-01'),
'date_stop': lambda *a: time.strftime('%Y-12-31'),
@ -87,7 +72,7 @@ class account_installer(osv.osv_memory):
'sale_tax': 0.0,
'purchase_tax': 0.0,
'company_id': _default_company,
'charts': _get_default_charts
'charts': 'configurable'
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
@ -100,7 +85,7 @@ class account_installer(osv.osv_memory):
unconfigured_cmp = list(set(company_ids)-set(configured_cmp))
for field in res['fields']:
if field == 'company_id':
res['fields'][field]['domain'] = unconfigured_cmp
res['fields'][field]['domain'] = [('id','in',unconfigured_cmp)]
res['fields'][field]['selection'] = [('', '')]
if unconfigured_cmp:
cmp_select = [(line.id, line.name) for line in self.pool.get('res.company').browse(cr, uid, unconfigured_cmp)]
@ -164,7 +149,7 @@ class account_installer(osv.osv_memory):
}
new_paid_tax_code_temp = obj_tax_code_temp.create(cr, uid, vals_paid_tax_code_temp, context=context)
sales_tax_temp = obj_tax_temp.create(cr, uid, {
'name': _('TAX %s%%') % (s_tax*100),
'name': _('Sale TAX %s%%') % (s_tax*100),
'amount': s_tax,
'base_code_id': new_tax_code_temp,
'tax_code_id': new_paid_tax_code_temp,
@ -193,8 +178,7 @@ class account_installer(osv.osv_memory):
}
new_paid_tax_code_temp = obj_tax_code_temp.create(cr, uid, vals_paid_tax_code_temp, context=context)
purchase_tax_temp = obj_tax_temp.create(cr, uid, {
'name': _('TAX %s%%') % (p_tax*100),
'description': _('TAX %s%%') % (p_tax*100),
'name': _('Purchase TAX %s%%') % (p_tax*100),
'amount': p_tax,
'base_code_id': new_tax_code_temp,
'tax_code_id': new_paid_tax_code_temp,
@ -239,26 +223,4 @@ class account_installer(osv.osv_memory):
account_installer()
class account_installer_modules(osv.osv_memory):
_inherit = 'base.setup.installer'
_columns = {
'account_analytic_plans': fields.boolean('Multiple Analytic Plans',
help="Allows invoice lines to impact multiple analytic accounts "
"simultaneously."),
'account_payment': fields.boolean('Suppliers Payment Management',
help="Streamlines invoice payment and creates hooks to plug "
"automated payment systems in."),
'account_followup': fields.boolean('Followups Management',
help="Helps you generate reminder letters for unpaid invoices, "
"including multiple levels of reminding and customized "
"per-partner policies."),
'account_anglo_saxon': fields.boolean('Anglo-Saxon Accounting',
help="This module will support the Anglo-Saxons accounting methodology by "
"changing the accounting logic with stock transactions."),
'account_asset': fields.boolean('Assets Management',
help="Helps you to manage your assets and their depreciation entries."),
}
account_installer_modules()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -46,23 +46,14 @@ class ir_sequence(osv.osv):
'fiscal_ids': fields.one2many('account.sequence.fiscalyear',
'sequence_main_id', 'Sequences')
}
def get_id(self, cr, uid, sequence_id, test='id', context=None):
if context is None:
context = {}
cr.execute('select id from ir_sequence where '
+ test + '=%s and active=%s', (sequence_id, True,))
res = cr.dictfetchone()
if res:
for line in self.browse(cr, uid, res['id'],
context=context).fiscal_ids:
if line.fiscalyear_id.id == context.get('fiscalyear_id', False):
return super(ir_sequence, self).get_id(cr, uid,
line.sequence_id.id,
test="id",
context=context)
return super(ir_sequence, self).get_id(cr, uid, sequence_id, test,
context=context)
def _next(self, cr, uid, seq_ids, context=None):
for seq in self.browse(cr, uid, seq_ids, context):
for line in seq.fiscal_ids:
if line.fiscalyear_id.id == context.get('fiscalyear_id'):
return super(ir_sequence, self)._next(cr, uid, [line.sequence_id.id], context)
return super(ir_sequence, self)._next(cr, uid, seq_ids, context)
ir_sequence()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -28,12 +28,17 @@ class account_fiscal_position(osv.osv):
_description = 'Fiscal Position'
_columns = {
'name': fields.char('Fiscal Position', size=64, required=True),
'active': fields.boolean('Active', help="By unchecking the active field, you may hide a fiscal position without deleting it."),
'company_id': fields.many2one('res.company', 'Company'),
'account_ids': fields.one2many('account.fiscal.position.account', 'position_id', 'Account Mapping'),
'tax_ids': fields.one2many('account.fiscal.position.tax', 'position_id', 'Tax Mapping'),
'note': fields.text('Notes', translate=True),
}
_defaults = {
'active': True,
}
def map_tax(self, cr, uid, fposition_id, taxes, context=None):
if not taxes:
return []

View File

@ -8,8 +8,11 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Fiscal Position">
<field name="name" select="1"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="active" groups="base.group_extended"/>
</group>
<separator string="Mapping" colspan="4"/>
<newline/>
<field name="tax_ids" colspan="2" widget="one2many_list" nolabel="1">

View File

@ -28,15 +28,15 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Analytic Account">
<group col="8" colspan="4">
<group>
<filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
<filter icon="terp-camera_test" string="Current" domain="[('state','=','open')]" help="Current Accounts"/>
<separator orientation="vertical"/>
<filter icon="terp-go-today" string="Overdue Account" domain="[('date','&lt;',time.strftime('%%Y-%%m-%%d'))]" help="Analytic Accounts with a past deadline."/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="partner_id" select="1"/>
<field name="name"/>
<field name="code"/>
<field name="partner_id"/>
<field name="user_id" widget="selection"/>
</group>
<newline/>
@ -45,7 +45,7 @@
<filter string="Associated Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Parent" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
<filter string="State" icon="terp-folder-green" domain="[]" context="{'group_by':'state'}"/>
<filter string="State" icon="terp-folder-green" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
</group>
</search>
</field>
@ -65,6 +65,7 @@
<field name="debit"/>
<field name="credit"/>
<field name="balance"/>
<field name="state" invisible="1"/>
<field name="currency_id" groups="base.group_extended"/>
<field name="date" invisible="1"/>
<field name="user_id" invisible="1"/>
@ -204,7 +205,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Analytic Lines">
<group col='6' colspan='4'>
<group>
<filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" icon="terp-camera_test" help="Analytic Journal Items related to a sale journal."/>
<filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" icon="terp-purchase" help="Analytic Journal Items related to a purchase journal."/>
<filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]" icon="terp-folder-orange"/>
@ -430,13 +431,13 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Analytic Entries Stats">
<group col="8" colspan="4">
<group>
<filter icon="terp-go-year" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Sale journal in this year"/>
<filter icon="terp-go-month" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Sale journal in this month"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="account_id" select="1"/>
<field name="name"/>
<field name="month"/>
<field name="account_id"/>
</group>
</search>
</field>

View File

@ -29,7 +29,7 @@ class account_analytic_cost_ledger_journal_report(osv.osv_memory):
_columns = {
'date1': fields.date('Start of period', required=True),
'date2': fields.date('End of period', required=True),
'journal': fields.many2many('account.analytic.journal', 'ledger_journal_rel', 'ledger_id', 'Journal_id', 'Journals'),
'journal': fields.many2many('account.analytic.journal', 'ledger_journal_rel', 'ledger_id', 'journal_id', 'Journals'),
}
_defaults = {

View File

@ -33,7 +33,6 @@ import account_print_overdue
import account_aged_partner_balance
#import tax_report
import account_tax_report
import account_tax_code
import account_balance_landscape
import account_invoice_report
import account_report
@ -42,6 +41,7 @@ import account_analytic_entries_report
import account_balance_sheet
import account_profit_loss
import account_treasury_report
import account_financial_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -196,25 +196,25 @@
<para style="Total">Account Total</para>
</td>
<td>
<para style="Total_right">[[ formatLang(get_direction('6')) ]] [[ company.currency_id.symbol ]]</para>
<para style="Total_right">[[ formatLang(get_direction('6'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="Total_right">[[ formatLang(get_for_period('4')) ]] [[ company.currency_id.symbol ]]</para>
<para style="Total_right">[[ formatLang(get_for_period('4'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="Total_right">[[ formatLang(get_for_period('3')) ]] [[ company.currency_id.symbol ]]</para>
<para style="Total_right">[[ formatLang(get_for_period('3'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="Total_right">[[ formatLang(get_for_period('2')) ]] [[ company.currency_id.symbol ]]</para>
<para style="Total_right">[[ formatLang(get_for_period('2'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="Total_right">[[ formatLang(get_for_period('1')) ]] [[ company.currency_id.symbol ]]</para>
<para style="Total_right">[[ formatLang(get_for_period('1'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="Total_right">[[ formatLang(get_for_period('0')) ]] [[ company.currency_id.symbol ]]</para>
<para style="Total_right">[[ formatLang(get_for_period('0'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="Total_right">[[ formatLang(get_total('5')) ]] [[ company.currency_id.symbol ]]</para>
<para style="Total_right">[[ formatLang(get_total('5'), currency_obj=company.currency_id) ]]</para>
</td>
</tr>
@ -224,25 +224,25 @@
<para style="P2_content">[[ partner['name'] ]]</para>
</td>
<td>
<para style="content">[[ formatLang(partner['direction']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(partner['direction'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(partner['4'])]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(partner['4'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(partner['3'])]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(partner['3'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(partner['2']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(partner['2'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(partner['1']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(partner['1'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(partner['0']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(partner['0'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(partner['total']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(partner['total'], currency_obj=company.currency_id) ]]</para>
</td>
</tr>
<tr>
@ -251,25 +251,25 @@
<para style="P2_content">[[ not_partner['name'] ]]</para>
</td>
<td>
<para style="content">[[ formatLang(not_partner['direction']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(not_partner['direction'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(not_partner['4'])]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(not_partner['4'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(not_partner['3'])]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(not_partner['3'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(not_partner['2']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(not_partner['2'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(not_partner['1']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(not_partner['1'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(not_partner['0']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(not_partner['0'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="content">[[ formatLang(not_partner['total']) ]] [[ company.currency_id.symbol ]]</para>
<para style="content">[[ formatLang(not_partner['total'], currency_obj=company.currency_id) ]]</para>
</td>
</tr>
</blockTable>

View File

@ -34,7 +34,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Analytic Entries Analysis">
<group col="10" colspan="12">
<group>
<filter icon="terp-go-year" string=" 365 Days "
domain="[('day','&lt;=', time.strftime('%%Y-%%m-%%d')),('day','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Analytic Entries of last 365 days"/>
@ -44,7 +44,6 @@
help="Analytic Entries of last 30 days"/>
<filter icon="terp-go-week"
string=" 7 Days "
separator="1"
domain="[('day','&lt;=', time.strftime('%%Y-%%m-%%d')), ('day','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Analytic Entries during last 7 days"/>
<separator orientation="vertical"/>

View File

@ -220,7 +220,7 @@
<para style="terp_tblheader_General_Centre">Display Account</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Filter By <font>[[ get_filter(data)!='No Filter' and get_filter(data) ]]</font> </para>
<para style="terp_tblheader_General_Centre">Filter By <font>[[ data['form']['filter']!='filter_no' and get_filter(data) ]]</font> </para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Target Moves</para>
@ -234,8 +234,8 @@
<para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para>
</td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td> <para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
<blockTable colWidths="60.0,60.0" style="Table5">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
<td> <para style="terp_default_Centre_8">[[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]] </para>
<blockTable colWidths="60.0,60.0" style="Table5">[[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="terp_tblheader_General_Centre">Start Date</para>
@ -253,7 +253,7 @@
</td>
</tr>
</blockTable>
<blockTable colWidths="60.0,60.0" style="Table5">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
<blockTable colWidths="60.0,60.0" style="Table5">[[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="terp_tblheader_General_Centre">Start Period</para>
@ -296,7 +296,7 @@
<td><para style="P14"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font color="white">[[ '..'*(a['level']-1) ]]</font><font>[[ a['name'] ]]</font> </para></td>
<td><para style="P3"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]]</font></para></td>
<td><para style="P3"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font')]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]]</font> </para></td>
<td><para style="P3"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]]</font> </para></td>
<td><para style="P3"><font>[[ (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance'], currency_obj=company.currency_id) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['balance'], currency = company.currency_id) ]]</font> </para></td>
</tr>
</blockTable>
<para style="P11">

Some files were not shown because too many files have changed in this diff Show More