@@ -25,6 +25,7 @@ import project
|
||||
import partner
|
||||
import invoice
|
||||
import account_bank_statement
|
||||
import account_cash_statement
|
||||
import account_move_line
|
||||
import account_analytic_line
|
||||
import wizard
|
||||
@@ -34,4 +35,3 @@ import sequence
|
||||
import company
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -18,12 +18,9 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
"name" : "Accounting and Financial Management",
|
||||
"version" : "1.1",
|
||||
"depends" : ["product", "analytic", "process"],
|
||||
"author" : "Tiny",
|
||||
"category": 'Generic Modules/Accounting',
|
||||
"description": """Financial and accounting module that covers:
|
||||
@@ -34,11 +31,17 @@
|
||||
Budgets
|
||||
Customer and Supplier Invoices
|
||||
Bank statements
|
||||
Reconciliation process by partner
|
||||
Creates a dashboards for accountants that includes:
|
||||
* List of uninvoiced quotations
|
||||
* Graph of aged receivables
|
||||
* Graph of aged incomes
|
||||
|
||||
The processes like maintaining of general ledger is done through the defined financial Journals (entry move line or
|
||||
grouping is maintained through journal) for a particular financial year and for preparation of vouchers there is a
|
||||
module named account_voucherss
|
||||
module named account_vouchers
|
||||
""",
|
||||
"depends" : ["product", "analytic", "process","board"],
|
||||
'website': 'http://www.openerp.com',
|
||||
'init_xml': [],
|
||||
'update_xml': [
|
||||
@@ -81,6 +84,7 @@ module named account_voucherss
|
||||
'wizard/account_compare_account_balance_report_view.xml',
|
||||
'wizard/account_third_party_ledger.xml',
|
||||
'wizard/account_reconcile_view.xml',
|
||||
'wizard/account_reconcile_partner_process_view.xml',
|
||||
'wizard/account_automatic_reconcile_view.xml',
|
||||
'project/wizard/project_account_analytic_line_view.xml',
|
||||
'account_end_fy.xml',
|
||||
@@ -109,24 +113,33 @@ module named account_voucherss
|
||||
'report/account_invoice_report_view.xml',
|
||||
'report/account_entries_report_view.xml',
|
||||
'report/account_report_view.xml',
|
||||
'report/account_analytic_report_view.xml',
|
||||
'report/account_account_report_view.xml',
|
||||
'report/account_analytic_entries_report_view.xml'
|
||||
'report/account_analytic_entries_report_view.xml',
|
||||
'board_account_view.xml',
|
||||
"wizard/account_pl_report_view.xml",
|
||||
"wizard/account_bs_report_view.xml"
|
||||
],
|
||||
'demo_xml': [
|
||||
#'demo/price_accuracy00.yml',
|
||||
'account_demo.xml',
|
||||
'project/project_demo.xml',
|
||||
'project/analytic_account_demo.xml',
|
||||
'demo/account_minimal.xml',
|
||||
'account_unit_test.xml',
|
||||
'board_account_demo.xml',
|
||||
],
|
||||
'test': [
|
||||
'test/account_customer_invoice.yml',
|
||||
'test/account_supplier_invoice.yml',
|
||||
'test/account_change_currency.yml',
|
||||
'test/chart_of_account.yml',
|
||||
'test/account_period_close.yml',
|
||||
'test/account_fiscalyear_close_state.yml',
|
||||
'test/account_invoice_state.yml',
|
||||
'test/account_use_model.yml',
|
||||
'test/account_validate_account_move.yml',
|
||||
# 'test/account_fiscalyear_close.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0080331923549',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
+268
-207
@@ -18,21 +18,38 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import netsvc
|
||||
|
||||
from osv import fields, osv
|
||||
import decimal_precision as dp
|
||||
|
||||
from tools.misc import currency
|
||||
from tools.translate import _
|
||||
import pooler
|
||||
from datetime import datetime
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from operator import itemgetter
|
||||
|
||||
import netsvc
|
||||
import pooler
|
||||
from osv import fields, osv
|
||||
import decimal_precision as dp
|
||||
from tools.misc import currency
|
||||
from tools.translate import _
|
||||
from tools import config
|
||||
|
||||
def check_cycle(self, cr, uid, ids):
|
||||
""" climbs the ``self._table.parent_id`` chains for 100 levels or
|
||||
until it can't find any more parent(s)
|
||||
|
||||
Returns true if it runs out of parents (no cycle), false if
|
||||
it can recurse 100 times without ending all chains
|
||||
"""
|
||||
level = 100
|
||||
while len(ids):
|
||||
cr.execute('SELECT DISTINCT parent_id '\
|
||||
'FROM '+self._table+' '\
|
||||
'WHERE id IN %s '\
|
||||
'AND parent_id IS NOT NULL',(tuple(ids),))
|
||||
ids = map(itemgetter(0), cr.fetchall())
|
||||
if not level:
|
||||
return False
|
||||
level -= 1
|
||||
return True
|
||||
|
||||
class account_payment_term(osv.osv):
|
||||
_name = "account.payment.term"
|
||||
_description = "Payment Term"
|
||||
@@ -62,9 +79,9 @@ class account_payment_term(osv.osv):
|
||||
elif line.value == 'balance':
|
||||
amt = round(amount, prec)
|
||||
if amt:
|
||||
next_date = datetime.strptime(date_ref, '%y-%m-%d') + relativedelta(days=line.days)
|
||||
next_date = datetime.strptime(date_ref, '%Y-%m-%d') + relativedelta(days=line.days)
|
||||
if line.days2 < 0:
|
||||
next_date += relativedelta(day=line.days2)
|
||||
next_date += relativedelta(day=31)
|
||||
if line.days2 > 0:
|
||||
next_date += relativedelta(day=line.days2, months=1)
|
||||
result.append( (next_date.strftime('%Y-%m-%d'), amt) )
|
||||
@@ -119,7 +136,6 @@ class account_account_type(osv.osv):
|
||||
'name': fields.char('Acc. Type Name', size=64, required=True, translate=True),
|
||||
'code': fields.char('Code', size=32, required=True),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of account types."),
|
||||
'partner_account': fields.boolean('Partner account'),
|
||||
'close_method': fields.selection([('none', 'None'), ('balance', 'Balance'), ('detail', 'Detail'), ('unreconciled', 'Unreconciled')], 'Deferral Method', required=True),
|
||||
'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.'),
|
||||
'report_type':fields.selection([
|
||||
@@ -170,6 +186,7 @@ class account_account(osv.osv):
|
||||
_name = "account.account"
|
||||
_description = "Account"
|
||||
_parent_store = True
|
||||
logger = netsvc.Logger()
|
||||
|
||||
def _get_children_and_consol(self, cr, uid, ids, context={}):
|
||||
ids2=[]
|
||||
@@ -229,65 +246,87 @@ class account_account(osv.osv):
|
||||
ids3 = self._get_children_and_consol(cr, uid, ids3, context)
|
||||
return ids2 + ids3
|
||||
|
||||
def __compute(self, cr, uid, ids, field_names, arg, context={}, query=''):
|
||||
#compute the balance/debit/credit accordingly to the value of field_name for the given account ids
|
||||
mapping = {
|
||||
'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 "
|
||||
}
|
||||
#get all the necessary accounts
|
||||
ids2 = self._get_children_and_consol(cr, uid, ids, context)
|
||||
#compute for each account the balance/debit/credit from the move lines
|
||||
accounts = {}
|
||||
if ids2:
|
||||
aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
|
||||
def __compute(self, cr, uid, ids, field_names, arg=None, context=None,
|
||||
query='', query_params=()):
|
||||
""" compute the balance, debit and/or credit for the provided
|
||||
account ids
|
||||
Arguments:
|
||||
`ids`: account ids
|
||||
`field_names`: the fields to compute (a list of any of
|
||||
'balance', 'debit' and 'credit')
|
||||
`arg`: unused fields.function stuff
|
||||
`query`: additional query filter (as a string)
|
||||
`query_params`: parameters for the provided query string
|
||||
(__compute will handle their escaping) as a
|
||||
tuple
|
||||
"""
|
||||
mapping = {
|
||||
'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"
|
||||
}
|
||||
#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 = {}
|
||||
if children_and_consolidated:
|
||||
aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
|
||||
|
||||
wheres = [""]
|
||||
if query.strip():
|
||||
wheres.append(query.strip())
|
||||
if aml_query.strip():
|
||||
wheres.append(aml_query.strip())
|
||||
query = " AND ".join(wheres)
|
||||
wheres = [""]
|
||||
if query.strip():
|
||||
wheres.append(query.strip())
|
||||
if aml_query.strip():
|
||||
wheres.append(aml_query.strip())
|
||||
filters = " AND ".join(wheres)
|
||||
self.logger.notifyChannel('addons.'+self._name, netsvc.LOG_DEBUG,
|
||||
'Filters: %s'%filters)
|
||||
# IN might not work ideally in case there are too many
|
||||
# children_and_consolidated, in that case join on a
|
||||
# values() e.g.:
|
||||
# SELECT l.account_id as id FROM account_move_line l
|
||||
# INNER JOIN (VALUES (id1), (id2), (id3), ...) AS tmp (id)
|
||||
# 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)) +
|
||||
" FROM account_move_line l" \
|
||||
" WHERE l.account_id IN %s " \
|
||||
+ filters +
|
||||
" GROUP BY l.account_id")
|
||||
params = (tuple(children_and_consolidated),) + query_params
|
||||
cr.execute(request, params)
|
||||
self.logger.notifyChannel('addons.'+self._name, netsvc.LOG_DEBUG,
|
||||
'Status: %s'%cr.statusmessage)
|
||||
|
||||
cr.execute("SELECT l.account_id as id, " +\
|
||||
' , '.join(map(lambda x: mapping[x], field_names)) +
|
||||
"FROM " \
|
||||
"account_move_line l " \
|
||||
"WHERE " \
|
||||
"l.account_id =ANY(%s) " \
|
||||
+ query +
|
||||
" GROUP BY l.account_id",(ids2,))
|
||||
for res in cr.dictfetchall():
|
||||
accounts[res['id']] = res
|
||||
|
||||
for res in cr.dictfetchall():
|
||||
accounts[res['id']] = res
|
||||
|
||||
|
||||
# consolidate accounts with direct children
|
||||
ids2.reverse()
|
||||
brs = list(self.browse(cr, uid, ids2, context=context))
|
||||
sums = {}
|
||||
while brs:
|
||||
current = brs[0]
|
||||
can_compute = True
|
||||
for child in current.child_id:
|
||||
if child.id not in sums:
|
||||
can_compute = False
|
||||
try:
|
||||
brs.insert(0, brs.pop(brs.index(child)))
|
||||
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)
|
||||
if current.child_id:
|
||||
sums[current.id][fn] += sum(sums[child.id][fn] for child in current.child_id)
|
||||
res = {}
|
||||
null_result = dict((fn, 0.0) for fn in field_names)
|
||||
for id in ids:
|
||||
res[id] = sums.get(id, null_result)
|
||||
return res
|
||||
# consolidate accounts with direct children
|
||||
children_and_consolidated.reverse()
|
||||
brs = list(self.browse(cr, uid, children_and_consolidated, context=context))
|
||||
sums = {}
|
||||
while brs:
|
||||
current = brs[0]
|
||||
can_compute = True
|
||||
for child in current.child_id:
|
||||
if child.id not in sums:
|
||||
can_compute = False
|
||||
try:
|
||||
brs.insert(0, brs.pop(brs.index(child)))
|
||||
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)
|
||||
if current.child_id:
|
||||
sums[current.id][fn] += sum(sums[child.id][fn] for child in current.child_id)
|
||||
res = {}
|
||||
null_result = dict((fn, 0.0) for fn in field_names)
|
||||
for id in ids:
|
||||
res[id] = sums.get(id, null_result)
|
||||
return res
|
||||
|
||||
def _get_company_currency(self, cr, uid, ids, field_name, arg, context={}):
|
||||
result = {}
|
||||
@@ -326,11 +365,11 @@ class account_account(osv.osv):
|
||||
'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."),
|
||||
'code': fields.char('Code', size=64, required=True),
|
||||
'type': fields.selection([
|
||||
('view', 'View'),
|
||||
('other', 'Regular'),
|
||||
('receivable', 'Receivable'),
|
||||
('payable', 'Payable'),
|
||||
('view', 'View'),
|
||||
('consolidation', 'Consolidation'),
|
||||
('other', 'Others'),
|
||||
('closed', 'Closed'),
|
||||
], 'Internal Type', required=True, help="This type is used to differentiate types with "\
|
||||
"special effects in Open ERP: view can not have entries, consolidation are accounts that "\
|
||||
@@ -392,8 +431,10 @@ class account_account(osv.osv):
|
||||
if (obj_self in obj_self.child_consol_ids) or (p_id and (p_id is obj_self.id)):
|
||||
return False
|
||||
while(ids):
|
||||
cr.execute('select distinct child_id from account_account_consol_rel where parent_id =ANY(%s)',(ids,))
|
||||
child_ids = filter(None, map(lambda x: x[0], cr.fetchall()))
|
||||
cr.execute('SELECT DISTINCT child_id '\
|
||||
'FROM account_account_consol_rel '\
|
||||
'WHERE parent_id IN %s', (tuple(ids),))
|
||||
child_ids = map(itemgetter(0), cr.fetchall())
|
||||
c_ids = child_ids
|
||||
if (p_id and (p_id in c_ids)) or (obj_self.id in c_ids):
|
||||
return False
|
||||
@@ -509,8 +550,13 @@ class account_account(osv.osv):
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
if 'company_id' in vals:
|
||||
move_lines = self.pool.get('account.move.line').search(cr, uid, [('account_id', 'in', ids)])
|
||||
if move_lines:
|
||||
raise osv.except_osv(_('Warning !'), _('You cannot modify Company of account as its related record exist in Entry Lines'))
|
||||
if 'active' in vals and not vals['active']:
|
||||
self._check_moves(cr, uid, ids, "write", context)
|
||||
self._check_moves(cr, uid, ids, "write", context=context)
|
||||
if 'type' in vals.keys():
|
||||
self._check_allow_type_change(cr, uid, ids, vals['type'], context=context)
|
||||
return super(account_account, self).write(cr, uid, ids, vals, context=context)
|
||||
@@ -537,6 +583,9 @@ class account_journal_column(osv.osv):
|
||||
result = []
|
||||
cols = self.pool.get('account.move.line')._columns
|
||||
for col in cols:
|
||||
if col in ('period_id', 'journal_id'):
|
||||
continue
|
||||
|
||||
result.append( (col, cols[col].string) )
|
||||
result.sort()
|
||||
return result
|
||||
@@ -557,42 +606,46 @@ class account_journal(osv.osv):
|
||||
_name = "account.journal"
|
||||
_description = "Journal"
|
||||
_columns = {
|
||||
'name': fields.char('Journal Name', size=64, required=True, translate=True),
|
||||
'code': fields.char('Code', size=16),
|
||||
'type': fields.selection([('sale', 'Sale'), ('purchase', 'Purchase'), ('expense', 'Expense'), ('cash', 'Cash'), ('bank', 'Bank'), ('general', 'General'), ('situation', 'Situation')], 'Type', size=32, required=True,
|
||||
'name': fields.char('Journal Name', size=64, required=True, translate=True,help="Name of the journal"),
|
||||
'code': fields.char('Code', size=16,required=True,help="Code of the journal"),
|
||||
'type': fields.selection([('sale', 'Sale'),('sale_refund','Sale Refund'), ('purchase', 'Purchase'), ('purchase_refund','Purchase Refund'),('expense', 'Expense'), ('cash', 'Cash'), ('bank', 'Bank'), ('general', 'General'), ('situation', 'Situation')], 'Type', size=32, required=True,
|
||||
help="Select 'Sale' for Sale journal to be used at the time of making invoice."\
|
||||
" Select 'Purchase' for Purchase Journal to be used at the time of approving purchase order."\
|
||||
" Select 'Cash' to be used at the time of making payment."\
|
||||
" Select 'General' to be used at the time of stock input/output."\
|
||||
" Select 'Situation' to be used at the time of making vouchers."),
|
||||
'refund_journal': fields.boolean('Refund Journal', help='Fill this if the journal is to be used for refunds of invoices.'),
|
||||
|
||||
'type_control_ids': fields.many2many('account.account.type', 'account_journal_type_rel', 'journal_id','type_id', 'Type Controls', domain=[('code','<>','view'), ('code', '<>', 'closed')]),
|
||||
'account_control_ids': fields.many2many('account.account', 'account_account_type_rel', 'journal_id','account_id', 'Account', domain=[('type','<>','view'), ('type', '<>', 'closed')]),
|
||||
|
||||
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the journal without removing it."),
|
||||
'view_id': fields.many2one('account.journal.view', 'View', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tells Open ERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."),
|
||||
'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account', domain="[('type','!=','view')]"),
|
||||
'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account', domain="[('type','!=','view')]"),
|
||||
'view_id': fields.many2one('account.journal.view', 'Display Mode', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tells Open ERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."),
|
||||
'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account', domain="[('type','!=','view')]", help="It acts as a default account for credit amount"),
|
||||
'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account', domain="[('type','!=','view')]", help="It acts as a default account for debit amount"),
|
||||
'centralisation': fields.boolean('Centralised counterpart', help="Check this box to determine that each entry of this journal won't create a new counterpart but will share the same counterpart. This is used in fiscal year closing."),
|
||||
'update_posted': fields.boolean('Allow Cancelling Entries'),
|
||||
'update_posted': fields.boolean('Allow Cancelling Entries', help="Check this box if you want to allow the cancellation the entries related to this journal or of the invoice related to this journal"),
|
||||
'group_invoice_lines': fields.boolean('Group invoice lines', help="If this box is checked, the system will try to group the accounting lines when generating them from invoices."),
|
||||
'sequence_id': fields.many2one('ir.sequence', 'Entry Sequence', help="The sequence gives the display order for a list of journals", required=True),
|
||||
'user_id': fields.many2one('res.users', 'User', help="The user responsible for this journal"),
|
||||
'groups_id': fields.many2many('res.groups', 'account_journal_group_rel', 'journal_id', 'group_id', 'Groups'),
|
||||
'currency': fields.many2one('res.currency', 'Currency', help='The currency used to enter statement'),
|
||||
'entry_posted': fields.boolean('Skip \'Draft\' State for Created Entries', help='Check this box if you don\'t want new account moves to pass through the \'draft\' state and instead goes directly to the \'posted state\' without any manual validation.'),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True,select=1),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True, select=1, help="Company related to this journal"),
|
||||
'invoice_sequence_id': fields.many2one('ir.sequence', 'Invoice Sequence', \
|
||||
help="The sequence used for invoice numbers in this journal."),
|
||||
'allow_date':fields.boolean('Check Date not in the Period', help= 'If set to True then do not accept the entry if the entry date is not into the period dates'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'active': lambda *a: 1,
|
||||
'user_id': lambda self,cr,uid,context: uid,
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
||||
}
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
obj=[]
|
||||
if 'company_id' in vals:
|
||||
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'))
|
||||
return super(account_journal, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
def create(self, cr, uid, vals, context={}):
|
||||
journal_id = super(account_journal, self).create(cr, uid, vals, context)
|
||||
# journal_name = self.browse(cr, uid, [journal_id])[0].code
|
||||
@@ -606,11 +659,9 @@ class account_journal(osv.osv):
|
||||
# })
|
||||
return journal_id
|
||||
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context={}, limit=100):
|
||||
if not args:
|
||||
args = []
|
||||
if context is None:
|
||||
context = {}
|
||||
ids = []
|
||||
if name:
|
||||
ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit, context=context)
|
||||
@@ -618,6 +669,15 @@ class account_journal(osv.osv):
|
||||
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
|
||||
return self.name_get(cr, user, ids, context=context)
|
||||
|
||||
def onchange_type(self, cr, uid, ids, type):
|
||||
res={}
|
||||
for line in self.browse(cr, uid, ids):
|
||||
if type == 'situation':
|
||||
res= {'value':{'centralisation': True}}
|
||||
else:
|
||||
res= {'value':{'centralisation': False}}
|
||||
return res
|
||||
|
||||
account_journal()
|
||||
|
||||
class account_fiscalyear(osv.osv):
|
||||
@@ -626,8 +686,7 @@ class account_fiscalyear(osv.osv):
|
||||
_columns = {
|
||||
'name': fields.char('Fiscal Year', size=64, required=True),
|
||||
'code': fields.char('Code', size=6, required=True),
|
||||
'company_id': fields.many2one('res.company', 'Company',
|
||||
help="Keep empty if the fiscal year belongs to several companies.", required=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'date_start': fields.date('Start Date', required=True),
|
||||
'date_stop': fields.date('End Date', required=True),
|
||||
'period_ids': fields.one2many('account.period', 'fiscalyear_id', 'Periods'),
|
||||
@@ -711,7 +770,7 @@ class account_period(osv.osv):
|
||||
'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done':[('readonly',True)]}, select=True),
|
||||
'state': fields.selection([('draft','Draft'), ('done','Done')], 'State', readonly=True,
|
||||
help='When monthly periods are created. The state is \'Draft\'. At the end of monthly period it is in \'Done\' state.'),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True)
|
||||
'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company'),
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
@@ -772,7 +831,7 @@ class account_period(osv.osv):
|
||||
cr.execute('update account_period set state=%s where id=%s', (mode, id))
|
||||
return True
|
||||
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
|
||||
def name_search(self, cr, user, name, args=None, operator='ilike', context={}, limit=80):
|
||||
if args is None:
|
||||
args = []
|
||||
if context is None:
|
||||
@@ -784,6 +843,14 @@ class account_period(osv.osv):
|
||||
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
|
||||
return self.name_get(cr, user, ids, context=context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context={}):
|
||||
obj=[]
|
||||
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'))
|
||||
return super(account_period, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
account_period()
|
||||
|
||||
class account_journal_period(osv.osv):
|
||||
@@ -809,7 +876,7 @@ class account_journal_period(osv.osv):
|
||||
'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'State', required=True, readonly=True,
|
||||
help='When journal period is created. The state is \'Draft\'. If a report is printed it comes to \'Printed\' state. When all transactions are done, it comes in \'Done\' state.'),
|
||||
'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', string='Fiscal Year', type='many2one', relation='account.fiscalyear'),
|
||||
'company_id' : fields.many2one('res.company', 'Company')
|
||||
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company')
|
||||
}
|
||||
|
||||
def _check(self, cr, uid, ids, context={}):
|
||||
@@ -883,7 +950,10 @@ class account_move(osv.osv):
|
||||
|
||||
def _amount_compute(self, cr, uid, ids, name, args, context, where =''):
|
||||
if not ids: return {}
|
||||
cr.execute('select move_id,sum(debit) from account_move_line where move_id =ANY(%s) group by move_id',(ids,))
|
||||
cr.execute( 'SELECT move_id, SUM(debit) '\
|
||||
'FROM account_move_line '\
|
||||
'WHERE move_id IN %s '\
|
||||
'GROUP BY move_id', (tuple(ids),))
|
||||
result = dict(cr.fetchall())
|
||||
for id in ids:
|
||||
result.setdefault(id, 0.0)
|
||||
@@ -982,7 +1052,10 @@ class account_move(osv.osv):
|
||||
if new_name:
|
||||
self.write(cr, uid, [move.id], {'name':new_name})
|
||||
|
||||
cr.execute('update account_move set state=%s where id =ANY(%s) ',('posted',ids,))
|
||||
cr.execute('UPDATE account_move '\
|
||||
'SET state=%s '\
|
||||
'WHERE id IN %s',
|
||||
('posted', tuple(ids),))
|
||||
else:
|
||||
raise osv.except_osv(_('Integrity Error !'), _('You can not validate a non-balanced entry !\nMake sure you have configured Payment Term properly !\nIt should contain atleast one Payment Term Line with type "Balance" !'))
|
||||
return True
|
||||
@@ -995,7 +1068,9 @@ class account_move(osv.osv):
|
||||
if not line.journal_id.update_posted:
|
||||
raise osv.except_osv(_('Error !'), _('You can not modify a posted entry of this journal !\nYou should set the journal to allow cancelling entries if you want to do that.'))
|
||||
if len(ids):
|
||||
cr.execute('update account_move set state=%s where id =ANY(%s)',('draft',ids,))
|
||||
cr.execute('UPDATE account_move '\
|
||||
'SET state=%s '\
|
||||
'WHERE id IN %s', ('draft', tuple(ids),))
|
||||
return True
|
||||
|
||||
def write(self, cr, uid, ids, vals, context={}):
|
||||
@@ -1067,6 +1142,7 @@ class account_move(osv.osv):
|
||||
return amount
|
||||
|
||||
def _centralise(self, cr, uid, move, mode, context=None):
|
||||
assert mode in ('debit', 'credit'), 'Invalid Mode' #to prevent sql injection
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
@@ -1114,7 +1190,7 @@ class account_move(osv.osv):
|
||||
else:
|
||||
line_id2 = 0
|
||||
|
||||
cr.execute('select sum('+mode+') from account_move_line where move_id=%s and id<>%s', (move.id, line_id2))
|
||||
cr.execute('SELECT SUM(%s) FROM account_move_line WHERE move_id=%%s AND id!=%%s' % (mode,), (move.id, line_id2))
|
||||
result = cr.fetchone()[0] or 0.0
|
||||
cr.execute('update account_move_line set '+mode2+'=%s where id=%s', (result, line_id))
|
||||
return True
|
||||
@@ -1122,12 +1198,15 @@ class account_move(osv.osv):
|
||||
#
|
||||
# Validate a balanced move. If it is a centralised journal, create a move.
|
||||
#
|
||||
|
||||
def validate(self, cr, uid, ids, context={}):
|
||||
if context and ('__last_update' in context):
|
||||
del context['__last_update']
|
||||
ok = True
|
||||
|
||||
valid_moves = [] #Maintains a list of moves which can be responsible to create analytic entries
|
||||
|
||||
for move in self.browse(cr, uid, ids, context):
|
||||
#unlink analytic lines on move_lines
|
||||
# Unlink old analytic lines on move_lines
|
||||
for obj_line in move.line_id:
|
||||
for obj in obj_line.analytic_lines:
|
||||
self.pool.get('account.analytic.line').unlink(cr,uid,obj.id)
|
||||
@@ -1136,7 +1215,7 @@ class account_move(osv.osv):
|
||||
amount = 0
|
||||
line_ids = []
|
||||
line_draft_ids = []
|
||||
company_id=None
|
||||
company_id = None
|
||||
for line in move.line_id:
|
||||
amount += line.debit - line.credit
|
||||
line_ids.append(line.id)
|
||||
@@ -1152,52 +1231,60 @@ class account_move(osv.osv):
|
||||
if line.account_id.currency_id.id != line.currency_id.id and (line.account_id.currency_id.id != line.account_id.company_id.currency_id.id or line.currency_id):
|
||||
raise osv.except_osv(_('Error'), _("""Couldn't create move with currency different from the secondary currency of the account "%s - %s". Clear the secondary currency field of the account definition if you want to accept all currencies.""" % (line.account_id.code, line.account_id.name)))
|
||||
|
||||
# Check that the move balances, the tolerance for debit/credit must
|
||||
# be smaller than the smallest value according to price accuracy
|
||||
# (hence the +1 below)
|
||||
# Example:
|
||||
# difference == 0.01 is OK iff price_accuracy <= 1!
|
||||
# difference == 0.0001 is OK iff price_accuracy <= 3!
|
||||
if abs(amount) < 10 ** -(int(config['price_accuracy'])+1):
|
||||
if abs(amount) < 10 ** -4:
|
||||
# If the move is balanced
|
||||
# Add to the list of valid moves
|
||||
# (analytic lines will be created later for valid moves)
|
||||
valid_moves.append(move)
|
||||
|
||||
# Check whether the move lines are confirmed
|
||||
|
||||
if not len(line_draft_ids):
|
||||
continue
|
||||
# Update the move lines (set them as valid)
|
||||
|
||||
self.pool.get('account.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)
|
||||
todo = []
|
||||
|
||||
account = {}
|
||||
account2 = {}
|
||||
if journal.type not in ('purchase','sale'):
|
||||
continue
|
||||
|
||||
if journal.type in ('purchase','sale'):
|
||||
for line in move.line_id:
|
||||
code = amount = 0
|
||||
key = (line.account_id.id, line.tax_code_id.id)
|
||||
if key in account2:
|
||||
code = account2[key][0]
|
||||
amount = account2[key][1] * (line.debit + line.credit)
|
||||
elif line.account_id.id in account:
|
||||
code = account[line.account_id.id][0]
|
||||
amount = account[line.account_id.id][1] * (line.debit + line.credit)
|
||||
if (code or amount) and not (line.tax_code_id or line.tax_amount):
|
||||
self.pool.get('account.move.line').write(cr, uid, [line.id], {
|
||||
'tax_code_id': code,
|
||||
'tax_amount': amount
|
||||
}, context, check=False)
|
||||
elif journal.centralisation:
|
||||
# If the move is not balanced, it must be centralised...
|
||||
|
||||
# Add to the list of valid moves
|
||||
# (analytic lines will be created later for valid moves)
|
||||
valid_moves.append(move)
|
||||
|
||||
for line in move.line_id:
|
||||
code = amount = 0
|
||||
key = (line.account_id.id, line.tax_code_id.id)
|
||||
if key in account2:
|
||||
code = account2[key][0]
|
||||
amount = account2[key][1] * (line.debit + line.credit)
|
||||
elif line.account_id.id in account:
|
||||
code = account[line.account_id.id][0]
|
||||
amount = account[line.account_id.id][1] * (line.debit + line.credit)
|
||||
if (code or amount) and not (line.tax_code_id or line.tax_amount):
|
||||
self.pool.get('account.move.line').write(cr, uid, [line.id], {
|
||||
'tax_code_id': code,
|
||||
'tax_amount': amount
|
||||
}, context, check=False)
|
||||
#
|
||||
# Compute VAT
|
||||
# Update the move lines (set them as valid)
|
||||
#
|
||||
continue
|
||||
if journal.centralisation:
|
||||
self._centralise(cr, uid, move, 'debit', context=context)
|
||||
self._centralise(cr, uid, move, 'credit', context=context)
|
||||
self.pool.get('account.move.line').write(cr, uid, line_draft_ids, {
|
||||
'state': 'valid'
|
||||
}, context, check=False)
|
||||
continue
|
||||
else:
|
||||
# We can't validate it (it's unbalanced)
|
||||
# Setting the lines as draft
|
||||
self.pool.get('account.move.line').write(cr, uid, line_ids, {
|
||||
'journal_id': move.journal_id.id,
|
||||
'period_id': move.period_id.id,
|
||||
@@ -1205,13 +1292,12 @@ class account_move(osv.osv):
|
||||
#'tax_amount': False,
|
||||
'state': 'draft'
|
||||
}, context, check=False)
|
||||
ok = False
|
||||
if ok:
|
||||
list_ids = []
|
||||
for tmp in move.line_id:
|
||||
list_ids.append(tmp.id)
|
||||
self.pool.get('account.move.line').create_analytic_lines(cr, uid, list_ids, context)
|
||||
return ok
|
||||
# Create analytic lines for the valid moves
|
||||
for record in valid_moves:
|
||||
self.pool.get('account.move.line').create_analytic_lines(cr, uid, [line.id for line in record.line_id], context)
|
||||
|
||||
return len(valid_moves) > 0
|
||||
|
||||
account_move()
|
||||
|
||||
class account_move_reconcile(osv.osv):
|
||||
@@ -1268,24 +1354,26 @@ class account_tax_code(osv.osv):
|
||||
|
||||
This code is used for some tax declarations.
|
||||
"""
|
||||
def _sum(self, cr, uid, ids, name, args, context, where =''):
|
||||
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)])
|
||||
def _sum(self, cr, uid, ids, name, args, context,where ='', where_params=()):
|
||||
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
|
||||
if context.get('based_on', 'invoices') == 'payments':
|
||||
cr.execute('SELECT line.tax_code_id, sum(line.tax_amount) \
|
||||
FROM account_move_line AS line, \
|
||||
account_move AS move \
|
||||
LEFT JOIN account_invoice invoice ON \
|
||||
(invoice.move_id = move.id) \
|
||||
WHERE line.tax_code_id =ANY(%s) '+where+' \
|
||||
WHERE line.tax_code_id IN %s '+where+' \
|
||||
AND move.id = line.move_id \
|
||||
AND ((invoice.state = \'paid\') \
|
||||
OR (invoice.id IS NULL)) \
|
||||
GROUP BY line.tax_code_id',(ids2,))
|
||||
GROUP BY line.tax_code_id',
|
||||
(parent_ids,)+where_params)
|
||||
else:
|
||||
cr.execute('SELECT line.tax_code_id, sum(line.tax_amount) \
|
||||
FROM account_move_line AS line \
|
||||
WHERE line.tax_code_id =ANY(%s) '+where+' \
|
||||
GROUP BY line.tax_code_id',(ids2,))
|
||||
WHERE line.tax_code_id IN %s '+where+' \
|
||||
GROUP BY line.tax_code_id',
|
||||
(parent_ids,)+where_params)
|
||||
res=dict(cr.fetchall())
|
||||
for record in self.browse(cr, uid, ids, context):
|
||||
def _rec_get(record):
|
||||
@@ -1302,12 +1390,14 @@ class account_tax_code(osv.osv):
|
||||
else:
|
||||
fiscalyear_id = self.pool.get('account.fiscalyear').find(cr, uid, exception=False)
|
||||
where = ''
|
||||
where_params = ()
|
||||
if fiscalyear_id:
|
||||
pids = map(lambda x: str(x.id), self.pool.get('account.fiscalyear').browse(cr, uid, fiscalyear_id).period_ids)
|
||||
if pids:
|
||||
where = ' and period_id in (' + (','.join(pids))+')'
|
||||
where = ' and period_id IN %s'
|
||||
where_params = (tuple(pids),)
|
||||
return self._sum(cr, uid, ids, name, args, context,
|
||||
where=where)
|
||||
where=where, where_params=where_params)
|
||||
|
||||
def _sum_period(self, cr, uid, ids, name, args, context):
|
||||
if 'period_id' in context and context['period_id']:
|
||||
@@ -1318,7 +1408,7 @@ class account_tax_code(osv.osv):
|
||||
return dict.fromkeys(ids, 0.0)
|
||||
period_id = period_id[0]
|
||||
return self._sum(cr, uid, ids, name, args, context,
|
||||
where=' and line.period_id='+str(period_id))
|
||||
where=' and line.period_id=%s', where_params=(period_id,))
|
||||
|
||||
_name = 'account.tax.code'
|
||||
_description = 'Tax Code'
|
||||
@@ -1366,16 +1456,6 @@ class account_tax_code(osv.osv):
|
||||
'sign': lambda *args: 1.0,
|
||||
'notprintable': lambda *a: False,
|
||||
}
|
||||
def _check_recursion(self, cr, uid, ids):
|
||||
level = 100
|
||||
while len(ids):
|
||||
cr.execute('select distinct parent_id from account_tax_code where id =ANY(%s)',(ids,))
|
||||
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
|
||||
if not level:
|
||||
return False
|
||||
level -= 1
|
||||
return True
|
||||
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if default is None:
|
||||
@@ -1384,6 +1464,7 @@ class account_tax_code(osv.osv):
|
||||
default.update({'line_ids': []})
|
||||
return super(account_tax_code, self).copy(cr, uid, id, default, context)
|
||||
|
||||
_check_recursion = check_cycle
|
||||
_constraints = [
|
||||
(_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id'])
|
||||
]
|
||||
@@ -1731,7 +1812,7 @@ class account_model(osv.osv):
|
||||
'ref': fields.char('Reference', size=64),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
|
||||
'lines_id': fields.one2many('account.model.line', 'model_id', 'Model Entries'),
|
||||
'legend' :fields.text('Legend',readonly=True,size=100),
|
||||
'legend' :fields.text('Legend', readonly=True, size=100),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -1741,7 +1822,7 @@ class account_model(osv.osv):
|
||||
move_ids = []
|
||||
for model in self.browse(cr, uid, ids, context):
|
||||
context.update({'date':datas['date']})
|
||||
period_id = self.pool.get('account.period').find(cr, uid, dt=context.get('date',False))
|
||||
period_id = self.pool.get('account.period').find(cr, uid, dt=context.get('date', False))
|
||||
if not period_id:
|
||||
raise osv.except_osv(_('No period found !'), _('Unable to find a valid period !'))
|
||||
period_id = period_id[0]
|
||||
@@ -1943,9 +2024,9 @@ class account_account_template(osv.osv):
|
||||
'reconcile': fields.boolean('Allow Reconciliation', help="Check this option if you want the user to reconcile entries in this account."),
|
||||
'shortcut': fields.char('Shortcut', size=12),
|
||||
'note': fields.text('Note'),
|
||||
'parent_id': fields.many2one('account.account.template','Parent Account Template', ondelete='cascade'),
|
||||
'child_parent_ids':fields.one2many('account.account.template','parent_id','Children'),
|
||||
'tax_ids': fields.many2many('account.tax.template', 'account_account_template_tax_rel','account_id','tax_id', 'Default Taxes'),
|
||||
'parent_id': fields.many2one('account.account.template', 'Parent Account Template', ondelete='cascade'),
|
||||
'child_parent_ids':fields.one2many('account.account.template', 'parent_id', 'Children'),
|
||||
'tax_ids': fields.many2many('account.tax.template', 'account_account_template_tax_rel', 'account_id', 'tax_id', 'Default Taxes'),
|
||||
'nocreate': fields.boolean('Optional create', help="If checked, the new chart of accounts will not contain this by default."),
|
||||
}
|
||||
|
||||
@@ -1955,16 +2036,7 @@ class account_account_template(osv.osv):
|
||||
'nocreate': lambda *a: False,
|
||||
}
|
||||
|
||||
def _check_recursion(self, cr, uid, ids):
|
||||
level = 100
|
||||
while len(ids):
|
||||
cr.execute('select parent_id from account_account_template where id =ANY(%s)',(ids,))
|
||||
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
|
||||
if not level:
|
||||
return False
|
||||
level -= 1
|
||||
return True
|
||||
|
||||
_check_recursion = check_cycle
|
||||
_constraints = [
|
||||
(_check_recursion, 'Error ! You can not create recursive account templates.', ['parent_id'])
|
||||
]
|
||||
@@ -1993,15 +2065,14 @@ class account_add_tmpl_wizard(osv.osv_memory):
|
||||
def _get_def_cparent(self, cr, uid, context):
|
||||
acc_obj=self.pool.get('account.account')
|
||||
tmpl_obj=self.pool.get('account.account.template')
|
||||
#print "Searching for ",context
|
||||
tids=tmpl_obj.read(cr, uid, [context['tmpl_ids']],['parent_id'])
|
||||
tids=tmpl_obj.read(cr, uid, [context['tmpl_ids']], ['parent_id'])
|
||||
if not tids or not tids[0]['parent_id']:
|
||||
return False
|
||||
ptids = tmpl_obj.read(cr, uid, [tids[0]['parent_id'][0]],['code'])
|
||||
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!'))
|
||||
res = acc_obj.search(cr,uid,[('code','=',ptids[0]['code'])])
|
||||
res = acc_obj.search(cr, uid, [('code','=',ptids[0]['code'])])
|
||||
|
||||
return res and res[0] or False
|
||||
|
||||
@@ -2015,9 +2086,9 @@ class account_add_tmpl_wizard(osv.osv_memory):
|
||||
def action_create(self,cr,uid,ids,context=None):
|
||||
acc_obj=self.pool.get('account.account')
|
||||
tmpl_obj=self.pool.get('account.account.template')
|
||||
data= self.read(cr,uid,ids)
|
||||
company_id = acc_obj.read(cr,uid,[data[0]['cparent_id']],['company_id'])[0]['company_id'][0]
|
||||
account_template = tmpl_obj.browse(cr,uid,context['tmpl_ids'])
|
||||
data= self.read(cr, uid, ids)
|
||||
company_id = acc_obj.read(cr, uid, [data[0]['cparent_id']], ['company_id'])[0]['company_id'][0]
|
||||
account_template = tmpl_obj.browse(cr, uid, context['tmpl_ids'])
|
||||
#tax_ids = []
|
||||
#for tax in account_template.tax_ids:
|
||||
# tax_ids.append(tax_template_ref[tax.id])
|
||||
@@ -2035,11 +2106,10 @@ class account_add_tmpl_wizard(osv.osv_memory):
|
||||
# 'tax_ids': [(6,0,tax_ids)], todo!!
|
||||
'company_id': company_id,
|
||||
}
|
||||
# print "Creating:", vals
|
||||
new_account = acc_obj.create(cr,uid,vals)
|
||||
new_account = acc_obj.create(cr, uid, vals)
|
||||
return {'type':'state', 'state': 'end' }
|
||||
|
||||
def action_cancel(self,cr,uid,ids,context=None):
|
||||
def action_cancel(self, cr, uid, ids, context=None):
|
||||
return { 'type': 'state', 'state': 'end' }
|
||||
|
||||
account_add_tmpl_wizard()
|
||||
@@ -2056,7 +2126,7 @@ class account_tax_code_template(osv.osv):
|
||||
'info': fields.text('Description'),
|
||||
'parent_id': fields.many2one('account.tax.code.template', 'Parent Code', select=True),
|
||||
'child_ids': fields.one2many('account.tax.code.template', 'parent_id', 'Child Codes'),
|
||||
'sign': fields.float('Sign for parent', required=True),
|
||||
'sign': fields.float('Sign for parent', required=True, help="Choose 1.00 to add the total to the parent account or -1.00 to subtract it"),
|
||||
'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any VAT related to this Tax Code to appear on invoices"),
|
||||
}
|
||||
|
||||
@@ -2074,16 +2144,7 @@ class account_tax_code_template(osv.osv):
|
||||
return [(x['id'], (x['code'] and x['code'] + ' - ' or '') + x['name']) \
|
||||
for x in reads]
|
||||
|
||||
def _check_recursion(self, cr, uid, ids):
|
||||
level = 100
|
||||
while len(ids):
|
||||
cr.execute('select distinct parent_id from account_tax_code_template where id =ANY(%s)',(ids,))
|
||||
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
|
||||
if not level:
|
||||
return False
|
||||
level -= 1
|
||||
return True
|
||||
|
||||
_check_recursion = check_cycle
|
||||
_constraints = [
|
||||
(_check_recursion, 'Error ! You can not create recursive Tax Codes.', ['parent_id'])
|
||||
]
|
||||
@@ -2097,7 +2158,7 @@ class account_chart_template(osv.osv):
|
||||
|
||||
_columns={
|
||||
'name': fields.char('Name', size=64, required=True),
|
||||
'account_root_id': fields.many2one('account.account.template','Root Account',required=True,domain=[('parent_id','=',False)]),
|
||||
'account_root_id': fields.many2one('account.account.template','Root Account',required=True,domain=[('parent_id','=',False)], help=""),
|
||||
'tax_code_root_id': fields.many2one('account.tax.code.template','Root Tax Code',required=True,domain=[('parent_id','=',False)]),
|
||||
'tax_template_ids': fields.one2many('account.tax.template', 'chart_template_id', 'Tax Template List', help='List of all the taxes that have to be installed by the wizard'),
|
||||
'bank_account_view_id': fields.many2one('account.account.template','Bank Account',required=True),
|
||||
@@ -2246,11 +2307,11 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||
_inherit = 'res.config'
|
||||
|
||||
_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),
|
||||
'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."),
|
||||
'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),
|
||||
'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."),
|
||||
}
|
||||
|
||||
def _get_chart(self, cr, uid, context={}):
|
||||
@@ -2259,14 +2320,14 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||
return ids[0]
|
||||
return False
|
||||
_defaults = {
|
||||
'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr,uid,[uid],c)[0].company_id.id,
|
||||
'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, [uid], c)[0].company_id.id,
|
||||
'chart_template_id': _get_chart,
|
||||
'code_digits': lambda *a:6,
|
||||
'seq_journal': True
|
||||
}
|
||||
|
||||
def execute(self, cr, uid, ids, context=None):
|
||||
obj_multi = self.browse(cr,uid,ids[0])
|
||||
obj_multi = self.browse(cr, uid, ids[0])
|
||||
obj_acc = self.pool.get('account.account')
|
||||
obj_acc_tax = self.pool.get('account.tax')
|
||||
obj_journal = self.pool.get('account.journal')
|
||||
@@ -2298,7 +2359,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||
'company_id': company_id,
|
||||
'sign': tax_code_template.sign,
|
||||
}
|
||||
new_tax_code = self.pool.get('account.tax.code').create(cr,uid,vals)
|
||||
new_tax_code = self.pool.get('account.tax.code').create(cr, uid, vals)
|
||||
#recording the new tax code to do the mapping
|
||||
tax_code_template_ref[tax_code_template.id] = new_tax_code
|
||||
|
||||
@@ -2331,7 +2392,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||
'company_id': company_id,
|
||||
'type_tax_use': tax.type_tax_use
|
||||
}
|
||||
new_tax = obj_acc_tax.create(cr,uid,vals_tax)
|
||||
new_tax = obj_acc_tax.create(cr, uid, vals_tax)
|
||||
#as the accounts have not been created yet, we have to wait before filling these fields
|
||||
todo_dict[new_tax] = {
|
||||
'account_collected_id': tax.account_collected_id and tax.account_collected_id.id or False,
|
||||
@@ -2369,7 +2430,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||
'tax_ids': [(6,0,tax_ids)],
|
||||
'company_id': company_id,
|
||||
}
|
||||
new_account = obj_acc.create(cr,uid,vals)
|
||||
new_account = obj_acc.create(cr, uid, vals)
|
||||
acc_template_ref[account_template.id] = new_account
|
||||
#reactivate the parent_store functionnality on account_account
|
||||
self.pool._init = False
|
||||
@@ -2385,11 +2446,11 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||
# Creating Journals
|
||||
vals_journal={}
|
||||
view_id = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Journal View')])[0]
|
||||
seq_id = obj_sequence.search(cr,uid,[('name','=','Account Journal')])[0]
|
||||
seq_id = obj_sequence.search(cr, uid, [('name','=','Account Journal')])[0]
|
||||
|
||||
if obj_multi.seq_journal:
|
||||
seq_id_sale = obj_sequence.search(cr,uid,[('name','=','Sale Journal')])[0]
|
||||
seq_id_purchase = obj_sequence.search(cr,uid,[('name','=','Purchase Journal')])[0]
|
||||
seq_id_sale = obj_sequence.search(cr, uid, [('name','=','Sale Journal')])[0]
|
||||
seq_id_purchase = obj_sequence.search(cr, uid, [('name','=','Purchase Journal')])[0]
|
||||
else:
|
||||
seq_id_sale = seq_id
|
||||
seq_id_purchase = seq_id
|
||||
@@ -2421,8 +2482,8 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||
obj_journal.create(cr,uid,vals_journal)
|
||||
|
||||
# Bank Journals
|
||||
view_id_cash = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Cash Journal View')])[0]
|
||||
view_id_cur = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Multi-Currency Cash Journal View')])[0]
|
||||
view_id_cash = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Cash Journal View')])[0]
|
||||
view_id_cur = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Multi-Currency Cash Journal View')])[0]
|
||||
ref_acc_bank = obj_multi.chart_template_id.bank_account_view_id
|
||||
|
||||
current_num = 1
|
||||
@@ -2500,7 +2561,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||
#create the property
|
||||
property_obj.create(cr, uid, vals)
|
||||
|
||||
fp_ids = obj_fiscal_position_template.search(cr, uid,[('chart_template_id', '=', obj_multi.chart_template_id.id)])
|
||||
fp_ids = obj_fiscal_position_template.search(cr, uid, [('chart_template_id', '=', obj_multi.chart_template_id.id)])
|
||||
|
||||
if fp_ids:
|
||||
for position in obj_fiscal_position_template.browse(cr, uid, fp_ids):
|
||||
|
||||
@@ -92,9 +92,9 @@ class account_analytic_line(osv.osv):
|
||||
company_id=company_obj._company_default_get(cr, uid, 'account.analytic.line', context)
|
||||
|
||||
# Compute based on pricetype
|
||||
pricetype=self.pool.get('product.price.type').browse(cr,uid,company_obj.browse(cr,uid,company_id).property_valuation_price_type.id)
|
||||
pricetype=self.pool.get('product.price.type').browse(cr, uid, company_obj.browse(cr,uid,company_id).property_valuation_price_type.id)
|
||||
# Take the company currency as the reference one
|
||||
context['currency_id']=company_obj.browse(cr,uid,company_id).currency_id.id
|
||||
context['currency_id']=company_obj.browse(cr, uid, company_id).currency_id.id
|
||||
amount_unit=prod.price_get(pricetype.field, context)[prod.id]
|
||||
amount=amount_unit*unit_amount or 1.0
|
||||
return {'value': {
|
||||
|
||||
@@ -32,7 +32,7 @@ class account_bank_statement(osv.osv):
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
if context is None:
|
||||
context = {}
|
||||
model_data_ids = mod_obj.search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_account_statement_from_invoice')], context=context)
|
||||
model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_statement_from_invoice')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
context.update({'statement_id': ids[0]})
|
||||
return {
|
||||
@@ -45,7 +45,7 @@ class account_bank_statement(osv.osv):
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
'nodestroy': True
|
||||
}
|
||||
}
|
||||
|
||||
def _default_journal_id(self, cr, uid, context={}):
|
||||
if context.get('journal_id', False):
|
||||
@@ -303,6 +303,13 @@ class account_bank_statement(osv.osv):
|
||||
_('Ledger Posting line "%s" is not valid') % line.name)
|
||||
|
||||
if move.reconcile_id and move.reconcile_id.line_ids:
|
||||
## Search if move has already a partial reconciliation
|
||||
previous_partial = False
|
||||
for line_reconcile_move in move.reconcile_id.line_ids:
|
||||
if line_reconcile_move.reconcile_partial_id:
|
||||
previous_partial = True
|
||||
break
|
||||
##
|
||||
torec += map(lambda x: x.id, move.reconcile_id.line_ids)
|
||||
#try:
|
||||
if abs(move.reconcile_amount-move.amount)<0.0001:
|
||||
@@ -312,8 +319,14 @@ class account_bank_statement(osv.osv):
|
||||
for entry in move.reconcile_id.line_new_ids:
|
||||
writeoff_acc_id = entry.account_id.id
|
||||
break
|
||||
|
||||
account_move_line_obj.reconcile(cr, uid, torec, 'statement', writeoff_acc_id=writeoff_acc_id, writeoff_period_id=st.period_id.id, writeoff_journal_id=st.journal_id.id, context=context)
|
||||
## If we have already a partial reconciliation
|
||||
## We need to make a partial reconciliation
|
||||
## To add this amount to previous paid amount
|
||||
if previous_partial:
|
||||
account_move_line_obj.reconcile_partial(cr, uid, torec, 'statement', context)
|
||||
## If it's the first reconciliation, we do a full reconciliation as regular
|
||||
else:
|
||||
account_move_line_obj.reconcile(cr, uid, torec, 'statement', writeoff_acc_id=writeoff_acc_id, writeoff_period_id=st.period_id.id, writeoff_journal_id=st.journal_id.id, context=context)
|
||||
else:
|
||||
account_move_line_obj.reconcile_partial(cr, uid, torec, 'statement', context)
|
||||
#except:
|
||||
@@ -556,9 +569,9 @@ account_bank_statement_reconcile_line()
|
||||
|
||||
class account_bank_statement_line(osv.osv):
|
||||
|
||||
def onchange_partner_id(self, cursor, user, line_id, partner_id, type, currency_id,
|
||||
context={}):
|
||||
def onchange_partner_id(self, cursor, user, line_id, partner_id, type, currency_id, context={}):
|
||||
res = {'value': {}}
|
||||
|
||||
if not partner_id:
|
||||
return res
|
||||
line = self.browse(cursor, user, line_id)
|
||||
@@ -591,6 +604,10 @@ class account_bank_statement_line(osv.osv):
|
||||
balance = res_currency_obj.compute(cursor, user, company_currency_id,
|
||||
currency_id, balance, context=context)
|
||||
res['value']['amount'] = balance
|
||||
|
||||
if context.get('amount', 0) > 0:
|
||||
res['value']['amount'] = context.get('amount')
|
||||
|
||||
return res
|
||||
|
||||
def _reconcile_amount(self, cursor, user, ids, name, args, context=None):
|
||||
|
||||
@@ -0,0 +1,471 @@
|
||||
# encoding: utf-8
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 PC Solutions (<http://pcsol.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import osv, fields
|
||||
import time
|
||||
from mx import DateTime
|
||||
from decimal import Decimal
|
||||
from tools.translate import _
|
||||
|
||||
class account_cashbox_line(osv.osv):
|
||||
|
||||
""" Cash Box Details """
|
||||
|
||||
_name = 'account.cashbox.line'
|
||||
_description = 'CashBox Line'
|
||||
|
||||
def _sub_total(self, cr, uid, ids, name, arg, context=None):
|
||||
|
||||
""" Calculates Sub total
|
||||
@param name: Names of fields.
|
||||
@param arg: User defined arguments
|
||||
@return: Dictionary of values.
|
||||
"""
|
||||
res = {}
|
||||
for obj in self.browse(cr, uid, ids):
|
||||
res[obj.id] = obj.pieces * obj.number
|
||||
return res
|
||||
|
||||
def on_change_sub(self, cr, uid, ids, pieces, number,*a):
|
||||
|
||||
""" Calculates Sub total on change of number
|
||||
@param pieces: Names of fields.
|
||||
@param number:
|
||||
"""
|
||||
sub=pieces*number
|
||||
return {'value':{'subtotal': sub or 0.0}}
|
||||
|
||||
_columns = {
|
||||
'pieces': fields.float('Values', digits=(16,2)),
|
||||
'number': fields.integer('Number'),
|
||||
'subtotal': fields.function(_sub_total, method=True, string='Sub Total', type='float',digits=(16,2)),
|
||||
'starting_id': fields.many2one('account.bank.statement',ondelete='cascade'),
|
||||
'ending_id': fields.many2one('account.bank.statement',ondelete='cascade'),
|
||||
}
|
||||
account_cashbox_line()
|
||||
|
||||
class account_cash_statement(osv.osv):
|
||||
|
||||
_inherit = 'account.bank.statement'
|
||||
|
||||
def _get_starting_balance(self, cr, uid, ids, name, arg, context=None):
|
||||
|
||||
""" Find starting balance "
|
||||
@param name: Names of fields.
|
||||
@param arg: User defined arguments
|
||||
@return: Dictionary of values.
|
||||
"""
|
||||
res ={}
|
||||
for statement in self.browse(cr, uid, ids):
|
||||
amount_total=0.0
|
||||
for line in statement.starting_details_ids:
|
||||
amount_total+= line.pieces * line.number
|
||||
res[statement.id]=amount_total
|
||||
return res
|
||||
|
||||
def _balance_end_cash(self, cr, uid, ids, name, arg, context=None):
|
||||
""" Find ending balance "
|
||||
@param name: Names of fields.
|
||||
@param arg: User defined arguments
|
||||
@return: Dictionary of values.
|
||||
"""
|
||||
res ={}
|
||||
for statement in self.browse(cr, uid, ids):
|
||||
amount_total=0.0
|
||||
for line in statement.ending_details_ids:
|
||||
amount_total+= line.pieces * line.number
|
||||
res[statement.id]=amount_total
|
||||
return res
|
||||
|
||||
def _get_sum_entry_encoding(self, cr, uid, ids, name, arg, context=None):
|
||||
|
||||
""" Find encoding total of statements "
|
||||
@param name: Names of fields.
|
||||
@param arg: User defined arguments
|
||||
@return: Dictionary of values.
|
||||
"""
|
||||
res2={}
|
||||
for statement in self.browse(cr, uid, ids):
|
||||
encoding_total=0.0
|
||||
for line in statement.line_ids:
|
||||
encoding_total+= line.amount
|
||||
res2[statement.id]=encoding_total
|
||||
return res2
|
||||
|
||||
def _default_journal_id(self, cr, uid, context={}):
|
||||
|
||||
""" To get default journal for the object"
|
||||
@param name: Names of fields.
|
||||
@return: journal
|
||||
"""
|
||||
company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id
|
||||
journal = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', company_id)])
|
||||
if journal:
|
||||
return journal[0]
|
||||
else:
|
||||
return False
|
||||
|
||||
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, ids, context={}):
|
||||
user_pool = self.pool.get('res.users')
|
||||
company_pool = self.pool.get('res.company')
|
||||
user = user_pool.browse(cr, uid, uid, uid)
|
||||
company_id = user.company_id and user.company_id.id
|
||||
if not company_id:
|
||||
company_id = company_pool.search(cr, uid, [])[0]
|
||||
|
||||
return company_id
|
||||
|
||||
_columns = {
|
||||
'company_id':fields.many2one('res.company', 'Company', required=False),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
|
||||
'balance_start': fields.function(_get_starting_balance, store=True, method=True, string='Opening Balance', type='float',digits=(16,2), help="Opening balance based on cashBox"),
|
||||
'balance_end_real': fields.float('Closing Balance', digits=(16,2), states={'confirm':[('readonly', True)]}, help="closing balance entered by the cashbox verifier"),
|
||||
'state': fields.selection(
|
||||
[('draft', 'Draft'),
|
||||
('confirm', 'Confirm'),
|
||||
('open','Open')], 'State', required=True, states={'confirm': [('readonly', True)]}, readonly="1"),
|
||||
'total_entry_encoding':fields.function(_get_sum_entry_encoding, method=True, store=True, string="Cash Transaction", help="Total cash transactions"),
|
||||
'closing_date':fields.datetime("Closed On"),
|
||||
'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance', help="Closing balance based on transactions"),
|
||||
'balance_end_cash': fields.function(_balance_end_cash, method=True, store=True, string='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, readonly=True),
|
||||
'user_id':fields.many2one('res.users', 'Responsible', required=False),
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
'name': lambda *a: '/',
|
||||
'date': lambda *a:time.strftime("%Y-%m-%d %H:%M:%S"),
|
||||
'journal_id': _default_journal_id,
|
||||
'user_id': lambda self, cr, uid, context=None: uid,
|
||||
'company_id': _get_company
|
||||
}
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
company_id = vals and vals.get('company_id',False)
|
||||
if company_id:
|
||||
open_jrnl = self.search(cr, uid, [('company_id', '=', vals['company_id']), ('journal_id', '=', vals['journal_id']), ('state', '=', 'open')])
|
||||
if open_jrnl:
|
||||
raise osv.except_osv('Error', u'Une caisse de type espèce est déjà ouverte')
|
||||
if 'starting_details_ids' in vals:
|
||||
vals['starting_details_ids'] = starting_details_ids = map(list, vals['starting_details_ids'])
|
||||
for i in starting_details_ids:
|
||||
if i and i[0] and i[1]:
|
||||
i[0], i[1] = 0, 0
|
||||
res = super(account_cash_statement, self).create(cr, uid, vals, context=context)
|
||||
return res
|
||||
|
||||
def onchange_journal_id(self, cr, uid, statement_id, journal_id, context={}):
|
||||
""" Changes balance start and starting details if journal_id changes"
|
||||
@param statement_id: Changed statement_id
|
||||
@param journal_id: Changed journal_id
|
||||
@return: Dictionary of changed values
|
||||
"""
|
||||
|
||||
cash_pool = self.pool.get('account.cashbox.line')
|
||||
statement_pool = self.pool.get('account.bank.statement')
|
||||
|
||||
res = {}
|
||||
balance_start = 0.0
|
||||
|
||||
if not journal_id:
|
||||
res.update({
|
||||
'balance_start': balance_start
|
||||
})
|
||||
return res
|
||||
|
||||
|
||||
res = super(account_cash_statement, self).onchange_journal_id(cr, uid, statement_id, journal_id, context)
|
||||
return res
|
||||
|
||||
def _equal_balance(self, cr, uid, ids, statement, context={}):
|
||||
if statement.balance_end != statement.balance_end_cash:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
def _user_allow(self, cr, uid, ids, statement, context={}):
|
||||
return True
|
||||
|
||||
def button_open(self, cr, uid, ids, context=None):
|
||||
|
||||
""" Changes statement state to Running.
|
||||
@return: True
|
||||
"""
|
||||
cash_pool = self.pool.get('account.cashbox.line')
|
||||
statement_pool = self.pool.get('account.bank.statement')
|
||||
|
||||
statement = statement_pool.browse(cr, uid, ids[0])
|
||||
|
||||
if not self._user_allow(cr, uid, ids, statement, context={}):
|
||||
raise osv.except_osv(_('Error !'), _('User %s does not have rights to access %s journal !' % (statement.user_id.name, statement.journal_id.name)))
|
||||
|
||||
number = self.pool.get('ir.sequence').get(cr, uid, statement.journal_id.sequence_id.code)
|
||||
|
||||
if len(statement.starting_details_ids) > 0:
|
||||
sid = []
|
||||
for line in statement.starting_details_ids:
|
||||
sid.append(line.id)
|
||||
|
||||
cash_pool.unlink(cr, uid, sid)
|
||||
|
||||
cr.execute("select id from account_bank_statement where journal_id=%s and user_id=%s and state=%s order by id desc limit 1", (statement.journal_id.id, uid, 'confirm'))
|
||||
rs = cr.fetchone()
|
||||
rs = rs and rs[0] or None
|
||||
if rs:
|
||||
statement = statement_pool.browse(cr, uid, rs)
|
||||
balance_start = statement.balance_end_real or 0.0
|
||||
open_ids = cash_pool.search(cr, uid, [('ending_id','=',statement.id)])
|
||||
for sid in open_ids:
|
||||
default = {
|
||||
'ending_id': False,
|
||||
'starting_id':ids[0]
|
||||
}
|
||||
cash_pool.copy(cr, uid, sid, default)
|
||||
|
||||
vals = {
|
||||
'date':time.strftime("%Y-%m-%d %H:%M:%S"),
|
||||
'state':'open',
|
||||
'name':number
|
||||
}
|
||||
|
||||
self.write(cr, uid, ids, vals)
|
||||
return True
|
||||
|
||||
def button_confirm(self, cr, uid, ids, context={}):
|
||||
|
||||
""" Check the starting and ending detail of statement
|
||||
@return: True
|
||||
"""
|
||||
done = []
|
||||
res_currency_obj = self.pool.get('res.currency')
|
||||
res_users_obj = self.pool.get('res.users')
|
||||
account_move_obj = self.pool.get('account.move')
|
||||
account_move_line_obj = self.pool.get('account.move.line')
|
||||
account_bank_statement_line_obj = self.pool.get('account.bank.statement.line')
|
||||
|
||||
company_currency_id = res_users_obj.browse(cr, uid, uid, context=context).company_id.currency_id.id
|
||||
|
||||
for st in self.browse(cr, uid, ids, context):
|
||||
if not st.state == 'open':
|
||||
continue
|
||||
|
||||
if not self._equal_balance(cr, uid, ids, st, context):
|
||||
raise osv.except_osv(_('Error !'), _('Cash balance is not matching with closing balance !'))
|
||||
|
||||
if not (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001):
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('The statement balance is incorrect !\n') +
|
||||
_('The expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end))
|
||||
if (not st.journal_id.default_credit_account_id) \
|
||||
or (not st.journal_id.default_debit_account_id):
|
||||
raise osv.except_osv(_('Configuration Error !'),
|
||||
_('Please verify that an account is defined in the journal.'))
|
||||
|
||||
for line in st.move_line_ids:
|
||||
if line.state <> 'valid':
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('The account entries lines are not in valid state.'))
|
||||
# for bank.statement.lines
|
||||
# In line we get reconcile_id on bank.ste.rec.
|
||||
# in bank stat.rec we get line_new_ids on bank.stat.rec.line
|
||||
for move in st.line_ids:
|
||||
context.update({'date':move.date})
|
||||
move_id = account_move_obj.create(cr, uid, {
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
'date': move.date,
|
||||
}, context=context)
|
||||
account_bank_statement_line_obj.write(cr, uid, [move.id], {
|
||||
'move_ids': [(4,move_id, False)]
|
||||
})
|
||||
if not move.amount:
|
||||
continue
|
||||
|
||||
torec = []
|
||||
if move.amount >= 0:
|
||||
account_id = st.journal_id.default_credit_account_id.id
|
||||
else:
|
||||
account_id = st.journal_id.default_debit_account_id.id
|
||||
acc_cur = ((move.amount<=0) and st.journal_id.default_debit_account_id) or move.account_id
|
||||
amount = res_currency_obj.compute(cr, uid, st.currency.id,
|
||||
company_currency_id, move.amount, context=context,
|
||||
account=acc_cur)
|
||||
if move.reconcile_id and move.reconcile_id.line_new_ids:
|
||||
for newline in move.reconcile_id.line_new_ids:
|
||||
amount += newline.amount
|
||||
|
||||
val = {
|
||||
'name': move.name,
|
||||
'date': move.date,
|
||||
'ref': move.ref,
|
||||
'move_id': move_id,
|
||||
'partner_id': ((move.partner_id) and move.partner_id.id) or False,
|
||||
'account_id': (move.account_id) and move.account_id.id,
|
||||
'credit': ((amount>0) and amount) or 0.0,
|
||||
'debit': ((amount<0) and -amount) or 0.0,
|
||||
'statement_id': st.id,
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
'currency_id': st.currency.id,
|
||||
}
|
||||
|
||||
amount = res_currency_obj.compute(cr, uid, st.currency.id,
|
||||
company_currency_id, move.amount, context=context,
|
||||
account=acc_cur)
|
||||
if st.currency.id <> company_currency_id:
|
||||
amount_cur = res_currency_obj.compute(cr, uid, company_currency_id,
|
||||
st.currency.id, amount, context=context,
|
||||
account=acc_cur)
|
||||
val['amount_currency'] = -amount_cur
|
||||
|
||||
if move.account_id and move.account_id.currency_id and move.account_id.currency_id.id <> company_currency_id:
|
||||
val['currency_id'] = move.account_id.currency_id.id
|
||||
if company_currency_id==move.account_id.currency_id.id:
|
||||
amount_cur = move.amount
|
||||
else:
|
||||
amount_cur = res_currency_obj.compute(cr, uid, company_currency_id,
|
||||
move.account_id.currency_id.id, amount, context=context,
|
||||
account=acc_cur)
|
||||
val['amount_currency'] = amount_cur
|
||||
|
||||
torec.append(account_move_line_obj.create(cr, uid, val , context=context))
|
||||
|
||||
if move.reconcile_id and move.reconcile_id.line_new_ids:
|
||||
for newline in move.reconcile_id.line_new_ids:
|
||||
account_move_line_obj.create(cr, uid, {
|
||||
'name': newline.name or move.name,
|
||||
'date': move.date,
|
||||
'ref': move.ref,
|
||||
'move_id': move_id,
|
||||
'partner_id': ((move.partner_id) and move.partner_id.id) or False,
|
||||
'account_id': (newline.account_id) and newline.account_id.id,
|
||||
'debit': newline.amount>0 and newline.amount or 0.0,
|
||||
'credit': newline.amount<0 and -newline.amount or 0.0,
|
||||
'statement_id': st.id,
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
'analytic_account_id':newline.analytic_id and newline.analytic_id.id or False,
|
||||
|
||||
}, context=context)
|
||||
|
||||
# Fill the secondary amount/currency
|
||||
# if currency is not the same than the company
|
||||
amount_currency = False
|
||||
currency_id = False
|
||||
if st.currency.id <> company_currency_id:
|
||||
amount_currency = move.amount
|
||||
currency_id = st.currency.id
|
||||
account_move_line_obj.create(cr, uid, {
|
||||
'name': move.name,
|
||||
'date': move.date,
|
||||
'ref': move.ref,
|
||||
'move_id': move_id,
|
||||
'partner_id': ((move.partner_id) and move.partner_id.id) or False,
|
||||
'account_id': account_id,
|
||||
'credit': ((amount < 0) and -amount) or 0.0,
|
||||
'debit': ((amount > 0) and amount) or 0.0,
|
||||
'statement_id': st.id,
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
'amount_currency': amount_currency,
|
||||
'currency_id': currency_id,
|
||||
}, context=context)
|
||||
|
||||
for line in account_move_line_obj.browse(cr, uid, [x.id for x in
|
||||
account_move_obj.browse(cr, uid, move_id,
|
||||
context=context).line_id],
|
||||
context=context):
|
||||
if line.state <> 'valid':
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('Ledger Posting line "%s" is not valid') % line.name)
|
||||
|
||||
if move.reconcile_id and move.reconcile_id.line_ids:
|
||||
torec += map(lambda x: x.id, move.reconcile_id.line_ids)
|
||||
#try:
|
||||
if abs(move.reconcile_amount-move.amount)<0.0001:
|
||||
|
||||
writeoff_acc_id = False
|
||||
#There should only be one write-off account!
|
||||
for entry in move.reconcile_id.line_new_ids:
|
||||
writeoff_acc_id = entry.account_id.id
|
||||
break
|
||||
|
||||
account_move_line_obj.reconcile(cr, uid, torec, 'statement', writeoff_acc_id=writeoff_acc_id, writeoff_period_id=st.period_id.id, writeoff_journal_id=st.journal_id.id, context=context)
|
||||
else:
|
||||
account_move_line_obj.reconcile_partial(cr, uid, torec, 'statement', context)
|
||||
#except:
|
||||
# raise osv.except_osv(_('Error !'), _('Unable to reconcile entry "%s": %.2f') % (move.name, move.amount))
|
||||
|
||||
if st.journal_id.entry_posted:
|
||||
account_move_obj.write(cr, uid, [move_id], {'state':'posted'})
|
||||
done.append(st.id)
|
||||
self.write(cr, uid, done, {'state':'confirm'}, context=context)
|
||||
return True
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context={}):
|
||||
done = []
|
||||
for st in self.browse(cr, uid, ids, context):
|
||||
ids = []
|
||||
for line in st.line_ids:
|
||||
ids += [x.id for x in line.move_ids]
|
||||
self.pool.get('account.move').unlink(cr, uid, ids, context)
|
||||
done.append(st.id)
|
||||
self.write(cr, uid, done, {'state':'draft'}, context=context)
|
||||
return True
|
||||
|
||||
account_cash_statement()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string">You can enhance OpenERP's basic accounting support with a few additional OpenERP applications.</attribute>
|
||||
<attribute name="string">From this screen, you can configure your accounting system. Choose a Chart of Account matched to your accounting system or the Generic Chart of Account which allows you to configure which suit your needs.</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<attribute name="string">Configure</attribute>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<notebook>
|
||||
<page string="Line">
|
||||
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, {'company_id': parent.company_id})"/>
|
||||
<field name="uos_id"/>
|
||||
<field name="uos_id" widget="selection" on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, {'company_id': parent.company_id})"/>
|
||||
<field name="quantity"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount"/>
|
||||
@@ -205,7 +205,7 @@
|
||||
<button name="invoice_open" states="draft,proforma2" string="Validate" icon="terp-camera_test"/>
|
||||
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
|
||||
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="terp-gtk-stop"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="stock_effects-object-colorize"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
|
||||
<button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='paid' icon="terp-dolar"/>
|
||||
</group>
|
||||
@@ -220,7 +220,8 @@
|
||||
<field name="name"/>
|
||||
<newline/>
|
||||
<field name="origin" groups="base.group_extended"/>
|
||||
<field colspan="4" domain="[('partner_id','=',partner_id)]" name="address_contact_id" groups="base.group_extended"/>
|
||||
<field domain="[('partner_id','=',partner_id)]" name="address_contact_id" groups="base.group_extended"/>
|
||||
<field name="user_id"/>
|
||||
<field name="move_id"/>
|
||||
<separator colspan="4" string="Additional Information"/>
|
||||
<field colspan="4" name="comment" nolabel="1"/>
|
||||
@@ -348,11 +349,15 @@
|
||||
<group col="10" colspan="4">
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Invoices"/>
|
||||
<filter icon="terp-check" string="Proforma" domain="[('state','=','proforma2')]" help="Proforma Invoices"/>
|
||||
<filter icon="terp-check" string="Invoices" domain="[('state','not in',['draft','cancel','cancel'])]" help="Invoices"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-dolar_ok!" string="Unpaid" domain="[('state','=','open')]" help="Unpaid Invoices"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="number"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id" default="uid"/>
|
||||
<field name="user_id" select="1" default="uid" widget="selection" string="Responsible">
|
||||
<filter domain="[('user_id','=',uid)]" help="Responsible" icon="terp-partner" separator="1"/>
|
||||
</field>
|
||||
<field name="origin"/>
|
||||
<field name="amount_total"/>
|
||||
</group>
|
||||
@@ -362,7 +367,7 @@
|
||||
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Invoice Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_invoice'}"/>
|
||||
@@ -404,7 +409,7 @@
|
||||
<field name="view_id" ref="invoice_form"/>
|
||||
<field name="act_window_id" ref="action_invoice_tree"/>
|
||||
</record>
|
||||
<menuitem name="Invoices" id="menu_finance_invoice" parent="account.menu_finance" sequence="2"/>
|
||||
<!-- <menuitem name="Invoices" id="menu_finance_invoice" parent="account.menu_finance" sequence="2"/>-->
|
||||
|
||||
<record id="action_invoice_tree1" model="ir.actions.act_window">
|
||||
<field name="name">Customer Invoices</field>
|
||||
@@ -427,10 +432,10 @@
|
||||
<field name="view_id" ref="invoice_form"/>
|
||||
<field name="act_window_id" ref="action_invoice_tree1"/>
|
||||
</record>
|
||||
<menuitem action="action_invoice_tree1" id="menu_action_invoice_tree1" parent="account.menu_finance_invoice"/>
|
||||
<menuitem action="action_invoice_tree1" id="menu_action_invoice_tree1" parent="menu_finance_receivables"/>
|
||||
|
||||
<record id="action_invoice_tree2" model="ir.actions.act_window">
|
||||
<field name="name">Supplier Invoices</field>
|
||||
<field name="name">Vendor Invoices</field>
|
||||
<field name="res_model">account.invoice</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
@@ -439,7 +444,7 @@
|
||||
<field name="context">{'type':'in_invoice'}</field>
|
||||
<field name="search_view_id" ref="view_account_invoice_filter"/>
|
||||
</record>
|
||||
<menuitem action="action_invoice_tree2" id="menu_action_invoice_tree2" parent="account.menu_finance_invoice"/>
|
||||
<menuitem action="action_invoice_tree2" id="menu_action_invoice_tree2" parent="menu_finance_payables"/>
|
||||
|
||||
<record id="action_invoice_tree3" model="ir.actions.act_window">
|
||||
<field name="name">Customer Refunds</field>
|
||||
@@ -465,10 +470,10 @@
|
||||
<field name="act_window_id" ref="action_invoice_tree3"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_invoice_tree3" id="menu_action_invoice_tree3" parent="account.menu_finance_invoice"/>
|
||||
<menuitem action="action_invoice_tree3" id="menu_action_invoice_tree3" parent="menu_finance_receivables"/>
|
||||
|
||||
<record id="action_invoice_tree4" model="ir.actions.act_window">
|
||||
<field name="name">Supplier Refunds</field>
|
||||
<field name="name">Vendor Refunds</field>
|
||||
<field name="res_model">account.invoice</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
@@ -477,7 +482,7 @@
|
||||
<field name="context">{'type':'in_refund'}</field>
|
||||
<field name="search_view_id" ref="view_account_invoice_filter"/>
|
||||
</record>
|
||||
<menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="account.menu_finance_invoice"/>
|
||||
<menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="menu_finance_payables"/>
|
||||
|
||||
<act_window domain="[('partner_id','=',active_id)]" id="act_res_partner_2_account_invoice_opened" name="Invoices" res_model="account.invoice" src_model="res.partner"/>
|
||||
|
||||
|
||||
@@ -3,26 +3,49 @@
|
||||
<data>
|
||||
|
||||
<menuitem icon="terp-account" id="menu_finance" name="Accounting" sequence="13"/>
|
||||
<menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="8"/>
|
||||
<menuitem id="base.menu_action_currency_form" parent="menu_finance_configuration" sequence="20"/>
|
||||
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_finance_receivables" name="Receivables" parent="menu_finance" sequence="1"/>
|
||||
<menuitem id="menu_finance_payables" name="Payables" parent="menu_finance" sequence="2"/>
|
||||
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="3"/>
|
||||
<!-- <menuitem id="menu_accounting" name="Accounting" parent="menu_finance" sequence="5"/>-->
|
||||
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user"/>
|
||||
<menuitem id="periodical_processing_journal_entries_validation" name="Journal Entries Validation" parent="menu_finance_periodical_processing"/>
|
||||
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing"/>-->
|
||||
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_end_of_period" name="End of Period" parent="menu_finance_periodical_processing"/>-->
|
||||
<menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="5"/>
|
||||
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12"/>
|
||||
<menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_generic_report" name="Management Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="13"/>
|
||||
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts"/>
|
||||
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting"/>
|
||||
<menuitem id="menu_configuration_misc" name="Miscelleanous" parent="menu_finance_configuration"/>
|
||||
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
|
||||
<!-- <menuitem id="menu_finance_configuration1" name="Configuration" parent="menu_finance" sequence="80"/>-->
|
||||
<!-- <menuitem id="base.menu_action_currency_form" parent="menu_finance_configuration" sequence="20"/>-->
|
||||
<!-- <menuitem id="menu_finance_accounting1" name="Financial Accounting" parent="menu_finance_configuration" sequence="80"/>-->
|
||||
<!-- <menuitem id="menu_analytic_accounting1" name="Analytic Accounting" parent="menu_finance_configuration" sequence="80"/>-->
|
||||
|
||||
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="7"/>
|
||||
<menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="account.menu_finance_reporting" sequence="1"/>
|
||||
<menuitem id="menu_finance_legal_statement" name="Legal Statements" parent="account.menu_finance_reporting" sequence="2"/>
|
||||
<menuitem id="menu_generic_report" name="Generic Reports" parent="account.menu_finance_legal_statement" sequence="8"/>
|
||||
<!-- <menuitem id="menu_finance_reporting11" name="Reporting" parent="account.menu_finance" sequence="80"/>-->
|
||||
<menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="menu_finance_reporting" sequence="100"/>
|
||||
<!-- <menuitem id="menu_finance_legal_statement1" name="Legal Statements" parent="account.menu_finance_reporting" sequence="200"/>-->
|
||||
<!-- <menuitem id="menu_generic_report" name="Generic Reports" parent="account.menu_finance_legal_statement" sequence="8"/>-->
|
||||
|
||||
<menuitem id="menu_finance_entries" name="Accounting" parent="account.menu_finance" sequence="1"
|
||||
<menuitem id="menu_finance_entries" name="Accounting" parent="menu_finance" sequence="4"
|
||||
groups="group_account_user"/>
|
||||
<menuitem id="account.menu_finance_recurrent_entries" name="Recurrent Entries" parent="account.menu_finance_entries" sequence="15"/>
|
||||
<menuitem id="account.menu_finance_recurrent_entries" name="Recurring Entries" parent="menu_finance_periodical_processing" sequence="15"/>
|
||||
|
||||
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="account.menu_finance"
|
||||
sequence="3"
|
||||
groups="group_account_user"/>
|
||||
<menuitem id="menu_account_end_year_treatments" name="End of Year Treatments" parent="account.menu_finance_periodical_processing" sequence="20"/>
|
||||
<!-- <menuitem id="menu_finance_periodical_processing11" name="Periodical Processing" parent="account.menu_finance"-->
|
||||
<!-- sequence="3"-->
|
||||
<!-- groups="group_account_user"/>-->
|
||||
<menuitem id="menu_account_end_year_treatments" name="End of Period" parent="menu_finance_periodical_processing"/>
|
||||
|
||||
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="account.menu_finance_reporting" sequence="3"/>
|
||||
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="menu_finance_reporting" sequence="300"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
@@ -18,13 +18,12 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
from datetime import datetime
|
||||
|
||||
import netsvc
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
from datetime import datetime
|
||||
import decimal_precision as dp
|
||||
import tools
|
||||
|
||||
@@ -66,9 +65,9 @@ class account_move_line(osv.osv):
|
||||
#the query have to be build with no reference to periods but thanks to the creation date
|
||||
if context.get('periods',False):
|
||||
#if one or more period are given, use them
|
||||
fiscalperiod_ids = fiscalperiod_obj.search(cr,uid,[('id','in',context['periods'])])
|
||||
fiscalperiod_ids = fiscalperiod_obj.search(cr, uid, [('id','in',context['periods'])])
|
||||
else:
|
||||
fiscalperiod_ids = self.pool.get('account.period').search(cr,uid,[('fiscalyear_id','in',fiscalyear_ids)])
|
||||
fiscalperiod_ids = self.pool.get('account.period').search(cr, uid, [('fiscalyear_id','in',fiscalyear_ids)])
|
||||
|
||||
|
||||
|
||||
@@ -87,7 +86,7 @@ class account_move_line(osv.osv):
|
||||
#add to 'res' a new clause containing the creation date criterion
|
||||
count = 1
|
||||
res += " AND ("
|
||||
periods = self.pool.get('account.period').read(cr,uid,p_ids,['date_start','date_stop'])
|
||||
periods = self.pool.get('account.period').read(cr, uid, p_ids, ['date_start','date_stop'])
|
||||
for period in periods:
|
||||
if count != 1:
|
||||
res += " OR "
|
||||
@@ -150,7 +149,7 @@ class account_move_line(osv.osv):
|
||||
for item in i[2]:
|
||||
data[item]=i[2][item]
|
||||
if context['journal']:
|
||||
journal_obj=self.pool.get('account.journal').browse(cr,uid,context['journal'])
|
||||
journal_obj=self.pool.get('account.journal').browse(cr, uid, context['journal'])
|
||||
if journal_obj.type == 'purchase':
|
||||
if total_new>0:
|
||||
account = journal_obj.default_credit_account_id
|
||||
@@ -298,9 +297,10 @@ class account_move_line(osv.osv):
|
||||
for line_id in ids:
|
||||
res[line_id] = False
|
||||
cursor.execute('SELECT l.id, i.id ' \
|
||||
'FROM account_move_line l, account_invoice i ' \
|
||||
'WHERE l.move_id = i.move_id ' \
|
||||
'AND l.id =ANY(%s)',(ids,))
|
||||
'FROM account_move_line l, account_invoice i ' \
|
||||
'WHERE l.move_id = i.move_id ' \
|
||||
'AND l.id IN %s',
|
||||
(tuple(ids),))
|
||||
invoice_ids = []
|
||||
for line_id, invoice_id in cursor.fetchall():
|
||||
res[line_id] = invoice_id
|
||||
@@ -333,7 +333,7 @@ class account_move_line(osv.osv):
|
||||
return []
|
||||
where = ' and '.join(map(lambda x: '(abs(sum(debit-credit))'+x[1]+str(x[2])+')',args))
|
||||
cursor.execute('select id, sum(debit-credit) from account_move_line \
|
||||
group by id,debit,credit having '+where)
|
||||
group by id, debit, credit having '+where)
|
||||
res = cursor.fetchall()
|
||||
if not len(res):
|
||||
return [('id', '=', '0')]
|
||||
@@ -433,8 +433,8 @@ class account_move_line(osv.osv):
|
||||
'account_tax_id':fields.many2one('account.tax', 'Tax'),
|
||||
'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account'),
|
||||
#TODO: remove this
|
||||
'amount_taxed':fields.float("Taxed Amount",digits_compute=dp.get_precision('Account')),
|
||||
'company_id': fields.related('account_id','company_id',type='many2one',relation='res.company',string='Company',store=True)
|
||||
'amount_taxed':fields.float("Taxed Amount", digits_compute=dp.get_precision('Account')),
|
||||
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True)
|
||||
|
||||
}
|
||||
|
||||
@@ -469,7 +469,7 @@ class account_move_line(osv.osv):
|
||||
'currency_id': _get_currency,
|
||||
'journal_id': lambda self, cr, uid, c: c.get('journal_id', False),
|
||||
'period_id': lambda self, cr, uid, c: c.get('period_id', False),
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.move.line', context=c)
|
||||
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.move.line', context=c)
|
||||
}
|
||||
_order = "date desc,id desc"
|
||||
_sql_constraints = [
|
||||
@@ -498,9 +498,17 @@ class account_move_line(osv.osv):
|
||||
return False
|
||||
return True
|
||||
|
||||
def _check_company_id(self, cr, uid, ids):
|
||||
lines = self.browse(cr, uid, ids)
|
||||
for l in lines:
|
||||
if l.company_id != l.account_id.company_id or l.company_id != l.period_id.company_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']),
|
||||
]
|
||||
|
||||
#TODO: ONCHANGE_ACCOUNT_ID: set account_tax_id
|
||||
@@ -569,11 +577,54 @@ class account_move_line(osv.osv):
|
||||
# writeoff; entry generated for the difference between the lines
|
||||
#
|
||||
|
||||
def reconcile_partial(self, cr, uid, ids, type='auto', context={}):
|
||||
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
|
||||
if context is None:
|
||||
context = {}
|
||||
if context and context.get('next_partner_only', False):
|
||||
if not context.get('partner_id', False):
|
||||
partner = self.get_next_partner_only(cr, uid, offset, context)
|
||||
else:
|
||||
partner = context.get('partner_id', False)
|
||||
if not partner:
|
||||
return []
|
||||
args.append(('partner_id', '=', partner[0]))
|
||||
return super(account_move_line, self).search(cr, uid, args, offset, limit, order, context, count)
|
||||
|
||||
def get_next_partner_only(self, cr, uid, offset=0, context=None):
|
||||
cr.execute(
|
||||
"""
|
||||
SELECT p.id
|
||||
FROM res_partner p
|
||||
RIGHT JOIN (
|
||||
SELECT l.partner_id as partner_id, SUM(l.debit) as debit, SUM(l.credit) as credit
|
||||
FROM account_move_line l
|
||||
LEFT JOIN account_account a ON (a.id = l.account_id)
|
||||
LEFT JOIN res_partner p ON (l.partner_id = p.id)
|
||||
WHERE a.reconcile IS TRUE
|
||||
AND l.reconcile_id IS NULL
|
||||
AND (p.last_reconciliation_date IS NULL OR l.date > p.last_reconciliation_date)
|
||||
AND l.state <> 'draft'
|
||||
GROUP BY l.partner_id
|
||||
) AS s ON (p.id = s.partner_id)
|
||||
ORDER BY p.last_reconciliation_date LIMIT 1 OFFSET %s""", (offset,)
|
||||
)
|
||||
return cr.fetchone()
|
||||
|
||||
def reconcile_partial(self, cr, uid, ids, type='auto', context=None):
|
||||
merges = []
|
||||
unmerge = []
|
||||
total = 0.0
|
||||
merges_rec = []
|
||||
|
||||
company_list = []
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
if company_list and not line.company_id.id in company_list:
|
||||
raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries'))
|
||||
company_list.append(line.company_id.id)
|
||||
|
||||
for line in self.browse(cr, uid, ids, context):
|
||||
if line.reconcile_id:
|
||||
raise osv.except_osv(_('Warning'), _('Already Reconciled!'))
|
||||
@@ -587,6 +638,7 @@ class account_move_line(osv.osv):
|
||||
else:
|
||||
unmerge.append(line.id)
|
||||
total += (line.debit or 0.0) - (line.credit or 0.0)
|
||||
|
||||
if not total:
|
||||
res = self.reconcile(cr, uid, merges+unmerge, context=context)
|
||||
return res
|
||||
@@ -597,13 +649,22 @@ class account_move_line(osv.osv):
|
||||
self.pool.get('account.move.reconcile').reconcile_partial_check(cr, uid, [r_id] + merges_rec, context=context)
|
||||
return True
|
||||
|
||||
def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context={}):
|
||||
def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context=None):
|
||||
lines = self.browse(cr, uid, ids, context=context)
|
||||
unrec_lines = filter(lambda x: not x['reconcile_id'], lines)
|
||||
credit = debit = 0.0
|
||||
currency = 0.0
|
||||
account_id = False
|
||||
partner_id = False
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
company_list = []
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
if company_list and not line.company_id.id in company_list:
|
||||
raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries'))
|
||||
company_list.append(line.company_id.id)
|
||||
|
||||
for line in unrec_lines:
|
||||
if line.state <> 'valid':
|
||||
raise osv.except_osv(_('Error'),
|
||||
@@ -620,10 +681,11 @@ class account_move_line(osv.osv):
|
||||
else:
|
||||
date = time.strftime('%Y-%m-%d')
|
||||
|
||||
cr.execute('SELECT account_id, reconcile_id \
|
||||
FROM account_move_line \
|
||||
WHERE id =ANY(%s) \
|
||||
GROUP BY account_id,reconcile_id',(ids,))
|
||||
cr.execute('SELECT account_id, reconcile_id '\
|
||||
'FROM account_move_line '\
|
||||
'WHERE id IN %s '\
|
||||
'GROUP BY account_id,reconcile_id',
|
||||
(tuple(ids),))
|
||||
r = cr.fetchall()
|
||||
#TODO: move this check to a constraint in the account_move_reconcile object
|
||||
if (len(r) != 1) and not context.get('fy_closing', False):
|
||||
@@ -701,6 +763,11 @@ class account_move_line(osv.osv):
|
||||
# because of the way the line_id are defined: (4, x, False)
|
||||
for id in ids:
|
||||
wf_service.trg_trigger(uid, 'account.move.line', id, cr)
|
||||
|
||||
if lines and lines[0]:
|
||||
partner_id = lines[0].partner_id.id
|
||||
if context and context.get('stop_reconcile', False):
|
||||
self.pool.get('res.partner').write(cr, uid, [partner_id], {'last_reconciliation_date': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
return r_id
|
||||
|
||||
def view_header_get(self, cr, user, view_id, view_type, context):
|
||||
@@ -721,57 +788,89 @@ class account_move_line(osv.osv):
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False):
|
||||
result = super(osv.osv, self).fields_view_get(cr, uid, view_id,view_type,context,toolbar=toolbar, submenu=submenu)
|
||||
if view_type=='tree' and 'journal_id' in context:
|
||||
title = self.view_header_get(cr, uid, view_id, view_type, context)
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, context['journal_id'])
|
||||
if view_type != 'tree':
|
||||
return result
|
||||
|
||||
# if the journal view has a state field, color lines depending on
|
||||
# its value
|
||||
state = ''
|
||||
fld = []
|
||||
fields = {}
|
||||
flds = []
|
||||
title = 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">\n\t''' % (title)
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
|
||||
ids = journal_pool.search(cr, uid, [])
|
||||
journals = journal_pool.browse(cr, uid, ids)
|
||||
all_journal = [None]
|
||||
common_fields = {}
|
||||
total = len(journals)
|
||||
for journal in journals:
|
||||
all_journal.append(journal.id)
|
||||
for field in journal.view_id.columns_id:
|
||||
if field.field=='state':
|
||||
state = ' colors="red:state==\'draft\'"'
|
||||
|
||||
#xml = '''<?xml version="1.0"?>\n<tree string="%s" editable="top" refresh="5"%s>\n\t''' % (title, state)
|
||||
xml = '''<?xml version="1.0"?>\n<tree string="%s" editable="top" refresh="5" on_write="on_create_write"%s>\n\t''' % (title, state)
|
||||
fields = []
|
||||
|
||||
widths = {
|
||||
'ref': 50,
|
||||
'statement_id': 50,
|
||||
'state': 60,
|
||||
'tax_code_id': 50,
|
||||
'move_id': 40,
|
||||
}
|
||||
for field in journal.view_id.columns_id:
|
||||
fields.append(field.field)
|
||||
attrs = []
|
||||
if field.field=='debit':
|
||||
attrs.append('sum="Total debit"')
|
||||
elif field.field=='credit':
|
||||
attrs.append('sum="Total credit"')
|
||||
elif field.field=='account_tax_id':
|
||||
attrs.append('domain="[(\'parent_id\',\'=\',False)]"')
|
||||
elif field.field=='account_id' and journal.id:
|
||||
attrs.append('domain="[(\'journal_id\', \'=\', '+str(journal.id)+'),(\'type\',\'<>\',\'view\'), (\'type\',\'<>\',\'closed\')]" on_change="onchange_account_id(account_id, partner_id)"')
|
||||
elif field.field == 'partner_id':
|
||||
attrs.append('on_change="onchange_partner_id(move_id,partner_id,account_id,debit,credit,date,((\'journal_id\' in context) and context[\'journal_id\']) or {})"')
|
||||
if field.readonly:
|
||||
attrs.append('readonly="1"')
|
||||
if field.required:
|
||||
attrs.append('required="1"')
|
||||
if not field.field in fields:
|
||||
fields[field.field] = [journal.id]
|
||||
fld.append((field.field, field.sequence))
|
||||
flds.append(field.field)
|
||||
common_fields[field.field] = 1
|
||||
else:
|
||||
attrs.append('required="0"')
|
||||
if field.field in ('amount_currency','currency_id'):
|
||||
attrs.append('on_change="onchange_currency(account_id,amount_currency,currency_id,date,((\'journal_id\' in context) and context[\'journal_id\']) or {})"')
|
||||
fields.get(field.field).append(journal.id)
|
||||
common_fields[field.field] = common_fields[field.field] + 1
|
||||
|
||||
fld.append(('period_id', 3))
|
||||
fld.append(('journal_id', 10))
|
||||
flds.append('period_id')
|
||||
flds.append('journal_id')
|
||||
fields['period_id'] = all_journal
|
||||
fields['journal_id'] = all_journal
|
||||
|
||||
from operator import itemgetter
|
||||
fld = sorted(fld, key=itemgetter(1))
|
||||
|
||||
if field.field in widths:
|
||||
attrs.append('width="'+str(widths[field.field])+'"')
|
||||
xml += '''<field name="%s" %s/>\n''' % (field.field,' '.join(attrs))
|
||||
widths = {
|
||||
'ref': 50,
|
||||
'statement_id': 50,
|
||||
'state': 60,
|
||||
'tax_code_id': 50,
|
||||
'move_id': 40,
|
||||
}
|
||||
|
||||
xml += '''</tree>'''
|
||||
result['arch'] = xml
|
||||
result['fields'] = self.fields_get(cr, uid, fields, context)
|
||||
for field_it in fld:
|
||||
field = field_it[0]
|
||||
|
||||
if common_fields.get(field) == total:
|
||||
fields.get(field).append(None)
|
||||
|
||||
if field=='state':
|
||||
state = 'colors="red:state==\'draft\'"'
|
||||
|
||||
attrs = []
|
||||
if field == 'debit':
|
||||
attrs.append('sum="Total debit"')
|
||||
elif field == 'credit':
|
||||
attrs.append('sum="Total credit"')
|
||||
elif field == 'account_tax_id':
|
||||
attrs.append('domain="[(\'parent_id\',\'=\',False)]"')
|
||||
elif field == 'account_id' and journal.id:
|
||||
attrs.append('domain="[(\'journal_id\', \'=\', '+str(journal.id)+'),(\'type\',\'<>\',\'view\'), (\'type\',\'<>\',\'closed\')]" 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)"')
|
||||
# if field.readonly:
|
||||
# attrs.append('readonly="1"')
|
||||
# if field.required:
|
||||
# attrs.append('required="1"')
|
||||
# else:
|
||||
# attrs.append('required="0"')
|
||||
if field in ('amount_currency','currency_id'):
|
||||
attrs.append('on_change="onchange_currency(account_id, amount_currency,currency_id, date, journal_id)"')
|
||||
|
||||
if field in widths:
|
||||
attrs.append('width="'+str(widths[field])+'"')
|
||||
|
||||
attrs.append("invisible=\"context.get('visible_id') not in %s\"" % (fields.get(field)))
|
||||
xml += '''<field name="%s" %s/>\n''' % (field,' '.join(attrs))
|
||||
|
||||
xml += '''</tree>'''
|
||||
result['arch'] = xml
|
||||
result['fields'] = self.fields_get(cr, uid, flds, context)
|
||||
return result
|
||||
|
||||
def _check_moves(self, cr, uid, context):
|
||||
@@ -809,13 +908,14 @@ class account_move_line(osv.osv):
|
||||
journal_id = m.journal_id.id
|
||||
period_id = m.period_id.id
|
||||
else:
|
||||
journal_id = context['journal_id']
|
||||
period_id = context['period_id']
|
||||
journal = self.pool.get('account.journal').browse(cr,uid,[journal_id])[0]
|
||||
if journal.allow_date:
|
||||
period = self.pool.get('account.period').browse(cr,uid,[period_id])[0]
|
||||
if not time.strptime(vals['date'],'%Y-%m-%d')>=time.strptime(period.date_start,'%Y-%m-%d') or not time.strptime(vals['date'],'%Y-%m-%d')<=time.strptime(period.date_stop,'%Y-%m-%d'):
|
||||
raise osv.except_osv(_('Error'),_('The date of your Ledger Posting is not in the defined period !'))
|
||||
journal_id = context.get('journal_id',False)
|
||||
period_id = context.get('period_id',False)
|
||||
if journal_id:
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, [journal_id])[0]
|
||||
if journal.allow_date and period_id:
|
||||
period = self.pool.get('account.period').browse(cr, uid, [period_id])[0]
|
||||
if not time.strptime(vals['date'],'%Y-%m-%d')>=time.strptime(period.date_start,'%Y-%m-%d') or not time.strptime(vals['date'],'%Y-%m-%d')<=time.strptime(period.date_stop,'%Y-%m-%d'):
|
||||
raise osv.except_osv(_('Error'),_('The date of your Ledger Posting is not in the defined period !'))
|
||||
else:
|
||||
return True
|
||||
|
||||
@@ -836,7 +936,7 @@ class account_move_line(osv.osv):
|
||||
if vals.get('date', False):
|
||||
todo_date = vals['date']
|
||||
del vals['date']
|
||||
|
||||
|
||||
for line in self.browse(cr, uid, ids,context=context):
|
||||
ctx = context.copy()
|
||||
if ('journal_id' not in ctx):
|
||||
@@ -848,8 +948,8 @@ class account_move_line(osv.osv):
|
||||
if line.move_id:
|
||||
ctx['period_id'] = line.move_id.period_id.id
|
||||
else:
|
||||
ctx['period_id'] = line.period_id.id
|
||||
#Check for centralisation
|
||||
ctx['period_id'] = line.period_id.id
|
||||
#Check for centralisation
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, ctx['journal_id'], context=ctx)
|
||||
if journal.centralisation:
|
||||
self._check_moves(cr, uid, context=ctx)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
string="Taxes Report"/>
|
||||
|
||||
<report id="report_account_voucher_new"
|
||||
string="Voucher"
|
||||
string="Print Voucher"
|
||||
model="account.move"
|
||||
name="account.move.voucher"
|
||||
rml="account/report/voucher_print.rml"
|
||||
@@ -61,21 +61,6 @@
|
||||
parent="menu_tax_report"
|
||||
type="wizard"/> -->
|
||||
|
||||
|
||||
<record id="action_tax_code_tree" model="ir.actions.act_window">
|
||||
<field name="name">Chart of Taxes</field>
|
||||
<field name="res_model">account.tax.code</field>
|
||||
<field name="domain">[('parent_id','=',False)]</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_id" ref="view_tax_code_tree"/>
|
||||
</record>
|
||||
<menuitem
|
||||
action="action_tax_code_tree"
|
||||
id="menu_action_tax_code_tree"
|
||||
parent="menu_tax_report"
|
||||
sequence="12"/>
|
||||
|
||||
|
||||
<report id="account_account_balance_compare"
|
||||
string="Account balance"
|
||||
model="account.account"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data>
|
||||
<!-- This file must be loaded _after_ account_demo.xml ! -->
|
||||
<record id="test_invoice_1" model="account.invoice">
|
||||
<field name="currency_id" ref="base.EUR"/>
|
||||
@@ -44,14 +44,14 @@
|
||||
<test expr="state">open</test>
|
||||
</assert>
|
||||
<function model="account.invoice" name="pay_and_reconcile">
|
||||
<!-- ids = --> <value eval="[ref('test_invoice_1')]"/>
|
||||
<!-- pay_amount = --> <value eval="1850"/>
|
||||
<!-- pay_account_id = --> <value eval="ref('cash')"/>
|
||||
<!-- period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
|
||||
<!-- pay_journal_id = --> <value eval="ref('bank_journal')"/>
|
||||
<!-- writeoff_acc_id = --> <value eval="ref('cash')"/>
|
||||
<!-- writeoff_period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
|
||||
<!-- writeoff_journal_id = --> <value eval="ref('bank_journal')"/>
|
||||
<!-- ids = --> <value eval="[ref('test_invoice_1')]"/>
|
||||
<!-- pay_amount = --> <value eval="1850"/>
|
||||
<!-- pay_account_id = --> <value eval="ref('cash')"/>
|
||||
<!-- period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
|
||||
<!-- pay_journal_id = --> <value eval="ref('bank_journal')"/>
|
||||
<!-- writeoff_acc_id = --> <value eval="ref('cash')"/>
|
||||
<!-- writeoff_period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
|
||||
<!-- writeoff_journal_id = --> <value eval="ref('bank_journal')"/>
|
||||
</function>
|
||||
|
||||
<assert id="test_invoice_1" model="account.invoice" string="Test invoice 1 is now paid">
|
||||
|
||||
+680
-143
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- <wizard-->
|
||||
<!-- string="Account balance-Compare Years"-->
|
||||
<!-- model="account.account"-->
|
||||
<!-- name="account.balance.account.balance.report"-->
|
||||
<!-- keyword="client_print_multi"-->
|
||||
<!-- id="wizard_account_balance_compare_report"/>-->
|
||||
<!-- <wizard-->
|
||||
<!-- string="Account balance-Compare Years"-->
|
||||
<!-- model="account.account"-->
|
||||
<!-- name="account.balance.account.balance.report"-->
|
||||
<!-- keyword="client_print_multi"-->
|
||||
<!-- id="wizard_account_balance_compare_report"/>-->
|
||||
|
||||
<!-- <wizard id="wizard_invoice_refund" model="account.invoice" name="account.invoice.refund" string="Credit Note" groups="base.group_user"/> -->
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
-->
|
||||
|
||||
<!-- automatic reconcile -->
|
||||
<menuitem id="next_id_20" name="Reconciliation" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="next_id_20" name="Reconciliation" parent="menu_finance_periodical_processing"/>-->
|
||||
<!-- <wizard id="wizard_automatic_reconcile" menu="False" model="account.account" name="account.automatic.reconcile" string="Automatic reconciliation"/>
|
||||
<menuitem action="wizard_automatic_reconcile" id="menu_automatic_reconcile" parent="next_id_20" type="wizard"/>-->
|
||||
|
||||
@@ -52,18 +52,15 @@
|
||||
<!-- <wizard id="wizard_reconcile_unreconcile" model="account.move.reconcile" name="account.reconcile.unreconcile" string="Unreconcile Entries"/>-->
|
||||
|
||||
|
||||
<!-- <wizard id="wizard_reconcile_select" menu="False" model="account.move.line" name="account.move.line.reconcile.select" string="Reconcile entries"/>
|
||||
<menuitem action="wizard_reconcile_select" id="menu_reconcile_select" parent="account.next_id_20" type="wizard"/>
|
||||
-->
|
||||
<!-- <wizard id="wizard_reconcile_select" menu="False" model="account.move.line" name="account.move.line.reconcile.select" string="Reconcile entries"/> -->
|
||||
<!-- <menuitem action="wizard_reconcile_select" id="menu_reconcile_select" parent="account.next_id_20" type="wizard"/> -->
|
||||
|
||||
<!-- unreconcile -->
|
||||
<!-- <wizard id="wizard_unreconcile" model="account.move.line" name="account.move.line.unreconcile" string="Unreconcile Entries"/>-->
|
||||
|
||||
<!-- unreconcile
|
||||
|
||||
<wizard id="wizard_unreconcile_select" menu="False" model="account.move.line" name="account.move.line.unreconcile.select" string="Unreconcile entries"/>
|
||||
<menuitem action="wizard_unreconcile_select" id="menu_unreconcile_select" parent="account.next_id_20" type="wizard"/>
|
||||
-->
|
||||
<!-- <wizard id="wizard_unreconcile_select" menu="False" model="account.move.line" name="account.move.line.unreconcile.select" string="Unreconcile entries"/> -->
|
||||
<!-- <menuitem action="wizard_unreconcile_select" id="menu_unreconcile_select" parent="account.next_id_20" type="wizard"/> -->
|
||||
|
||||
<!-- subscriptions -->
|
||||
<!--
|
||||
@@ -78,7 +75,7 @@
|
||||
<!-- report-related wizards -->
|
||||
<!-- <wizard id="wizard_partner_balance_report" menu="False" model="res.partner" name="account.partner.balance.report" string="Partner Balance"/>
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_partner_balance_report" id="menu_partner_balance" parent="account.next_id_22" type="wizard"/> -->
|
||||
<menuitem id="next_id_22" name="Partner Accounts" parent="menu_finance_generic_reporting" sequence="1"/>
|
||||
<menuitem id="next_id_22" name="Partner Accounts" parent="menu_finance_generic_reporting" sequence="1"/>
|
||||
<!--<wizard id="wizard_third_party_ledger" menu="False" model="res.partner" name="account.third_party_ledger.report" string="Partner Ledger"/>
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_third_party_ledger" id="menu_third_party_ledger" parent="account.next_id_22" type="wizard"/> -->
|
||||
|
||||
@@ -97,30 +94,30 @@
|
||||
|
||||
<wizard id="wizard_validate_account_moves_line" menu="True" model="account.move.line" name="account.move_line.validate" string="Validate Ledger Postings"/>-->
|
||||
|
||||
<!-- Use Models -->
|
||||
<!-- Use Models -->
|
||||
<!-- <wizard string="Create Entries From Models" model="account.model" name="account_use_models" menu="False" id="wizard_account_use_model"/>-->
|
||||
<!-- <menuitem action="wizard_account_use_model" type="wizard" parent="account.menu_finance_recurrent_entries" id="menu_account_use_model"/>-->
|
||||
|
||||
<!-- <wizard string="Create Entries From Models" model="account.move.line" name="account_use_models" menu="True" id="wizard_line_account_use_model"/>-->
|
||||
|
||||
<!-- account.invoice -->
|
||||
<!-- account.invoice -->
|
||||
<!-- <wizard string="Open State" model="account.invoice" name="account.wizard_paid_open" menu="False" id="wizard_paid_open" groups="base.group_user"/> -->
|
||||
|
||||
<!-- generic report wizard -->
|
||||
<!-- <wizard id="wizard_account_balance_report" menu="False" model="account.account" name="account.account.balance.report" string="Account Balance"/>-->
|
||||
<!-- generic report wizard -->
|
||||
<!-- <wizard id="wizard_account_balance_report" menu="False" model="account.account" name="account.account.balance.report" string="Account Balance"/>-->
|
||||
<!-- <menuitem icon="STOCK_PRINT" action="wizard_account_balance_report" id="menu_account_balance_report" parent="account.menu_generic_report" type="wizard"/>-->
|
||||
|
||||
<!-- <wizard id="wizard_general_ledger" menu="False" model="account.account" name="account.general.ledger.report" string="General Ledger"/>
|
||||
<!-- <wizard id="wizard_general_ledger" menu="False" model="account.account" name="account.general.ledger.report" string="General Ledger"/>
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_general_ledger" id="menu_general_ledger" parent="account.menu_generic_report" type="wizard"/>-->
|
||||
|
||||
<!-- <wizard id="wizard_print_journal" menu="False" model="account.journal.period" name="account.print.journal.report" string="Print Journal" />
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_print_journal" id="menu_print_journal" parent="account.menu_generic_report" type="wizard" />
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_print_journal" id="menu_print_journal" parent="account.menu_generic_report" type="wizard" />
|
||||
|
||||
<wizard id="wizard_central_journal" menu="False" model="account.journal.period" name="account.central.journal.report" string="Print Central Journal" />
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_central_journal" id="menu_central_journal" parent="account.menu_generic_report" type="wizard" />
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_central_journal" id="menu_central_journal" parent="account.menu_generic_report" type="wizard" />
|
||||
|
||||
<wizard id="wizard_general_journal" menu="False" model="account.journal.period" name="account.general.journal.report" string="Print General Journal" />
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_general_journal" id="menu_general_journal" parent="account.menu_generic_report" type="wizard" />-->
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_general_journal" id="menu_general_journal" parent="account.menu_generic_report" type="wizard" />-->
|
||||
|
||||
<!-- <wizard id="wizard_invoice_currency_change" model="account.invoice" name="account.invoice.currency_change" string="Change Currency" groups="base.group_user"/>-->
|
||||
</data>
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<!--
|
||||
Administrator shortcut
|
||||
Demo user startup menu
|
||||
-->
|
||||
<record id="sc_account_dash" model="ir.ui.view_sc">
|
||||
<!-- <record id="sc_account_dash" model="ir.ui.view_sc">
|
||||
<field name="name">Accounting dashboard</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="sequence">0</field>
|
||||
<field name="res_id" ref="menu_board_account"/>
|
||||
</record>
|
||||
</record> -->
|
||||
<record id="base.user_root" model="res.users">
|
||||
<field name="action_id" ref="open_board_account"/>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
+3
-27
@@ -6,13 +6,6 @@
|
||||
<field name="name">Accountants</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_analytic_line_to_invoice" model="ir.actions.act_window">
|
||||
<field name="name">Costs to invoice</field>
|
||||
<field name="res_model">report.account.analytic.line.to.invoice</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
</record>
|
||||
|
||||
<record id="action_aged_receivable" model="ir.actions.act_window">
|
||||
<field name="name">Receivable Accounts</field>
|
||||
<field name="res_model">report.account.receivable</field>
|
||||
@@ -28,9 +21,6 @@
|
||||
<field name="domain">[('type','=','income')]</field>
|
||||
</record>
|
||||
|
||||
|
||||
<act_window domain="[('state','<>','close'),('partner_id','<>',False),('to_invoice', '<>', False)]" id="act_my_account" name="Accounts to invoice" res_model="account.analytic.account" src_model="res.users" view_mode="tree,form" view_type="form"/>
|
||||
|
||||
<record id="board_account_form" model="ir.ui.view">
|
||||
<field name="name">board.account.form</field>
|
||||
<field name="model">board.board</field>
|
||||
@@ -38,25 +28,12 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Board">
|
||||
<hpaned>
|
||||
|
||||
<child1>
|
||||
|
||||
<action colspan="4" height="160" name="%(hr_timesheet_invoice.action_analytic_account_tree)d" string="Analytic accounts to close" width="510"/>
|
||||
|
||||
<action colspan="4" height="160" name="%(act_my_account)d" string="Accounts to invoice" width="510"/>
|
||||
|
||||
<action colspan="4" height="160" name="%(account.action_invoice_tree1)d" string="Draft Customer Invoices" domain="[('state','=','draft'),('type','=','out_invoice')]"/>
|
||||
</child1>
|
||||
|
||||
<child2>
|
||||
<button colspan="4" icon="terp-purchase" name="%(account_report.action_account_report_tree_view_indicator)d" string="My indicators" type="action"/>
|
||||
|
||||
<action colspan="4" height="220" name="%(action_account_analytic_line_to_invoice)d" string="Costs to invoice"/>
|
||||
|
||||
<action colspan="4" height="220" name="%(action_aged_receivable)d" string="Aged receivables"/>
|
||||
|
||||
<action colspan="4" height="220" name="%(action_aged_income)d" string="Aged income"/>
|
||||
|
||||
</child2>
|
||||
</hpaned>
|
||||
</form>
|
||||
@@ -71,9 +48,8 @@
|
||||
<field name="usage">menu</field>
|
||||
<field name="view_id" ref="board_account_form"/>
|
||||
</record>
|
||||
<menuitem icon="terp-graph" id="base.dashboard" name="Dashboards" sequence="2" parent="base.reporting_menu"/>
|
||||
<menuitem id="next_id_68" name="Accounting" parent="base.dashboard"
|
||||
groups="account.group_account_manager"/>
|
||||
<menuitem action="open_board_account" icon="terp-graph" id="menu_board_account" parent="next_id_68" sequence="1"/>
|
||||
|
||||
<menuitem icon="terp-graph" id="menu_dashboard_acc" name="Dashboard" sequence="2" parent="account.menu_finance_reporting"/>
|
||||
<menuitem action="open_board_account" icon="terp-graph" id="menu_board_account" parent="menu_dashboard_acc" sequence="1"/>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,7 +15,7 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -28,8 +28,10 @@ class res_company(osv.osv):
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'overdue_msg': lambda *a: 'Would your payment have been carried \
|
||||
'overdue_msg': 'Would your payment have been carried \
|
||||
out after this mail was sent, please consider the present one as \
|
||||
void. Do not hesitate to contact our accounting department'
|
||||
}
|
||||
res_company()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,72 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data>
|
||||
|
||||
<!-- Types -->
|
||||
<record model="account.account.type" id="conf_account_type_receivable" >
|
||||
<field name="name">Receivable</field>
|
||||
<field name="code">receivable</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<!-- Types -->
|
||||
<record model="account.account.type" id="conf_account_type_receivable" >
|
||||
<field name="name">Receivable</field>
|
||||
<field name="code">receivable</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_payable" >
|
||||
<field name="name">Payable</field>
|
||||
<field name="code">payable</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_payable" >
|
||||
<field name="name">Payable</field>
|
||||
<field name="code">payable</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_view">
|
||||
<field name="name">View</field>
|
||||
<field name="code">view</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_view">
|
||||
<field name="name">View</field>
|
||||
<field name="code">view</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_income" >
|
||||
<field name="name">Income</field>
|
||||
<field name="code">income</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_income" >
|
||||
<field name="name">Income</field>
|
||||
<field name="code">income</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_expense">
|
||||
<field name="name">Expense</field>
|
||||
<field name="code">expense</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_expense">
|
||||
<field name="name">Expense</field>
|
||||
<field name="code">expense</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_tax">
|
||||
<field name="name">Tax</field>
|
||||
<field name="code">tax</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_tax">
|
||||
<field name="name">Tax</field>
|
||||
<field name="code">tax</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_cash">
|
||||
<field name="name">Cash</field>
|
||||
<field name="code">cash</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_cash">
|
||||
<field name="name">Cash</field>
|
||||
<field name="code">cash</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_asset">
|
||||
<field name="name">Asset</field>
|
||||
<field name="code">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_asset">
|
||||
<field name="name">Asset</field>
|
||||
<field name="code">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_equity">
|
||||
<field name="name">Equity</field>
|
||||
<field name="code">equity</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_equity">
|
||||
<field name="name">Equity</field>
|
||||
<field name="code">equity</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_bnk">
|
||||
<field name="name">Bank</field>
|
||||
<field name="code">bank</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_chk">
|
||||
<field name="name">Check</field>
|
||||
<field name="code">check</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_bnk">
|
||||
<field name="name">Bank</field>
|
||||
<field name="code">bank</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_chk">
|
||||
<field name="name">Check</field>
|
||||
<field name="code">check</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<!-- Balance Sheet -->
|
||||
|
||||
<record id="conf_bal" model="account.account.template">
|
||||
<field name="code">1</field>
|
||||
<field name="code">1</field>
|
||||
<field name="name">Balance Sheet</field>
|
||||
<field ref="conf_chart0" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -90,7 +90,7 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_fas" model="account.account.template">
|
||||
<field name="code">10</field>
|
||||
<field name="code">10</field>
|
||||
<field name="name">Fixed Assets</field>
|
||||
<field ref="conf_bal" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -98,7 +98,7 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_xfa" model="account.account.template">
|
||||
<field name="code">100</field>
|
||||
<field name="code">100</field>
|
||||
<field name="name">Fixed Asset Account</field>
|
||||
<field ref="conf_fas" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
@@ -106,7 +106,7 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_nca" model="account.account.template">
|
||||
<field name="code">11</field>
|
||||
<field name="code">11</field>
|
||||
<field name="name">Net Current Assets</field>
|
||||
<field ref="conf_bal" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -114,9 +114,9 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_cas" model="account.account.template">
|
||||
<field name="code">110</field>
|
||||
<field name="code">110</field>
|
||||
<field name="name">Current Assets</field>
|
||||
<field ref="conf_nca" name="parent_id"/>
|
||||
<field ref="conf_nca" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="conf_account_type_view"/>
|
||||
</record>
|
||||
@@ -143,7 +143,7 @@
|
||||
</record> -->
|
||||
|
||||
<record id="conf_ova" model="account.account.template">
|
||||
<field name="code">1103</field>
|
||||
<field name="code">1103</field>
|
||||
<field name="name">Output VAT</field>
|
||||
<field ref="conf_cas" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
@@ -151,7 +151,7 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_bnk" model="account.account.template">
|
||||
<field name="code">1104</field>
|
||||
<field name="code">1104</field>
|
||||
<field name="name">Bank Current Account</field>
|
||||
<field ref="conf_cas" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -167,7 +167,7 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_cli" model="account.account.template">
|
||||
<field name="code">111</field>
|
||||
<field name="code">111</field>
|
||||
<field name="name">Current Liabilities</field>
|
||||
<field ref="conf_nca" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -188,7 +188,7 @@
|
||||
</record>-->
|
||||
|
||||
<record id="conf_iva" model="account.account.template">
|
||||
<field name="code">1112</field>
|
||||
<field name="code">1112</field>
|
||||
<field name="name">Input VAT</field>
|
||||
<field ref="conf_cli" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
@@ -198,7 +198,7 @@
|
||||
<!-- Profit and Loss -->
|
||||
|
||||
<record id="conf_gpf" model="account.account.template">
|
||||
<field name="code">2</field>
|
||||
<field name="code">2</field>
|
||||
<field name="name">Profit and Loss</field>
|
||||
<field ref="conf_chart0" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -206,7 +206,7 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_rev" model="account.account.template">
|
||||
<field name="code">20</field>
|
||||
<field name="code">20</field>
|
||||
<field name="name">Revenue</field>
|
||||
<field ref="conf_gpf" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -226,7 +226,7 @@
|
||||
</record> -->
|
||||
|
||||
<record id="conf_cos" model="account.account.template">
|
||||
<field name="code">21</field>
|
||||
<field name="code">21</field>
|
||||
<field name="name">Cost of Sales</field>
|
||||
<field ref="conf_gpf" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -242,7 +242,7 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_ovr" model="account.account.template">
|
||||
<field name="code">22</field>
|
||||
<field name="code">22</field>
|
||||
<field name="name">Overheads</field>
|
||||
<field ref="conf_gpf" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -381,22 +381,22 @@
|
||||
<field name="parent_id" ref="vat_code_base_sales"/>
|
||||
</record>
|
||||
|
||||
<record id="configurable_chart_template" model="account.chart.template">
|
||||
<record id="configurable_chart_template" model="account.chart.template">
|
||||
<field name="name">Configurable Account Chart Template</field>
|
||||
<field name="account_root_id" ref="conf_chart0"/>
|
||||
<field name="tax_code_root_id" ref="vat_code_chart_root"/>
|
||||
<field name="bank_account_view_id" ref="conf_bnk"/>
|
||||
<field name="bank_account_view_id" ref="conf_bnk"/>
|
||||
<field name="property_account_receivable" ref="conf_a_recv"/>
|
||||
<field name="property_account_payable" ref="conf_a_pay"/>
|
||||
<field name="property_account_expense_categ" ref="conf_a_expense"/>
|
||||
<field name="property_account_income_categ" ref="conf_a_sale"/>
|
||||
</record>
|
||||
|
||||
<!-- VAT Codes -->
|
||||
<!-- VAT Codes -->
|
||||
<!-- Purchases + Input VAT -->
|
||||
|
||||
<record id="ivats" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT S</field>
|
||||
<field eval="0.15" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -410,7 +410,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ivatr" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT R</field>
|
||||
<field eval="0.005" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -424,7 +424,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ivatz" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT Z</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -434,7 +434,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ivatx" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT X</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -444,7 +444,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ivato" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT O</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -456,7 +456,7 @@
|
||||
<!-- Sales + Output VAT -->
|
||||
|
||||
<record id="ovats" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT S</field>
|
||||
<field eval="0.15" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -470,7 +470,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ovatr" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT R</field>
|
||||
<field eval="0.005" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -484,7 +484,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ovatz" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT Z</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -494,7 +494,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ovatx" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT X</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -504,7 +504,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ovato" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT O</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
|
||||
@@ -14,31 +14,48 @@
|
||||
<record id="account_type_asset" model="account.account.type">
|
||||
<field name="name">Asset</field>
|
||||
<field name="code">asset</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="account_type_receivable" model="account.account.type">
|
||||
<field name="name">Receivable</field>
|
||||
<field name="code">receivable</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record id="account_type_liability" model="account.account.type">
|
||||
<field name="name">Liability</field>
|
||||
<field name="name">Liability</field>
|
||||
<field name="code">liability</field>
|
||||
<field name="report_type">liability</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="account_type_payable" model="account.account.type">
|
||||
<field name="name">Payable</field>
|
||||
<field name="code">payable</field>
|
||||
<field name="report_type">liability</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record id="account_type_income" model="account.account.type">
|
||||
<field name="name">Income</field>
|
||||
<field name="code">income</field>
|
||||
<field name="report_type">income</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record id="account_type_expense" model="account.account.type">
|
||||
<field name="name">Expense</field>
|
||||
<field name="code">expense</field>
|
||||
<field name="report_type">expense</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record id="account_type_cash_equity" model="account.account.type">
|
||||
<field name="name">Equity</field>
|
||||
<field name="name">Equity</field>
|
||||
<field name="code">equity</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="account_type_income" model="account.account.type">
|
||||
<field name="name">Income</field>
|
||||
<field name="code">income</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record id="account_type_expense" model="account.account.type">
|
||||
<field name="name">Expense</field>
|
||||
<field name="code">expense</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record id="account_type_cash_moves" model="account.account.type">
|
||||
<field name="name">Cash</field>
|
||||
<field name="name">Cash</field>
|
||||
<field name="code">cash</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
@@ -65,7 +82,7 @@ your own accounts.
|
||||
<field eval="ref('minimal_0')" name="parent_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="True" name="reconcile"/>
|
||||
<field name="user_type" ref="account_type_income"/>
|
||||
<field name="user_type" ref="account_type_receivable"/>
|
||||
<field name="note">
|
||||
This chart of account is used for automated testing purpose. It is installed
|
||||
only if you selected demo data during your database creation. Modules can
|
||||
@@ -75,12 +92,12 @@ your own chart of account.
|
||||
</record>
|
||||
<record id="a_pay" model="account.account">
|
||||
<field name="name">Main Payable</field>
|
||||
<field name="code">x 440000</field>
|
||||
<field name="code">x 44000</field>
|
||||
<field name="type">payable</field>
|
||||
<field eval="ref('minimal_0')" name="parent_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="True" name="reconcile"/>
|
||||
<field name="user_type" ref="account_type_expense"/>
|
||||
<field name="user_type" ref="account_type_payable"/>
|
||||
<field name="note">
|
||||
This chart of account is used for automated testing purpose. It is installed
|
||||
only if you selected demo data during your database creation. Modules can
|
||||
@@ -90,7 +107,7 @@ your own chart of account.
|
||||
</record>
|
||||
<record id="cash" model="account.account">
|
||||
<field name="name">Petty Cash</field>
|
||||
<field name="code">x 570000</field>
|
||||
<field name="code">x 57000</field>
|
||||
<field name="type">other</field>
|
||||
<field eval="ref('minimal_0')" name="parent_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
@@ -104,7 +121,7 @@ your own chart of account.
|
||||
</record>
|
||||
<record id="a_expense" model="account.account">
|
||||
<field name="name">Products Purchase</field>
|
||||
<field name="code">x 600000</field>
|
||||
<field name="code">x 60000</field>
|
||||
<field name="type">other</field>
|
||||
<field eval="ref('minimal_0')" name="parent_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
@@ -118,11 +135,11 @@ your own chart of account.
|
||||
</record>
|
||||
<record id="a_sale" model="account.account">
|
||||
<field name="name">Products Sales</field>
|
||||
<field name="code">x 701000</field>
|
||||
<field name="code">x 70000</field>
|
||||
<field name="type">other</field>
|
||||
<field eval="ref('minimal_0')" name="parent_id"/>
|
||||
<field name="user_type" ref="account_type_income"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="user_type" ref="account_type_income"/>
|
||||
<field name="note">
|
||||
This chart of account is used for automated testing purpose. It is installed
|
||||
only if you selected demo data during your database creation. Modules can
|
||||
@@ -162,6 +179,7 @@ your own chart of account.
|
||||
<field name="type">sale</field>
|
||||
<field name="view_id" ref="account_journal_view"/>
|
||||
<field name="sequence_id" ref="sequence_sale_journal"/>
|
||||
<field name="invoice_sequence_id" ref="seq_type_out_invoice"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="a_sale"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="a_sale"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
@@ -169,7 +187,7 @@ your own chart of account.
|
||||
<record id="refund_sales_journal" model="account.journal">
|
||||
<field name="name">x Sales Credit Note Journal</field>
|
||||
<field name="code">SCNJ</field>
|
||||
<field name="type">sale</field>
|
||||
<field name="type">sale_refund</field>
|
||||
<field name="refund_journal">True</field>
|
||||
<field name="view_id" ref="account_journal_view"/>
|
||||
<field name="sequence_id" ref="sequence_sale_journal"/>
|
||||
@@ -184,6 +202,7 @@ your own chart of account.
|
||||
<field name="type">purchase</field>
|
||||
<field name="view_id" ref="account_journal_view"/>
|
||||
<field name="sequence_id" ref="sequence_purchase_journal"/>
|
||||
<field name="invoice_sequence_id" ref="seq_type_in_invoice"/>
|
||||
<field model="account.account" name="default_debit_account_id" ref="a_expense"/>
|
||||
<field model="account.account" name="default_credit_account_id" ref="a_expense"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
@@ -191,7 +210,7 @@ your own chart of account.
|
||||
<record id="refund_expenses_journal" model="account.journal">
|
||||
<field name="name">x Expenses Credit Notes Journal</field>
|
||||
<field name="code">ECNJ</field>
|
||||
<field name="type">purchase</field>
|
||||
<field name="type">purchase_refund</field>
|
||||
<field name="refund_journal">True</field>
|
||||
<field name="view_id" ref="account_journal_view"/>
|
||||
<field name="sequence_id" ref="sequence_purchase_journal"/>
|
||||
@@ -224,17 +243,17 @@ your own chart of account.
|
||||
<!--
|
||||
Product income and expense accounts, default parameters
|
||||
-->
|
||||
|
||||
|
||||
<record id="property_account_expense_prd" model="ir.property">
|
||||
<field name="name">property_account_expense</field>
|
||||
<field name="fields_id" search="[('model','=','product.template'),('name','=','property_account_expense')]"/>
|
||||
<field eval="False" name="value"/>
|
||||
<field eval="'account.account,'+str(ref('account.a_expense'))" name="value"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
</record>
|
||||
<record id="property_account_income_prd" model="ir.property">
|
||||
<field name="name">property_account_income</field>
|
||||
<field name="fields_id" search="[('model','=','product.template'),('name','=','property_account_income')]"/>
|
||||
<field eval="False" name="value"/>
|
||||
<field eval="'account.account,'+str(ref('account.a_sale'))" name="value"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
</record>
|
||||
<record id="property_account_expense_categ" model="ir.property">
|
||||
|
||||
@@ -5794,3 +5794,332 @@ msgstr ""
|
||||
msgid "Compute Entry Dates"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Analytic accounts to close"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Draft invoices"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.open_board_account
|
||||
#: model:ir.ui.menu,name:account.menu_board_account
|
||||
msgid "Accounting Dashboard"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:account.act_my_account
|
||||
msgid "Accounts to invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:account.action_account_analytic_line_to_invoice
|
||||
msgid "Costs to invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Aged receivables"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:account.module_meta_information
|
||||
msgid "Board for accountant"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.action_aged_income
|
||||
msgid "Income Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "My indicators"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Account Board"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Aged income"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,show_columns:0
|
||||
msgid "Show Debit/Credit Information"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,account_choice:0
|
||||
msgid "All accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Entries Selection Based on"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid "Notification"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Financial Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.report.xml,name:account.account_account_balance
|
||||
#: model:ir.actions.report.xml,name:account.account_account_balance_landscape
|
||||
msgid "Account balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Period(s)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Percentage"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Compare Selected Years In Terms Of"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Fiscal Year(s)(Maximum Three Years)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,select_account:0
|
||||
msgid "Select Reference Account(for % comparision)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.wizard,name:account.wizard_account_balance_report
|
||||
msgid "Account balance-Compare Years"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,description:account.module_meta_information
|
||||
msgid ""
|
||||
"Account Balance Module is an added functionality to the Financial Management "
|
||||
"module.\n"
|
||||
"\n"
|
||||
" This module gives you the various options for printing balance sheet.\n"
|
||||
"\n"
|
||||
" 1. You can compare the balance sheet for different years.\n"
|
||||
"\n"
|
||||
" 2. You can set the cash or percentage comparison between two years.\n"
|
||||
"\n"
|
||||
" 3. You can set the referential account for the percentage comparison for "
|
||||
"particular years.\n"
|
||||
"\n"
|
||||
" 4. You can select periods as an actual date or periods as creation "
|
||||
"date.\n"
|
||||
"\n"
|
||||
" 5. You have an option to print the desired report in Landscape format.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "You have to select 'Landscape' option. Please Check it."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,landscape:0
|
||||
msgid "Show Report in Landscape Form"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: rml:account.account.balance.landscape:0
|
||||
#: rml:account.balance.account.balance:0
|
||||
msgid "Total :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,format_perc:0
|
||||
msgid "Show Comparision in %"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Report Options"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Don't Compare"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,account_choice:0
|
||||
msgid "Show Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "1. You have selected more than 3 years in any case."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:account.module_meta_information
|
||||
msgid "Accounting and financial management-Compare Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: rml:account.account.balance.landscape:0
|
||||
#: rml:account.balance.account.balance:0
|
||||
msgid "Year :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "You can select maximum 3 years. Please check again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"3. You have selected 'Percentage' option with more than 2 years, but you "
|
||||
"have not selected landscape format."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"You might have done following mistakes. Please correct them and try again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: help:account.balance.account.balance.report,init,select_account:0
|
||||
msgid "Keep empty for comparision to its parent"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Creation Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"2. You have not selected 'Percentage' option, but you have selected more "
|
||||
"than 2 years."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid ""
|
||||
"You may have selected the compare options with more than 1 year with credit/"
|
||||
"debit columns and % option.This can lead contents to be printed out of the "
|
||||
"paper.Please try again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid "You have to select at least 1 Fiscal Year. Try again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Customize Report"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:report.aged.receivable,name:0
|
||||
msgid "Month Range"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_view_created_invoice_dashboard
|
||||
msgid "Invoices Created Within Past 15 Days"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_invoice_created
|
||||
msgid "Report of Invoices Created within Last 15 days"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:report.invoice.created:0
|
||||
msgid "Total Amount"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:report.account.receivable:0
|
||||
msgid "Accounts by type"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_aged_receivable
|
||||
msgid "Aged Receivable Till Today"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_account_receivable
|
||||
msgid "Receivable accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:temp.range,name:0
|
||||
msgid "Range"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,description:report_account.module_meta_information
|
||||
msgid "A module that adds new reports based on the account module."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:report_account.module_meta_information
|
||||
msgid "Account Reporting - Reporting"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_account_receivable_graph
|
||||
#: model:ir.ui.menu,name:report_account.menu_account_receivable_graph
|
||||
msgid "Balance by Type of Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:report.account.receivable,name:0
|
||||
msgid "Week of Year"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:report.invoice.created,create_date:0
|
||||
msgid "Create Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_aged_receivable_graph
|
||||
#: view:report.aged.receivable:0
|
||||
msgid "Aged Receivable"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:report.invoice.created:0
|
||||
msgid "Untaxed Amount"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+535
-418
File diff suppressed because it is too large
Load Diff
+542
-431
File diff suppressed because it is too large
Load Diff
+353
-13
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-02-12 13:05+0000\n"
|
||||
"Last-Translator: adnan <adnankraljic@yahoo.com>\n"
|
||||
"PO-Revision-Date: 2010-07-07 08:48+0000\n"
|
||||
"Last-Translator: Bojan Markovic <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:05+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-08 03:50+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -319,7 +319,7 @@ msgstr "Izvor"
|
||||
#. module: account
|
||||
#: rml:account.analytic.account.journal:0
|
||||
msgid "Move Name"
|
||||
msgstr ""
|
||||
msgstr "Pomjeri ime"
|
||||
|
||||
#. module: account
|
||||
#: xsl:account.transfer:0
|
||||
@@ -365,7 +365,7 @@ msgstr "Analitičko konto"
|
||||
#: field:account.tax,child_depend:0
|
||||
#: field:account.tax.template,child_depend:0
|
||||
msgid "Tax on Children"
|
||||
msgstr ""
|
||||
msgstr "Dječiji porez"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.central.journal:0
|
||||
@@ -942,7 +942,7 @@ msgstr "Količina"
|
||||
#: wizard_field:account.partner.balance.report,init,date2:0
|
||||
#: wizard_field:account.third_party_ledger.report,init,date2:0
|
||||
msgid "End date"
|
||||
msgstr ""
|
||||
msgstr "Krajnji datum"
|
||||
|
||||
#. module: account
|
||||
#: field:account.invoice.tax,base_amount:0
|
||||
@@ -2148,9 +2148,10 @@ msgid "Analytic Entry"
|
||||
msgstr "Stavka analitike"
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
msgstr "Poruka o dospjelim plaćanjima."
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.action_tax_code_tree
|
||||
@@ -2803,6 +2804,9 @@ msgid ""
|
||||
"higher ones. The order is important if you have a tax that has several tax "
|
||||
"children. In this case, the evaluation order is important."
|
||||
msgstr ""
|
||||
"Polje sekvence koristi se da se poredaju porezni retci od najniže sekvence "
|
||||
"prema višima. Red je bitan ako imate porez koji ima više podporeza. U ovom "
|
||||
"slućaju, redosljed evaluacije je bitan."
|
||||
|
||||
#. module: account
|
||||
#: field:account.journal.column,view_id:0
|
||||
@@ -3457,7 +3461,7 @@ msgstr "Današnji datum"
|
||||
msgid ""
|
||||
"The amount expressed in an optional other currency if it is a multi-currency "
|
||||
"entry."
|
||||
msgstr ""
|
||||
msgstr "Iznos izražen u opcionalnoj drugoj valuti ako je viševalutni unos."
|
||||
|
||||
#. module: account
|
||||
#: field:account.tax,parent_id:0
|
||||
@@ -3617,6 +3621,8 @@ msgid ""
|
||||
"This payment term will be used instead of the default one for the current "
|
||||
"partner"
|
||||
msgstr ""
|
||||
"Ovi uvjeti plaćanja će se koristiti umjesto podrazumijevanih za trenutnog "
|
||||
"partnera."
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.invoice.pay,addendum,comment:0
|
||||
@@ -4019,7 +4025,7 @@ msgstr "Konto za povrat poreza"
|
||||
#: field:account.tax.code,child_ids:0
|
||||
#: field:account.tax.code.template,child_ids:0
|
||||
msgid "Child Codes"
|
||||
msgstr ""
|
||||
msgstr "Podšifre"
|
||||
|
||||
#. module: account
|
||||
#: field:account.invoice,move_name:0
|
||||
@@ -4195,6 +4201,8 @@ msgid ""
|
||||
"reports, so that you can see positive figures instead of negative ones in "
|
||||
"expenses accounts."
|
||||
msgstr ""
|
||||
"Omogućuje da mijenjate predznak bilanse prikazane na izvještaju, tako da "
|
||||
"vidite pozitivne iznose (umjesto negativnih) na kontima troškova"
|
||||
|
||||
#. module: account
|
||||
#: help:account.config.wizard,code:0
|
||||
@@ -4412,7 +4420,7 @@ msgstr "Datoteka izvoda"
|
||||
#. module: account
|
||||
#: view:ir.sequence:0
|
||||
msgid "Fiscal Year Sequences"
|
||||
msgstr ""
|
||||
msgstr "Sekvenca fiskalne godine"
|
||||
|
||||
#. module: account
|
||||
#: view:account.model.line:0
|
||||
@@ -4591,7 +4599,7 @@ msgstr "Unos stavaka po prijenosu"
|
||||
#. module: account
|
||||
#: wizard_view:account.analytic.account.chart,init:0
|
||||
msgid "Analytic Account Charts"
|
||||
msgstr ""
|
||||
msgstr "Analitički kontni planovi"
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.aged.trial.balance,init,result_selection:0
|
||||
@@ -5300,7 +5308,7 @@ msgstr "Jeste li sigurni?"
|
||||
#: rml:account.invoice:0
|
||||
#: view:account.invoice:0
|
||||
msgid "PRO-FORMA"
|
||||
msgstr "Predračun"
|
||||
msgstr "PRO-FORMA"
|
||||
|
||||
#. module: account
|
||||
#: field:account.move.reconcile,line_partial_ids:0
|
||||
@@ -5866,6 +5874,8 @@ msgid ""
|
||||
"This account will be used to value outgoing stock for the current product "
|
||||
"category"
|
||||
msgstr ""
|
||||
"Ovaj konto će se koristiti za vrijednost izlazne količine trenutne "
|
||||
"kategorije proizvoda"
|
||||
|
||||
#. module: account
|
||||
#: help:account.tax,base_sign:0
|
||||
@@ -5973,3 +5983,333 @@ msgstr "Provjeri da li je korisniku dozvoljeno poravnavanje unosa na kontu."
|
||||
#: wizard_button:account.subscription.generate,init,generate:0
|
||||
msgid "Compute Entry Dates"
|
||||
msgstr "Izračunaj datume stavaka"
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Analytic accounts to close"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Draft invoices"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.open_board_account
|
||||
#: model:ir.ui.menu,name:account.menu_board_account
|
||||
msgid "Accounting Dashboard"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:account.act_my_account
|
||||
msgid "Accounts to invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:account.action_account_analytic_line_to_invoice
|
||||
msgid "Costs to invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Aged receivables"
|
||||
msgstr "Zastarjela potraživanja"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:account.module_meta_information
|
||||
msgid "Board for accountant"
|
||||
msgstr "Tabla za računovođu"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.action_aged_income
|
||||
msgid "Income Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "My indicators"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Account Board"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Aged income"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,show_columns:0
|
||||
msgid "Show Debit/Credit Information"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,account_choice:0
|
||||
msgid "All accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Entries Selection Based on"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid "Notification"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Financial Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.report.xml,name:account.account_account_balance
|
||||
#: model:ir.actions.report.xml,name:account.account_account_balance_landscape
|
||||
msgid "Account balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Period(s)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Percentage"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Compare Selected Years In Terms Of"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Fiscal Year(s)(Maximum Three Years)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,select_account:0
|
||||
msgid "Select Reference Account(for % comparision)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.wizard,name:account.wizard_account_balance_report
|
||||
msgid "Account balance-Compare Years"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,description:account.module_meta_information
|
||||
msgid ""
|
||||
"Account Balance Module is an added functionality to the Financial Management "
|
||||
"module.\n"
|
||||
"\n"
|
||||
" This module gives you the various options for printing balance sheet.\n"
|
||||
"\n"
|
||||
" 1. You can compare the balance sheet for different years.\n"
|
||||
"\n"
|
||||
" 2. You can set the cash or percentage comparison between two years.\n"
|
||||
"\n"
|
||||
" 3. You can set the referential account for the percentage comparison for "
|
||||
"particular years.\n"
|
||||
"\n"
|
||||
" 4. You can select periods as an actual date or periods as creation "
|
||||
"date.\n"
|
||||
"\n"
|
||||
" 5. You have an option to print the desired report in Landscape format.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "You have to select 'Landscape' option. Please Check it."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,landscape:0
|
||||
msgid "Show Report in Landscape Form"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: rml:account.account.balance.landscape:0
|
||||
#: rml:account.balance.account.balance:0
|
||||
msgid "Total :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,format_perc:0
|
||||
msgid "Show Comparision in %"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Report Options"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Don't Compare"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,account_choice:0
|
||||
msgid "Show Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "1. You have selected more than 3 years in any case."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:account.module_meta_information
|
||||
msgid "Accounting and financial management-Compare Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: rml:account.account.balance.landscape:0
|
||||
#: rml:account.balance.account.balance:0
|
||||
msgid "Year :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "You can select maximum 3 years. Please check again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"3. You have selected 'Percentage' option with more than 2 years, but you "
|
||||
"have not selected landscape format."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"You might have done following mistakes. Please correct them and try again."
|
||||
msgstr ""
|
||||
"Možda ste napravili sljedeće pogreške. Ispravite ih i pokušajte ponovno."
|
||||
|
||||
#. module: account
|
||||
#: help:account.balance.account.balance.report,init,select_account:0
|
||||
msgid "Keep empty for comparision to its parent"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Creation Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"2. You have not selected 'Percentage' option, but you have selected more "
|
||||
"than 2 years."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid ""
|
||||
"You may have selected the compare options with more than 1 year with "
|
||||
"credit/debit columns and % option.This can lead contents to be printed out "
|
||||
"of the paper.Please try again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid "You have to select at least 1 Fiscal Year. Try again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Customize Report"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:report.aged.receivable,name:0
|
||||
msgid "Month Range"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_view_created_invoice_dashboard
|
||||
msgid "Invoices Created Within Past 15 Days"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_invoice_created
|
||||
msgid "Report of Invoices Created within Last 15 days"
|
||||
msgstr "Izvještaj o fakturama unesenim u zadnjih 15 dana"
|
||||
|
||||
#. module: account
|
||||
#: view:report.invoice.created:0
|
||||
msgid "Total Amount"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:report.account.receivable:0
|
||||
msgid "Accounts by type"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_aged_receivable
|
||||
msgid "Aged Receivable Till Today"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_account_receivable
|
||||
msgid "Receivable accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:temp.range,name:0
|
||||
msgid "Range"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,description:report_account.module_meta_information
|
||||
msgid "A module that adds new reports based on the account module."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:report_account.module_meta_information
|
||||
msgid "Account Reporting - Reporting"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_account_receivable_graph
|
||||
#: model:ir.ui.menu,name:report_account.menu_account_receivable_graph
|
||||
msgid "Balance by Type of Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:report.account.receivable,name:0
|
||||
msgid "Week of Year"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:report.invoice.created,create_date:0
|
||||
msgid "Create Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_aged_receivable_graph
|
||||
#: view:report.aged.receivable:0
|
||||
msgid "Aged Receivable"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:report.invoice.created:0
|
||||
msgid "Untaxed Amount"
|
||||
msgstr ""
|
||||
|
||||
+565
-425
File diff suppressed because it is too large
Load Diff
+662
-566
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:05+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:04+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -2146,7 +2146,8 @@ msgid "Analytic Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+559
-419
File diff suppressed because it is too large
Load Diff
+602
-509
File diff suppressed because it is too large
Load Diff
+413
-50
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-04-11 21:46+0000\n"
|
||||
"Last-Translator: Juan Eduardo Riva <juaneduardoriva@gmail.com>\n"
|
||||
"PO-Revision-Date: 2010-06-29 22:11+0000\n"
|
||||
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:07+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-01 03:45+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -60,7 +60,7 @@ msgstr "Nombre de modelo inválido en la definición de acción."
|
||||
#. module: account
|
||||
#: help:account.journal,currency:0
|
||||
msgid "The currency used to enter statement"
|
||||
msgstr "La moneda utilizada para introducir asientos"
|
||||
msgstr "La divisa utilizada para introducir asientos."
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account_use_models,init_form:0
|
||||
@@ -456,7 +456,7 @@ msgstr "Estado"
|
||||
#: model:ir.actions.act_window,name:account.action_invoice_tree13
|
||||
#: model:ir.ui.menu,name:account.menu_action_invoice_tree13
|
||||
msgid "Unpaid Supplier Refunds"
|
||||
msgstr "Facturas de abono de proveedor sin pagar"
|
||||
msgstr "Facturas rectificativas (abono) de proveedor sin pagar"
|
||||
|
||||
#. module: account
|
||||
#: view:account.tax:0
|
||||
@@ -805,7 +805,7 @@ msgstr "Cuenta de la empresa"
|
||||
#. module: account
|
||||
#: wizard_view:account.subscription.generate,init:0
|
||||
msgid "Generate entries before:"
|
||||
msgstr "Generar asientos antes:"
|
||||
msgstr "Generar asientos hasta:"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.analytic.account.cost_ledger:0
|
||||
@@ -1232,10 +1232,10 @@ msgid ""
|
||||
"software system you may have to use the rate at date. Incoming transactions "
|
||||
"always use the rate at date."
|
||||
msgstr ""
|
||||
"Permite seleccionar la forma en que la tasa de la moneda actual de las "
|
||||
"transacciones de salida se calcula. En la mayoría de los países el método "
|
||||
"legal es \"Promedio\", pero sólo unos pocos sistemas de software son capaces "
|
||||
"de gestionarlo. Por lo tanto, si la importación procede de otro sistema de "
|
||||
"Permite seleccionar la forma en que se calcula la tasa de la divisa actual "
|
||||
"en las transacciones de salida. En la mayoría de los países el método legal "
|
||||
"es \"Promedio\", pero sólo unos pocos sistemas de software son capaces de "
|
||||
"gestionarlo. Por lo tanto, si la importación procede de otro sistema de "
|
||||
"software, es posible que tenga que utilizar la tasa \"En fecha\". Las "
|
||||
"transacciones de entrada siempre utilizan la tasa \"En fecha\"."
|
||||
|
||||
@@ -1887,7 +1887,7 @@ msgstr "Fecha inicial"
|
||||
#. module: account
|
||||
#: model:account.journal,name:account.refund_expenses_journal
|
||||
msgid "x Expenses Credit Notes Journal"
|
||||
msgstr "x Diario facturas de abono de gastos"
|
||||
msgstr "x Diario facturas rectificativas (abono) de gastos"
|
||||
|
||||
#. module: account
|
||||
#: field:account.analytic.journal,type:0
|
||||
@@ -1914,7 +1914,7 @@ msgstr "Base imponible"
|
||||
#: field:account.tax,account_collected_id:0
|
||||
#: field:account.tax.template,account_collected_id:0
|
||||
msgid "Invoice Tax Account"
|
||||
msgstr "Cuenta impuestos de factura"
|
||||
msgstr "Cuenta impuestos de facturas"
|
||||
|
||||
#. module: account
|
||||
#: view:account.move.line:0
|
||||
@@ -2026,7 +2026,7 @@ msgstr "Informe analítico de diario"
|
||||
#: model:ir.actions.act_window,name:account.action_invoice_tree3
|
||||
#: model:ir.ui.menu,name:account.menu_action_invoice_tree3
|
||||
msgid "Customer Refunds"
|
||||
msgstr "Facturas de abono de cliente"
|
||||
msgstr "Facturas rectificativas (abono) de cliente"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.vat.declaration:0
|
||||
@@ -2047,7 +2047,7 @@ msgstr "Nombre diario-período"
|
||||
#: field:account.tax.code,name:0
|
||||
#: field:account.tax.code.template,name:0
|
||||
msgid "Tax Case Name"
|
||||
msgstr "Nombre impuesto del caso"
|
||||
msgstr "Nombre código de impuesto"
|
||||
|
||||
#. module: account
|
||||
#: help:account.journal,entry_posted:0
|
||||
@@ -2114,7 +2114,7 @@ msgstr "Comentario situacion fiscal"
|
||||
#. module: account
|
||||
#: wizard_field:account.fiscalyear.close,init,period_id:0
|
||||
msgid "Opening Entries Period"
|
||||
msgstr "Periodo asientos de apertura"
|
||||
msgstr "Período asientos de apertura"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.wizard,name:account.wizard_validate_account_moves
|
||||
@@ -2145,7 +2145,7 @@ msgstr "Anterior"
|
||||
#: field:account.model.line,currency_id:0
|
||||
#: field:account.move.line,currency_id:0
|
||||
msgid "Currency"
|
||||
msgstr "Moneda"
|
||||
msgstr "Divisa"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.act_account_journal_2_account_invoice_opened
|
||||
@@ -2180,7 +2180,8 @@ msgid "Analytic Entry"
|
||||
msgstr "Asiento analítico"
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr "Mensaje pagos vencidos"
|
||||
|
||||
@@ -2224,7 +2225,7 @@ msgstr "Facturas de proveedor en borrador"
|
||||
#. module: account
|
||||
#: wizard_field:account.invoice.refund,init,period:0
|
||||
msgid "Force period"
|
||||
msgstr "Forzar periodo"
|
||||
msgstr "Forzar período"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.account.type,close_method:0
|
||||
@@ -2305,7 +2306,7 @@ msgstr "Fecha factura"
|
||||
#: help:account.third_party_ledger.report,init,periods:0
|
||||
#: help:account.vat.declaration,init,periods:0
|
||||
msgid "All periods if empty"
|
||||
msgstr "Todos los periodos si está vacío"
|
||||
msgstr "Todos los períodos si está vacío."
|
||||
|
||||
#. module: account
|
||||
#: model:account.account.type,name:account.account_type_liability
|
||||
@@ -2529,7 +2530,7 @@ msgstr "Asientos conciliados"
|
||||
#. module: account
|
||||
#: help:account.bank.statement.reconcile,total_second_amount:0
|
||||
msgid "The amount in the currency of the journal"
|
||||
msgstr "La cantidad en la moneda del diario"
|
||||
msgstr "El importe en la divisa del diario."
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.general.ledger.report,checktype,landscape:0
|
||||
@@ -2927,7 +2928,7 @@ msgstr "Estado abierto"
|
||||
#. module: account
|
||||
#: field:account.journal,entry_posted:0
|
||||
msgid "Skip 'Draft' State for Created Entries"
|
||||
msgstr "Omitir el estado 'Borrador ' para los asientos creados"
|
||||
msgstr "Omitir estado 'Borrador ' al crear asientos"
|
||||
|
||||
#. module: account
|
||||
#: field:account.invoice.tax,account_id:0
|
||||
@@ -2963,7 +2964,7 @@ msgstr "1cm 27.7cm 20cm 27.7cm"
|
||||
#: model:ir.actions.act_window,name:account.action_invoice_tree12
|
||||
#: model:ir.ui.menu,name:account.menu_action_invoice_tree12
|
||||
msgid "Draft Supplier Refunds"
|
||||
msgstr "Facturas de abono de proveedor en borrador"
|
||||
msgstr "Facturas rectificativas (abono) de proveedor en borrador"
|
||||
|
||||
#. module: account
|
||||
#: model:process.node,name:account.process_node_accountingstatemententries0
|
||||
@@ -3050,7 +3051,7 @@ msgstr "Tasa de divisas de salida"
|
||||
#: model:ir.actions.act_window,name:account.action_invoice_tree10
|
||||
#: model:ir.ui.menu,name:account.menu_action_invoice_tree10
|
||||
msgid "Draft Customer Refunds"
|
||||
msgstr "Facturas de abono de cliente en borrador"
|
||||
msgstr "Facturas rectificativas (abono) de cliente en borrador"
|
||||
|
||||
#. module: account
|
||||
#: field:account.journal.column,readonly:0
|
||||
@@ -3083,7 +3084,7 @@ msgstr "Documento"
|
||||
#. module: account
|
||||
#: help:account.move.line,move_id:0
|
||||
msgid "The move of this entry line."
|
||||
msgstr "El movimiento de esta línea del asiento."
|
||||
msgstr "El asiento de este apunte."
|
||||
|
||||
#. module: account
|
||||
#: field:account.invoice.line,uos_id:0
|
||||
@@ -3233,7 +3234,7 @@ msgstr "Diario de banco"
|
||||
#: selection:account.partner.balance.report,init,state:0
|
||||
#: selection:account.third_party_ledger.report,init,state:0
|
||||
msgid "By Date and Period"
|
||||
msgstr "Por fecha y periodo"
|
||||
msgstr "Por fecha y período"
|
||||
|
||||
#. module: account
|
||||
#: view:account.account:0
|
||||
@@ -3342,7 +3343,7 @@ msgstr "Nombre impuesto"
|
||||
#. module: account
|
||||
#: wizard_view:account.fiscalyear.close.state,init:0
|
||||
msgid " Close states of Fiscal year and periods"
|
||||
msgstr " Cerrar estados de ejercicio fiscal y periodos"
|
||||
msgstr " Cerrar estados de ejercicio fiscal y períodos"
|
||||
|
||||
#. module: account
|
||||
#: model:account.payment.term,name:account.account_payment_term
|
||||
@@ -3539,7 +3540,7 @@ msgstr "Titular de la cuenta bancaria"
|
||||
#: wizard_view:account.partner.balance.report,init:0
|
||||
#: wizard_view:account.third_party_ledger.report,init:0
|
||||
msgid "Filter on Periods"
|
||||
msgstr "Filtrar por periodos"
|
||||
msgstr "Filtrar por períodos"
|
||||
|
||||
#. module: account
|
||||
#: field:res.partner,property_account_receivable:0
|
||||
@@ -3607,7 +3608,7 @@ msgstr "Impreso"
|
||||
#: model:ir.actions.act_window,name:account.action_invoice_tree4_new
|
||||
#: model:ir.ui.menu,name:account.menu_action_invoice_tree4_new
|
||||
msgid "New Supplier Refund"
|
||||
msgstr "Nueva factura de abono de proveedor"
|
||||
msgstr "Nueva factura rectificativa (abono) de proveedor"
|
||||
|
||||
#. module: account
|
||||
#: view:account.model:0
|
||||
@@ -3617,7 +3618,7 @@ msgstr "Modelo de asiento"
|
||||
#. module: account
|
||||
#: wizard_field:account.general.ledger.report,checktype,amount_currency:0
|
||||
msgid "With Currency"
|
||||
msgstr "Con moneda"
|
||||
msgstr "Con divisa"
|
||||
|
||||
#. module: account
|
||||
#: view:account.account:0
|
||||
@@ -3678,7 +3679,7 @@ msgstr ""
|
||||
#: wizard_field:account.invoice.pay,addendum,comment:0
|
||||
#: wizard_field:account.invoice.pay,init,name:0
|
||||
msgid "Entry Name"
|
||||
msgstr "Núm. asiento"
|
||||
msgstr "Descripción"
|
||||
|
||||
#. module: account
|
||||
#: help:account.invoice,account_id:0
|
||||
@@ -3722,7 +3723,7 @@ msgstr "Codificación asiento"
|
||||
#: wizard_view:account.invoice.refund,init:0
|
||||
#: model:ir.actions.wizard,name:account.wizard_invoice_refund
|
||||
msgid "Credit Note"
|
||||
msgstr "Factura de abono"
|
||||
msgstr "Factura rectificativa (abono)"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.todo,note:account.config_fiscalyear
|
||||
@@ -3737,7 +3738,7 @@ msgstr "Período de desajuste"
|
||||
#. module: account
|
||||
#: selection:account.config.wizard,period:0
|
||||
msgid "3 Months"
|
||||
msgstr "3 meses"
|
||||
msgstr "Trimestral"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.move.journal,init:0
|
||||
@@ -3868,7 +3869,7 @@ msgstr "Secuencia del asiento"
|
||||
#: selection:account.account,type:0
|
||||
#: selection:account.account.template,type:0
|
||||
msgid "Closed"
|
||||
msgstr "Cerrado"
|
||||
msgstr "Cierre"
|
||||
|
||||
#. module: account
|
||||
#: model:process.node,name:account.process_node_paymententries0
|
||||
@@ -3924,7 +3925,7 @@ msgstr "Movimiento"
|
||||
#. module: account
|
||||
#: help:account.period,special:0
|
||||
msgid "These periods can overlap."
|
||||
msgstr "Estos periodos se pueden solapar."
|
||||
msgstr "Estos períodos se pueden solapar."
|
||||
|
||||
#. module: account
|
||||
#: help:product.template,property_account_expense:0
|
||||
@@ -3952,7 +3953,7 @@ msgstr "Diarios financieros"
|
||||
#: selection:account.partner.balance.report,init,state:0
|
||||
#: selection:account.third_party_ledger.report,init,state:0
|
||||
msgid "By Period"
|
||||
msgstr "Por periodo"
|
||||
msgstr "Por período"
|
||||
|
||||
#. module: account
|
||||
#: help:account.invoice,date_invoice:0
|
||||
@@ -4050,7 +4051,7 @@ msgstr "Cuenta a pagar"
|
||||
#: field:account.account,currency_id:0
|
||||
#: field:account.account.template,currency_id:0
|
||||
msgid "Secondary Currency"
|
||||
msgstr "Moneda secundaria"
|
||||
msgstr "Divisa secundaria"
|
||||
|
||||
#. module: account
|
||||
#: field:account.account,credit:0
|
||||
@@ -4085,7 +4086,7 @@ msgstr ""
|
||||
#: field:account.tax,account_paid_id:0
|
||||
#: field:account.tax.template,account_paid_id:0
|
||||
msgid "Refund Tax Account"
|
||||
msgstr "Cuenta impuestos de devoluciones"
|
||||
msgstr "Cuenta impuestos de reintegros"
|
||||
|
||||
#. module: account
|
||||
#: field:account.tax.code,child_ids:0
|
||||
@@ -4165,7 +4166,7 @@ msgstr "Límite a pagar"
|
||||
#: wizard_field:account.partner.balance.report,init,state:0
|
||||
#: wizard_field:account.third_party_ledger.report,init,state:0
|
||||
msgid "Date/Period Filter"
|
||||
msgstr "Filtrar fecha/periodo"
|
||||
msgstr "Filtrar por fecha/período"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.analytic.account.journal:0
|
||||
@@ -4188,7 +4189,7 @@ msgstr "Secuencias de diarios separadas"
|
||||
#. module: account
|
||||
#: help:account.bank.statement.reconcile,total_second_currency:0
|
||||
msgid "The currency of the journal"
|
||||
msgstr "La moneda del diario"
|
||||
msgstr "La divisa del diario"
|
||||
|
||||
#. module: account
|
||||
#: view:account.journal.column:0
|
||||
@@ -4431,7 +4432,7 @@ msgstr "Fijado"
|
||||
#: view:account.tax:0
|
||||
#: view:account.tax.template:0
|
||||
msgid "Credit Notes"
|
||||
msgstr "Facturas de abono"
|
||||
msgstr "Facturas rectificativas (abono)"
|
||||
|
||||
#. module: account
|
||||
#: field:account.config.wizard,date2:0
|
||||
@@ -4501,7 +4502,7 @@ msgstr "Línea del modelo de asiento"
|
||||
#. module: account
|
||||
#: view:account.tax.template:0
|
||||
msgid "Account Tax Template"
|
||||
msgstr "Plantilla de impuesto"
|
||||
msgstr "Plantilla de impuestos"
|
||||
|
||||
#. module: account
|
||||
#: help:account.model,name:0
|
||||
@@ -4623,7 +4624,7 @@ msgstr "Por fecha"
|
||||
#: model:ir.actions.act_window,name:account.action_invoice_tree4
|
||||
#: model:ir.ui.menu,name:account.menu_action_invoice_tree4
|
||||
msgid "Supplier Refunds"
|
||||
msgstr "Facturas de abono de proveedor"
|
||||
msgstr "Facturas rectificativas (abono) de proveedor"
|
||||
|
||||
#. module: account
|
||||
#: help:account.model.line,date:0
|
||||
@@ -5128,7 +5129,7 @@ msgstr "Cuenta de ingresos en plantilla producto"
|
||||
#: help:account.account.template,currency_id:0
|
||||
msgid "Force all moves for this account to have this secondary currency."
|
||||
msgstr ""
|
||||
"Fuerza a todos los movimientos de esta cuenta que tengan esta moneda "
|
||||
"Fuerza a todos los movimientos de esta cuenta que tengan esta divisa "
|
||||
"secundaria."
|
||||
|
||||
#. module: account
|
||||
@@ -5142,7 +5143,7 @@ msgstr "_Cancelar"
|
||||
#: wizard_view:account.partner.balance.report,init:0
|
||||
#: wizard_view:account.third_party_ledger.report,init:0
|
||||
msgid "Select Date-Period"
|
||||
msgstr "Seleccionar fecha-periodo"
|
||||
msgstr "Seleccionar fecha-período"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.analytic.account.inverted.balance:0
|
||||
@@ -5171,7 +5172,7 @@ msgstr "Grupo de Impuestos"
|
||||
#: model:ir.actions.act_window,name:account.action_invoice_tree3_new
|
||||
#: model:ir.ui.menu,name:account.menu_action_invoice_tree3_new
|
||||
msgid "New Customer Refund"
|
||||
msgstr "Nueva factura de abono de cliente"
|
||||
msgstr "Nueva factura rectificativa (abono) de cliente"
|
||||
|
||||
#. module: account
|
||||
#: help:wizard.multi.charts.accounts,seq_journal:0
|
||||
@@ -5369,7 +5370,7 @@ msgstr "Pagado"
|
||||
#: model:ir.actions.act_window,name:account.action_invoice_tree11
|
||||
#: model:ir.ui.menu,name:account.menu_action_invoice_tree11
|
||||
msgid "Unpaid Customer Refunds"
|
||||
msgstr "Facturas de abono de cliente sin pagar"
|
||||
msgstr "Facturas rectificativas (abono) de cliente sin pagar"
|
||||
|
||||
#. module: account
|
||||
#: help:account.invoice,residual:0
|
||||
@@ -5557,7 +5558,7 @@ msgstr "Saldo pendiente"
|
||||
#. module: account
|
||||
#: rml:account.invoice:0
|
||||
msgid "Refund"
|
||||
msgstr "Factura de abono"
|
||||
msgstr "Factura rectificativa (abono)"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:account.model_account_invoice_tax
|
||||
@@ -5794,7 +5795,7 @@ msgstr ""
|
||||
#: field:account.tax.code,code:0
|
||||
#: field:account.tax.code.template,code:0
|
||||
msgid "Case Code"
|
||||
msgstr "Código caso"
|
||||
msgstr "Código"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.automatic.reconcile,init,power:0
|
||||
@@ -5810,7 +5811,7 @@ msgstr "Cuenta de ingresos"
|
||||
#. module: account
|
||||
#: field:account.period,special:0
|
||||
msgid "Opening/Closing Period"
|
||||
msgstr "Periodo de apertura/cierre"
|
||||
msgstr "Período de apertura/cierre"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.analytic.account.balance:0
|
||||
@@ -5918,7 +5919,7 @@ msgstr "Dejarlo vacío para todos los ejercicios fiscales abiertos"
|
||||
#: rml:account.invoice:0
|
||||
#: selection:account.invoice,type:0
|
||||
msgid "Supplier Refund"
|
||||
msgstr "Factura de abono de proveedor"
|
||||
msgstr "Factura rectificativa (abono) de proveedor"
|
||||
|
||||
#. module: account
|
||||
#: model:process.transition,note:account.process_transition_entriesreconcile0
|
||||
@@ -6074,3 +6075,365 @@ msgstr ""
|
||||
#: wizard_button:account.subscription.generate,init,generate:0
|
||||
msgid "Compute Entry Dates"
|
||||
msgstr "Calcular fechas asiento"
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Analytic accounts to close"
|
||||
msgstr "Cuentas analíticas a cerrar"
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Draft invoices"
|
||||
msgstr "Facturas borrador"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.open_board_account
|
||||
#: model:ir.ui.menu,name:account.menu_board_account
|
||||
msgid "Accounting Dashboard"
|
||||
msgstr "Tablero de contabilidad"
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:account.act_my_account
|
||||
msgid "Accounts to invoice"
|
||||
msgstr "Cuentas a facturar"
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:account.action_account_analytic_line_to_invoice
|
||||
msgid "Costs to invoice"
|
||||
msgstr "Costos a facturar"
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Aged receivables"
|
||||
msgstr "Efectos vencidos a cobrar"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:account.module_meta_information
|
||||
msgid "Board for accountant"
|
||||
msgstr "Tablero para contables"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.action_aged_income
|
||||
msgid "Income Accounts"
|
||||
msgstr "Cuentas de ingresos"
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "My indicators"
|
||||
msgstr "Mis indicadores"
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Account Board"
|
||||
msgstr "Tablero de contabilidad"
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Aged income"
|
||||
msgstr "Ingresos vencidos"
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,show_columns:0
|
||||
msgid "Show Debit/Credit Information"
|
||||
msgstr "Mostrar información débito/crédito"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,account_choice:0
|
||||
msgid "All accounts"
|
||||
msgstr "Todas las cuentas"
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Entries Selection Based on"
|
||||
msgstr "Selección de entradas basada en"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid "Notification"
|
||||
msgstr "Notificación"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Financial Period"
|
||||
msgstr "Periodo financiero"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.report.xml,name:account.account_account_balance
|
||||
#: model:ir.actions.report.xml,name:account.account_account_balance_landscape
|
||||
msgid "Account balance"
|
||||
msgstr "Balance contable"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Period(s)"
|
||||
msgstr "Seleccione período(s)"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Percentage"
|
||||
msgstr "Porcentaje"
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Compare Selected Years In Terms Of"
|
||||
msgstr "Comparar ejercicios seleccionados en términos de"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Fiscal Year(s)(Maximum Three Years)"
|
||||
msgstr "Seleccionar ejercicio(s) fiscal(es) (máximo 3 años)"
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,select_account:0
|
||||
msgid "Select Reference Account(for % comparision)"
|
||||
msgstr "Seleccione cuenta de referencia (para comparación %)"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.wizard,name:account.wizard_account_balance_report
|
||||
msgid "Account balance-Compare Years"
|
||||
msgstr "Balance contable-Compara ejercicios"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,description:account.module_meta_information
|
||||
msgid ""
|
||||
"Account Balance Module is an added functionality to the Financial Management "
|
||||
"module.\n"
|
||||
"\n"
|
||||
" This module gives you the various options for printing balance sheet.\n"
|
||||
"\n"
|
||||
" 1. You can compare the balance sheet for different years.\n"
|
||||
"\n"
|
||||
" 2. You can set the cash or percentage comparison between two years.\n"
|
||||
"\n"
|
||||
" 3. You can set the referential account for the percentage comparison for "
|
||||
"particular years.\n"
|
||||
"\n"
|
||||
" 4. You can select periods as an actual date or periods as creation "
|
||||
"date.\n"
|
||||
"\n"
|
||||
" 5. You have an option to print the desired report in Landscape format.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"El módulo de balance de cuentas es una funcionalidad añadida al módulo de "
|
||||
"gestión financiera.\n"
|
||||
"\n"
|
||||
" Este módulo ofrece diversas opciones de impresión de balances.\n"
|
||||
"\n"
|
||||
" 1. Se puede comparar el balance de distintos años.\n"
|
||||
"\n"
|
||||
" 2. Puede establecer la comparación en importe o porcentual entre dos "
|
||||
"años.\n"
|
||||
"\n"
|
||||
" 3. Puede establecer la cuenta de referencia para la comparación "
|
||||
"porcentual para años en particular.\n"
|
||||
"\n"
|
||||
" 4. Puede seleccionar períodos como una fecha real o períodos como fecha "
|
||||
"de creación.\n"
|
||||
"\n"
|
||||
" 5. Puede imprimir el informe que desee en formato apaisado.\n"
|
||||
" "
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "You have to select 'Landscape' option. Please Check it."
|
||||
msgstr "Debe seleccionar la opción 'Horizontal'. Por favor, márquela."
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,landscape:0
|
||||
msgid "Show Report in Landscape Form"
|
||||
msgstr "Mostrar informe en formato horizontal"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.account.balance.landscape:0
|
||||
#: rml:account.balance.account.balance:0
|
||||
msgid "Total :"
|
||||
msgstr "Total :"
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,format_perc:0
|
||||
msgid "Show Comparision in %"
|
||||
msgstr "Mostrar comparación en %"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Period"
|
||||
msgstr "Seleccionar periodo"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Report Options"
|
||||
msgstr "Opciones del informe"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Don't Compare"
|
||||
msgstr "No comparar"
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,account_choice:0
|
||||
msgid "Show Accounts"
|
||||
msgstr "Mostrar cuentas"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "1. You have selected more than 3 years in any case."
|
||||
msgstr "1. Ha seleccionado más de 3 ejercicios en cualquier caso."
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:account.module_meta_information
|
||||
msgid "Accounting and financial management-Compare Accounts"
|
||||
msgstr "Gestión contable y financiera - Comparación de cuentas"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.account.balance.landscape:0
|
||||
#: rml:account.balance.account.balance:0
|
||||
msgid "Year :"
|
||||
msgstr "Ejercicio :"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "You can select maximum 3 years. Please check again."
|
||||
msgstr ""
|
||||
"Puede seleccionar un máximo de 3 ejercicios. Por favor, seleccione otra vez."
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"3. You have selected 'Percentage' option with more than 2 years, but you "
|
||||
"have not selected landscape format."
|
||||
msgstr ""
|
||||
"3. Ha seleccionado la opción 'Porcentaje' con más de 2 ejercicios, pero no "
|
||||
"ha seleccionado formato horizontal."
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"You might have done following mistakes. Please correct them and try again."
|
||||
msgstr ""
|
||||
"Podría haber cometido los siguientes errores. Por favor, corríjalos e "
|
||||
"inténtelo de nuevo."
|
||||
|
||||
#. module: account
|
||||
#: help:account.balance.account.balance.report,init,select_account:0
|
||||
msgid "Keep empty for comparision to its parent"
|
||||
msgstr "Dejarlo vacío para comparar con sus padres"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Creation Date"
|
||||
msgstr "Fecha creación"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"2. You have not selected 'Percentage' option, but you have selected more "
|
||||
"than 2 years."
|
||||
msgstr ""
|
||||
"2. No ha seleccionado la opción 'Porcentaje', pero ha seleccionado más de 2 "
|
||||
"ejercicios."
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid ""
|
||||
"You may have selected the compare options with more than 1 year with "
|
||||
"credit/debit columns and % option.This can lead contents to be printed out "
|
||||
"of the paper.Please try again."
|
||||
msgstr ""
|
||||
"Puede haber seleccionado las opciones comparar con más de 1 ejercicio con "
|
||||
"columnas crédito/débito y opción %. Esto pueden ocasionar que hayan "
|
||||
"contenidos que se impriman fuera del papel. Por favor, inténtelo de nuevo."
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid "You have to select at least 1 Fiscal Year. Try again."
|
||||
msgstr ""
|
||||
"Debe seleccionar al menos un ejercicio fiscal. Por favor, inténtelo de nuevo."
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Customize Report"
|
||||
msgstr "Informe personalizado"
|
||||
|
||||
#. module: account
|
||||
#: field:report.aged.receivable,name:0
|
||||
msgid "Month Range"
|
||||
msgstr "Rango mensual"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_view_created_invoice_dashboard
|
||||
msgid "Invoices Created Within Past 15 Days"
|
||||
msgstr "Facturas creadas en los últimos 15 días"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_invoice_created
|
||||
msgid "Report of Invoices Created within Last 15 days"
|
||||
msgstr "Informe de facturas creadas en los últimos 15 días"
|
||||
|
||||
#. module: account
|
||||
#: view:report.invoice.created:0
|
||||
msgid "Total Amount"
|
||||
msgstr "Importe total"
|
||||
|
||||
#. module: account
|
||||
#: view:report.account.receivable:0
|
||||
msgid "Accounts by type"
|
||||
msgstr "Cuentas por tipo"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_aged_receivable
|
||||
msgid "Aged Receivable Till Today"
|
||||
msgstr "Efectos a cobrar vencidos hasta hoy"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_account_receivable
|
||||
msgid "Receivable accounts"
|
||||
msgstr "Cuentas a cobrar"
|
||||
|
||||
#. module: account
|
||||
#: field:temp.range,name:0
|
||||
msgid "Range"
|
||||
msgstr "Intervalo"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,description:report_account.module_meta_information
|
||||
msgid "A module that adds new reports based on the account module."
|
||||
msgstr ""
|
||||
"Módulo que añade nuevos informes basado en el módulo contable-financiero."
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:report_account.module_meta_information
|
||||
msgid "Account Reporting - Reporting"
|
||||
msgstr "Informe contable - Informe"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_account_receivable_graph
|
||||
#: model:ir.ui.menu,name:report_account.menu_account_receivable_graph
|
||||
msgid "Balance by Type of Account"
|
||||
msgstr "Saldo por tipo de cuenta"
|
||||
|
||||
#. module: account
|
||||
#: field:report.account.receivable,name:0
|
||||
msgid "Week of Year"
|
||||
msgstr "Semana del año"
|
||||
|
||||
#. module: account
|
||||
#: field:report.invoice.created,create_date:0
|
||||
msgid "Create Date"
|
||||
msgstr "Fecha de creación"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_aged_receivable_graph
|
||||
#: view:report.aged.receivable:0
|
||||
msgid "Aged Receivable"
|
||||
msgstr "A cobrar anteriores"
|
||||
|
||||
#. module: account
|
||||
#: view:report.invoice.created:0
|
||||
msgid "Untaxed Amount"
|
||||
msgstr "Base imponible"
|
||||
|
||||
#~ msgid "account.config.wizard"
|
||||
#~ msgstr "account.config.asistente"
|
||||
|
||||
+600
-535
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:08+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:07+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -2171,7 +2171,8 @@ msgid "Analytic Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+549
-433
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-05-24 03:46+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:03+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:07+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:05+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -2133,7 +2133,8 @@ msgid "Analytic Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+413
-439
File diff suppressed because it is too large
Load Diff
+544
-421
File diff suppressed because it is too large
Load Diff
+538
-551
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:06+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:04+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -2133,7 +2133,8 @@ msgid "Analytic Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+557
-530
File diff suppressed because it is too large
Load Diff
+536
-418
File diff suppressed because it is too large
Load Diff
+538
-431
File diff suppressed because it is too large
Load Diff
+333
-4
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-15 07:00+0000\n"
|
||||
"PO-Revision-Date: 2010-07-05 10:24+0000\n"
|
||||
"Last-Translator: eLBati - albatos.com <lorenzo.battistini@albatos.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-18 03:32+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-07 03:39+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -35,7 +35,7 @@ msgstr "Fatture fornitori non pagate"
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_finance_entries
|
||||
msgid "Entries Encoding"
|
||||
msgstr "Codifica delle registrazioni"
|
||||
msgstr "Movimenti contabili"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.todo,note:account.config_wizard_account_base_setup_form
|
||||
@@ -4581,7 +4581,7 @@ msgstr ""
|
||||
#: model:ir.actions.act_window,name:account.action_move_line_form_encode_by_move
|
||||
#: model:ir.ui.menu,name:account.menu_encode_entries_by_move
|
||||
msgid "Entries Encoding by Move"
|
||||
msgstr "Codifica delle registrazioni per movimento"
|
||||
msgstr "Registrazioni per movimento"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.analytic.account.chart,init:0
|
||||
@@ -5959,3 +5959,332 @@ msgstr ""
|
||||
#: wizard_button:account.subscription.generate,init,generate:0
|
||||
msgid "Compute Entry Dates"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Analytic accounts to close"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Draft invoices"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.open_board_account
|
||||
#: model:ir.ui.menu,name:account.menu_board_account
|
||||
msgid "Accounting Dashboard"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:account.act_my_account
|
||||
msgid "Accounts to invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:account.action_account_analytic_line_to_invoice
|
||||
msgid "Costs to invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Aged receivables"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:account.module_meta_information
|
||||
msgid "Board for accountant"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.action_aged_income
|
||||
msgid "Income Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "My indicators"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Account Board"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Aged income"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,show_columns:0
|
||||
msgid "Show Debit/Credit Information"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,account_choice:0
|
||||
msgid "All accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Entries Selection Based on"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid "Notification"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Financial Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.report.xml,name:account.account_account_balance
|
||||
#: model:ir.actions.report.xml,name:account.account_account_balance_landscape
|
||||
msgid "Account balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Period(s)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Percentage"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Compare Selected Years In Terms Of"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Fiscal Year(s)(Maximum Three Years)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,select_account:0
|
||||
msgid "Select Reference Account(for % comparision)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.wizard,name:account.wizard_account_balance_report
|
||||
msgid "Account balance-Compare Years"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,description:account.module_meta_information
|
||||
msgid ""
|
||||
"Account Balance Module is an added functionality to the Financial Management "
|
||||
"module.\n"
|
||||
"\n"
|
||||
" This module gives you the various options for printing balance sheet.\n"
|
||||
"\n"
|
||||
" 1. You can compare the balance sheet for different years.\n"
|
||||
"\n"
|
||||
" 2. You can set the cash or percentage comparison between two years.\n"
|
||||
"\n"
|
||||
" 3. You can set the referential account for the percentage comparison for "
|
||||
"particular years.\n"
|
||||
"\n"
|
||||
" 4. You can select periods as an actual date or periods as creation "
|
||||
"date.\n"
|
||||
"\n"
|
||||
" 5. You have an option to print the desired report in Landscape format.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "You have to select 'Landscape' option. Please Check it."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,landscape:0
|
||||
msgid "Show Report in Landscape Form"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: rml:account.account.balance.landscape:0
|
||||
#: rml:account.balance.account.balance:0
|
||||
msgid "Total :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,format_perc:0
|
||||
msgid "Show Comparision in %"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Report Options"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Don't Compare"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,account_choice:0
|
||||
msgid "Show Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "1. You have selected more than 3 years in any case."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:account.module_meta_information
|
||||
msgid "Accounting and financial management-Compare Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: rml:account.account.balance.landscape:0
|
||||
#: rml:account.balance.account.balance:0
|
||||
msgid "Year :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "You can select maximum 3 years. Please check again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"3. You have selected 'Percentage' option with more than 2 years, but you "
|
||||
"have not selected landscape format."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"You might have done following mistakes. Please correct them and try again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: help:account.balance.account.balance.report,init,select_account:0
|
||||
msgid "Keep empty for comparision to its parent"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Creation Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"2. You have not selected 'Percentage' option, but you have selected more "
|
||||
"than 2 years."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid ""
|
||||
"You may have selected the compare options with more than 1 year with "
|
||||
"credit/debit columns and % option.This can lead contents to be printed out "
|
||||
"of the paper.Please try again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid "You have to select at least 1 Fiscal Year. Try again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Customize Report"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:report.aged.receivable,name:0
|
||||
msgid "Month Range"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_view_created_invoice_dashboard
|
||||
msgid "Invoices Created Within Past 15 Days"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_invoice_created
|
||||
msgid "Report of Invoices Created within Last 15 days"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:report.invoice.created:0
|
||||
msgid "Total Amount"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:report.account.receivable:0
|
||||
msgid "Accounts by type"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_aged_receivable
|
||||
msgid "Aged Receivable Till Today"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_account_receivable
|
||||
msgid "Receivable accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:temp.range,name:0
|
||||
msgid "Range"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,description:report_account.module_meta_information
|
||||
msgid "A module that adds new reports based on the account module."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:report_account.module_meta_information
|
||||
msgid "Account Reporting - Reporting"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_account_receivable_graph
|
||||
#: model:ir.ui.menu,name:report_account.menu_account_receivable_graph
|
||||
msgid "Balance by Type of Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:report.account.receivable,name:0
|
||||
msgid "Week of Year"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:report.invoice.created,create_date:0
|
||||
msgid "Create Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_aged_receivable_graph
|
||||
#: view:report.aged.receivable:0
|
||||
msgid "Aged Receivable"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:report.invoice.created:0
|
||||
msgid "Untaxed Amount"
|
||||
msgstr ""
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:06+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:05+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -806,8 +806,6 @@ msgstr ""
|
||||
msgid "Move Lines"
|
||||
msgstr ""
|
||||
|
||||
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.report_account_analytic_journal_tree
|
||||
#: model:ir.ui.menu,name:account.report_account_analytic_journal_print
|
||||
@@ -2135,7 +2133,8 @@ msgid "Analytic Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+561
-556
File diff suppressed because it is too large
Load Diff
+538
-425
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-05-17 05:01+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:05+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:07+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:05+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -2133,7 +2133,8 @@ msgid "Analytic Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:07+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:05+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -2133,7 +2133,8 @@ msgid "Analytic Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+562
-423
File diff suppressed because it is too large
Load Diff
+344
-421
File diff suppressed because it is too large
Load Diff
+403
-441
File diff suppressed because it is too large
Load Diff
+543
-423
File diff suppressed because it is too large
Load Diff
+550
-425
File diff suppressed because it is too large
Load Diff
+539
-419
File diff suppressed because it is too large
Load Diff
+568
-424
File diff suppressed because it is too large
Load Diff
+338
-4
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-04-03 16:42+0000\n"
|
||||
"Last-Translator: Alexandr Mitev <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-07-07 22:55+0000\n"
|
||||
"Last-Translator: Pomazan Bogdan <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:07+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-08 03:50+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -171,6 +171,10 @@ msgid ""
|
||||
"positive, it gives the day of the next month. Set 0 for net days (otherwise "
|
||||
"it's based on the beginning of the month)."
|
||||
msgstr ""
|
||||
"Установите значение дня месяца -1 для последнего дня текущего месяца. В "
|
||||
"случае положительного значения, значение дня будет соответствовать дню "
|
||||
"следующего месяца. Установите значение 0 для чистых дней (иначе счет идет с "
|
||||
"начала месяца)."
|
||||
|
||||
#. module: account
|
||||
#: view:account.move:0
|
||||
@@ -2154,7 +2158,8 @@ msgid "Analytic Entry"
|
||||
msgstr "Проводка аналитики"
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
@@ -5951,3 +5956,332 @@ msgstr ""
|
||||
#: wizard_button:account.subscription.generate,init,generate:0
|
||||
msgid "Compute Entry Dates"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Analytic accounts to close"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Draft invoices"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.open_board_account
|
||||
#: model:ir.ui.menu,name:account.menu_board_account
|
||||
msgid "Accounting Dashboard"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:account.act_my_account
|
||||
msgid "Accounts to invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:account.action_account_analytic_line_to_invoice
|
||||
msgid "Costs to invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Aged receivables"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:account.module_meta_information
|
||||
msgid "Board for accountant"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.action_aged_income
|
||||
msgid "Income Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "My indicators"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Account Board"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:board.board:0
|
||||
msgid "Aged income"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,show_columns:0
|
||||
msgid "Show Debit/Credit Information"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,account_choice:0
|
||||
msgid "All accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Entries Selection Based on"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid "Notification"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Financial Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.report.xml,name:account.account_account_balance
|
||||
#: model:ir.actions.report.xml,name:account.account_account_balance_landscape
|
||||
msgid "Account balance"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Period(s)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Percentage"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Compare Selected Years In Terms Of"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Fiscal Year(s)(Maximum Three Years)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,select_account:0
|
||||
msgid "Select Reference Account(for % comparision)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.wizard,name:account.wizard_account_balance_report
|
||||
msgid "Account balance-Compare Years"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,description:account.module_meta_information
|
||||
msgid ""
|
||||
"Account Balance Module is an added functionality to the Financial Management "
|
||||
"module.\n"
|
||||
"\n"
|
||||
" This module gives you the various options for printing balance sheet.\n"
|
||||
"\n"
|
||||
" 1. You can compare the balance sheet for different years.\n"
|
||||
"\n"
|
||||
" 2. You can set the cash or percentage comparison between two years.\n"
|
||||
"\n"
|
||||
" 3. You can set the referential account for the percentage comparison for "
|
||||
"particular years.\n"
|
||||
"\n"
|
||||
" 4. You can select periods as an actual date or periods as creation "
|
||||
"date.\n"
|
||||
"\n"
|
||||
" 5. You have an option to print the desired report in Landscape format.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "You have to select 'Landscape' option. Please Check it."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,landscape:0
|
||||
msgid "Show Report in Landscape Form"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: rml:account.account.balance.landscape:0
|
||||
#: rml:account.balance.account.balance:0
|
||||
msgid "Total :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,format_perc:0
|
||||
msgid "Show Comparision in %"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Select Period"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Report Options"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,compare_pattern:0
|
||||
msgid "Don't Compare"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.balance.account.balance.report,init,account_choice:0
|
||||
msgid "Show Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "1. You have selected more than 3 years in any case."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:account.module_meta_information
|
||||
msgid "Accounting and financial management-Compare Accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: rml:account.account.balance.landscape:0
|
||||
#: rml:account.balance.account.balance:0
|
||||
msgid "Year :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid "You can select maximum 3 years. Please check again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"3. You have selected 'Percentage' option with more than 2 years, but you "
|
||||
"have not selected landscape format."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"You might have done following mistakes. Please correct them and try again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: help:account.balance.account.balance.report,init,select_account:0
|
||||
msgid "Keep empty for comparision to its parent"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: selection:account.balance.account.balance.report,init,period_manner:0
|
||||
msgid "Creation Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,backtoinit:0
|
||||
msgid ""
|
||||
"2. You have not selected 'Percentage' option, but you have selected more "
|
||||
"than 2 years."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid ""
|
||||
"You may have selected the compare options with more than 1 year with "
|
||||
"credit/debit columns and % option.This can lead contents to be printed out "
|
||||
"of the paper.Please try again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,zero_years:0
|
||||
msgid "You have to select at least 1 Fiscal Year. Try again."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
msgid "Customize Report"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:report.aged.receivable,name:0
|
||||
msgid "Month Range"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_view_created_invoice_dashboard
|
||||
msgid "Invoices Created Within Past 15 Days"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_invoice_created
|
||||
msgid "Report of Invoices Created within Last 15 days"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:report.invoice.created:0
|
||||
msgid "Total Amount"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:report.account.receivable:0
|
||||
msgid "Accounts by type"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_aged_receivable
|
||||
msgid "Aged Receivable Till Today"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:report_account.model_report_account_receivable
|
||||
msgid "Receivable accounts"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:temp.range,name:0
|
||||
msgid "Range"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,description:report_account.module_meta_information
|
||||
msgid "A module that adds new reports based on the account module."
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.module.module,shortdesc:report_account.module_meta_information
|
||||
msgid "Account Reporting - Reporting"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_account_receivable_graph
|
||||
#: model:ir.ui.menu,name:report_account.menu_account_receivable_graph
|
||||
msgid "Balance by Type of Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:report.account.receivable,name:0
|
||||
msgid "Week of Year"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: field:report.invoice.created,create_date:0
|
||||
msgid "Create Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:report_account.action_aged_receivable_graph
|
||||
#: view:report.aged.receivable:0
|
||||
msgid "Aged Receivable"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:report.invoice.created:0
|
||||
msgid "Untaxed Amount"
|
||||
msgstr ""
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:07+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:06+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -2133,7 +2133,8 @@ msgid "Analytic Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+268
-421
File diff suppressed because it is too large
Load Diff
+567
-423
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:05+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:03+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -2159,7 +2159,8 @@ msgid "Analytic Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-26 03:42+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:05+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -2136,7 +2136,8 @@ msgid "Analytic Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+534
-416
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:08+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:06+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -2133,7 +2133,8 @@ msgid "Analytic Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-05-21 03:38+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:06+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
+535
-417
File diff suppressed because it is too large
Load Diff
+540
-420
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-05-12 04:20+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:06+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -806,11 +806,6 @@ msgstr ""
|
||||
msgid "Move Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:account.model_account_config_wizard
|
||||
msgid "account.config.wizard"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.report_account_analytic_journal_tree
|
||||
#: model:ir.ui.menu,name:account.report_account_analytic_journal_print
|
||||
@@ -2138,7 +2133,8 @@ msgid "Analytic Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+542
-433
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:08+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:06+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -2144,7 +2144,8 @@ msgid "Analytic Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+716
-383
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 04:08+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:06+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -2133,7 +2133,8 @@ msgid "Analytic Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:res.company:0 field:res.company,overdue_msg:0
|
||||
#: view:res.company:0
|
||||
#: field:res.company,overdue_msg:0
|
||||
msgid "Overdue Payments Message"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+536
-418
File diff suppressed because it is too large
Load Diff
+12
-12
@@ -21,12 +21,12 @@
|
||||
import time
|
||||
import datetime
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from tools.translate import _
|
||||
from os.path import join as opj
|
||||
from operator import itemgetter
|
||||
from tools.translate import _
|
||||
from osv import fields, osv
|
||||
import netsvc
|
||||
import tools
|
||||
from os.path import join as opj
|
||||
|
||||
class account_installer(osv.osv_memory):
|
||||
_name = 'account.installer'
|
||||
@@ -99,7 +99,7 @@ class account_installer(osv.osv_memory):
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
result = mod_obj._get_id(cr, uid, 'account', 'configurable_chart_template')
|
||||
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
|
||||
obj_multi = self.pool.get('account.chart.template').browse(cr,uid, id)
|
||||
obj_multi = self.pool.get('account.chart.template').browse(cr, uid, id)
|
||||
|
||||
obj_acc = self.pool.get('account.account')
|
||||
obj_acc_tax = self.pool.get('account.tax')
|
||||
@@ -108,7 +108,7 @@ class account_installer(osv.osv_memory):
|
||||
obj_acc_template = self.pool.get('account.account.template')
|
||||
obj_fiscal_position_template = self.pool.get('account.fiscal.position.template')
|
||||
obj_fiscal_position = self.pool.get('account.fiscal.position')
|
||||
company_id = self.pool.get('res.users').browse(cr,uid,[uid],context)[0].company_id
|
||||
company_id = self.pool.get('res.users').browse(cr, uid, [uid], context)[0].company_id
|
||||
seq_journal = True
|
||||
|
||||
# Creating Account
|
||||
@@ -133,7 +133,7 @@ class account_installer(osv.osv_memory):
|
||||
'company_id': company_id.id,
|
||||
'sign': tax_code_template.sign,
|
||||
}
|
||||
new_tax_code = self.pool.get('account.tax.code').create(cr,uid,vals)
|
||||
new_tax_code = self.pool.get('account.tax.code').create(cr, uid, vals)
|
||||
#recording the new tax code to do the mapping
|
||||
tax_code_template_ref[tax_code_template.id] = new_tax_code
|
||||
|
||||
@@ -166,7 +166,7 @@ class account_installer(osv.osv_memory):
|
||||
'company_id': company_id.id,
|
||||
'type_tax_use': tax.type_tax_use
|
||||
}
|
||||
new_tax = obj_acc_tax.create(cr,uid,vals_tax)
|
||||
new_tax = obj_acc_tax.create(cr, uid, vals_tax)
|
||||
#as the accounts have not been created yet, we have to wait before filling these fields
|
||||
todo_dict[new_tax] = {
|
||||
'account_collected_id': tax.account_collected_id and tax.account_collected_id.id or False,
|
||||
@@ -204,7 +204,7 @@ class account_installer(osv.osv_memory):
|
||||
'tax_ids': [(6,0,tax_ids)],
|
||||
'company_id': company_id.id,
|
||||
}
|
||||
new_account = obj_acc.create(cr,uid,vals)
|
||||
new_account = obj_acc.create(cr, uid, vals)
|
||||
acc_template_ref[account_template.id] = new_account
|
||||
if account_template.name == 'Bank Current Account':
|
||||
view_id_cash = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Cash Journal View')])[0]
|
||||
@@ -328,8 +328,8 @@ class account_installer(osv.osv_memory):
|
||||
obj_journal.create(cr,uid,vals_journal)
|
||||
|
||||
# Bank Journals
|
||||
view_id_cash = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Cash Journal View')])[0]
|
||||
view_id_cur = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Multi-Currency Cash Journal View')])[0]
|
||||
view_id_cash = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Cash Journal View')])[0]
|
||||
view_id_cur = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Multi-Currency Cash Journal View')])[0]
|
||||
ref_acc_bank = obj_multi.bank_account_view_id
|
||||
|
||||
|
||||
@@ -426,7 +426,7 @@ class account_installer(osv.osv_memory):
|
||||
'sign': 1,
|
||||
'parent_id':sal_tax_parent_id
|
||||
}
|
||||
new_tax_code = self.pool.get('account.tax.code').create(cr,uid,vals_tax_code)
|
||||
new_tax_code = self.pool.get('account.tax.code').create(cr, uid, vals_tax_code)
|
||||
sales_tax = obj_tax.create(cr, uid,
|
||||
{'name':'VAT%s%%'%(s_tax*100),
|
||||
'description':'VAT%s%%'%(s_tax*100),
|
||||
@@ -445,7 +445,7 @@ class account_installer(osv.osv_memory):
|
||||
'sign': 1,
|
||||
'parent_id':pur_tax_parent_id
|
||||
}
|
||||
new_tax_code = self.pool.get('account.tax.code').create(cr,uid,vals_tax_code)
|
||||
new_tax_code = self.pool.get('account.tax.code').create(cr, uid, vals_tax_code)
|
||||
purchase_tax = obj_tax.create(cr, uid,
|
||||
{'name':'VAT%s%%'%(p_tax*100),
|
||||
'description':'VAT%s%%'%(p_tax*100),
|
||||
@@ -457,7 +457,7 @@ class account_installer(osv.osv_memory):
|
||||
tax_val.update({'supplier_taxes_id':[(6,0,[purchase_tax])]})
|
||||
default_tax.append(('supplier_taxes_id',purchase_tax))
|
||||
if len(tax_val):
|
||||
product_ids = obj_product.search(cr,uid, [])
|
||||
product_ids = obj_product.search(cr, uid, [])
|
||||
for product in obj_product.browse(cr, uid, product_ids):
|
||||
obj_product.write(cr, uid, product.id, tax_val)
|
||||
for name, value in default_tax:
|
||||
|
||||
+145
-83
@@ -20,6 +20,7 @@
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
from operator import itemgetter
|
||||
import decimal_precision as dp
|
||||
|
||||
import netsvc
|
||||
@@ -31,7 +32,7 @@ from tools.translate import _
|
||||
class account_invoice(osv.osv):
|
||||
def _amount_all(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
for invoice in self.browse(cr,uid,ids, context=context):
|
||||
for invoice in self.browse(cr, uid, ids, context=context):
|
||||
res[invoice.id] = {
|
||||
'amount_untaxed': 0.0,
|
||||
'amount_tax': 0.0,
|
||||
@@ -44,24 +45,25 @@ class account_invoice(osv.osv):
|
||||
res[invoice.id]['amount_total'] = res[invoice.id]['amount_tax'] + res[invoice.id]['amount_untaxed']
|
||||
return res
|
||||
|
||||
def _get_journal(self, cr, uid, context):
|
||||
def _get_journal(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
type_inv = context.get('type', 'out_invoice')
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid)
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
company_id = context.get('company_id', user.company_id.id)
|
||||
type2journal = {'out_invoice': 'sale', 'in_invoice': 'purchase', 'out_refund': 'sale', 'in_refund': 'purchase'}
|
||||
type2journal = {'out_invoice': 'sale', 'in_invoice': 'purchase', 'out_refund': 'sale_refund', 'in_refund': 'purchase_refund'}
|
||||
refund_journal = {'out_invoice': False, 'in_invoice': False, 'out_refund': True, 'in_refund': True}
|
||||
journal_obj = self.pool.get('account.journal')
|
||||
res = journal_obj.search(cr, uid, [('type', '=', type2journal.get(type_inv, 'sale')),
|
||||
('company_id', '=', company_id),('refund_journal', '=', refund_journal.get(type_inv, False))],
|
||||
('company_id', '=', company_id),
|
||||
('refund_journal', '=', refund_journal.get(type_inv, False))],
|
||||
limit=1)
|
||||
if res:
|
||||
return res[0]
|
||||
else:
|
||||
return False
|
||||
|
||||
def _get_currency(self, cr, uid, context):
|
||||
def _get_currency(self, cr, uid, context=None):
|
||||
user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, [uid])[0]
|
||||
if user.company_id:
|
||||
return user.company_id.currency_id.id
|
||||
@@ -79,10 +81,9 @@ class account_invoice(osv.osv):
|
||||
def _get_type(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
type = context.get('type', 'out_invoice')
|
||||
return type
|
||||
return context.get('type', 'out_invoice')
|
||||
|
||||
def _reconciled(self, cr, uid, ids, name, args, context):
|
||||
def _reconciled(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
for id in ids:
|
||||
res[id] = self.test_paid(cr, uid, [id])
|
||||
@@ -93,8 +94,11 @@ class account_invoice(osv.osv):
|
||||
|
||||
def _amount_residual(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
data_inv = self.browse(cr, uid, ids)
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
data_inv = self.browse(cr, uid, ids)
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
for inv in data_inv:
|
||||
debit = credit = 0.0
|
||||
context.update({'date':inv.date_invoice})
|
||||
@@ -111,12 +115,12 @@ class account_invoice(osv.osv):
|
||||
context_unreconciled.update({'date':lines.date})
|
||||
# If amount currency setted, compute for debit and credit in company currency
|
||||
if lines.amount_currency < 0:
|
||||
credit_tmp=abs(cur_obj.compute(cr, uid, lines.currency_id.id, inv.company_id.currency_id.id, lines.amount_currency, round=False,context=context_unreconciled))
|
||||
credit_tmp=abs(cur_obj.compute(cr, uid, lines.currency_id.id, inv.company_id.currency_id.id, lines.amount_currency, round=False, context=context_unreconciled))
|
||||
elif lines.amount_currency > 0:
|
||||
debit_tmp=abs(cur_obj.compute(cr, uid, lines.currency_id.id, inv.company_id.currency_id.id, lines.amount_currency, round=False,context=context_unreconciled))
|
||||
debit_tmp=abs(cur_obj.compute(cr, uid, lines.currency_id.id, inv.company_id.currency_id.id, lines.amount_currency, round=False, context=context_unreconciled))
|
||||
# Then, recomput into invoice currency to avoid rounding trouble !
|
||||
debit += cur_obj.compute(cr, uid, inv.company_id.currency_id.id, inv.currency_id.id, debit_tmp, round=False,context=context)
|
||||
credit += cur_obj.compute(cr, uid, inv.company_id.currency_id.id, inv.currency_id.id, credit_tmp, round=False,context=context)
|
||||
debit += cur_obj.compute(cr, uid, inv.company_id.currency_id.id, inv.currency_id.id, debit_tmp, round=False, context=context)
|
||||
credit += cur_obj.compute(cr, uid, inv.company_id.currency_id.id, inv.currency_id.id, credit_tmp, round=False, context=context)
|
||||
else:
|
||||
debit+=debit_tmp
|
||||
credit+=credit_tmp
|
||||
@@ -130,19 +134,19 @@ class account_invoice(osv.osv):
|
||||
amount = debit-credit
|
||||
result = inv.amount_total - amount
|
||||
# Use is_zero function to avoid rounding trouble => should be fixed into ORM
|
||||
res[inv.id] = not self.pool.get('res.currency').is_zero(cr, uid, inv.company_id.currency_id,result) and result or 0.0
|
||||
res[inv.id] = not self.pool.get('res.currency').is_zero(cr, uid, inv.company_id.currency_id, result) and result or 0.0
|
||||
|
||||
return res
|
||||
|
||||
def _get_lines(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
for id in ids:
|
||||
move_lines = self.move_line_id_payment_get(cr,uid,[id])
|
||||
move_lines = self.move_line_id_payment_get(cr, uid, [id])
|
||||
if not move_lines:
|
||||
res[id] = []
|
||||
continue
|
||||
res[id] = []
|
||||
data_lines = self.pool.get('account.move.line').browse(cr,uid,move_lines)
|
||||
data_lines = self.pool.get('account.move.line').browse(cr, uid, move_lines)
|
||||
partial_ids = []# Keeps the track of ids where partial payments are done with payment terms
|
||||
for line in data_lines:
|
||||
ids_line = []
|
||||
@@ -186,7 +190,7 @@ class account_invoice(osv.osv):
|
||||
result[invoice.id] = lines
|
||||
return result
|
||||
|
||||
def _get_invoice_from_line(self, cr, uid, ids, context={}):
|
||||
def _get_invoice_from_line(self, cr, uid, ids, context=None):
|
||||
move = {}
|
||||
for line in self.pool.get('account.move.line').browse(cr, uid, ids):
|
||||
if line.reconcile_partial_id:
|
||||
@@ -200,7 +204,7 @@ class account_invoice(osv.osv):
|
||||
invoice_ids = self.pool.get('account.invoice').search(cr, uid, [('move_id','in',move.keys())], context=context)
|
||||
return invoice_ids
|
||||
|
||||
def _get_invoice_from_reconcile(self, cr, uid, ids, context={}):
|
||||
def _get_invoice_from_reconcile(self, cr, uid, ids, context=None):
|
||||
move = {}
|
||||
for r in self.pool.get('account.move.reconcile').browse(cr, uid, ids):
|
||||
for line in r.line_partial_ids:
|
||||
@@ -218,7 +222,7 @@ class account_invoice(osv.osv):
|
||||
_order = "number"
|
||||
_log_create = True
|
||||
_columns = {
|
||||
'name': fields.char('Description', size=64, select=True,readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'name': fields.char('Description', size=64, select=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'origin': fields.char('Source Document', size=64, help="Reference of the document that produced this invoice."),
|
||||
'type': fields.selection([
|
||||
('out_invoice','Customer Invoice'),
|
||||
@@ -246,8 +250,8 @@ class account_invoice(osv.osv):
|
||||
\n* The \'Open\' state is used when user create invoice,a invoice number is generated.Its in open state till user does not pay invoice. \
|
||||
\n* The \'Done\' state is set automatically when invoice is paid.\
|
||||
\n* The \'Cancelled\' state is used when user cancel invoice.'),
|
||||
'date_invoice': fields.date('Date Invoiced', states={'open':[('readonly',True)],'close':[('readonly',True)]}, help="Keep empty to use the current date"),
|
||||
'date_due': fields.date('Due Date', states={'open':[('readonly',True)],'close':[('readonly',True)]},
|
||||
'date_invoice': fields.date('Date Invoiced', states={'open':[('readonly',True)], 'close':[('readonly',True)]}, help="Keep empty to use the current date"),
|
||||
'date_due': fields.date('Due Date', states={'open':[('readonly',True)], 'close':[('readonly',True)]},
|
||||
help="If you use payment terms, the due date will be computed automatically at the generation "\
|
||||
"of accounting entries. If you keep the payment term and the due date empty, it means direct payment. The payment term may compute several due dates, for example 50% now, 50% in one month."),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner', change_default=True, readonly=True, required=True, states={'draft':[('readonly',False)]}),
|
||||
@@ -264,7 +268,7 @@ class account_invoice(osv.osv):
|
||||
'tax_line': fields.one2many('account.invoice.tax', 'invoice_id', 'Tax Lines', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
|
||||
'move_id': fields.many2one('account.move', 'Invoice Movement', readonly=True, help="Links to the automatically generated Ledger Postings."),
|
||||
'amount_untaxed': fields.function(_amount_all, method=True, digits_compute=dp.get_precision('Account'),string='Untaxed',
|
||||
'amount_untaxed': fields.function(_amount_all, method=True, digits_compute=dp.get_precision('Account'), string='Untaxed',
|
||||
store={
|
||||
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
|
||||
'account.invoice.tax': (_get_invoice_tax, None, 20),
|
||||
@@ -286,7 +290,7 @@ class account_invoice(osv.osv):
|
||||
},
|
||||
multi='all'),
|
||||
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True,readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True, change_default=True),
|
||||
'check_total': fields.float('Total', digits_compute=dp.get_precision('Account'), states={'open':[('readonly',True)],'close':[('readonly',True)]}),
|
||||
'reconciled': fields.function(_reconciled, method=True, string='Paid/Reconciled', type='boolean',
|
||||
@@ -297,8 +301,8 @@ class account_invoice(osv.osv):
|
||||
}, help="The Ledger Postings of the invoice have been reconciled with Ledger Postings of the payment(s)."),
|
||||
'partner_bank': fields.many2one('res.partner.bank', 'Bank Account',
|
||||
help='The bank account to pay to or to be paid from'),
|
||||
'move_lines':fields.function(_get_lines , method=True,type='many2many' , relation='account.move.line',string='Entry Lines'),
|
||||
'residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'),string='Residual',
|
||||
'move_lines':fields.function(_get_lines , method=True, type='many2many', relation='account.move.line', string='Entry Lines'),
|
||||
'residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual',
|
||||
store={
|
||||
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 50),
|
||||
'account.invoice.tax': (_get_invoice_tax, None, 50),
|
||||
@@ -315,30 +319,42 @@ class account_invoice(osv.osv):
|
||||
_defaults = {
|
||||
'type': _get_type,
|
||||
#'date_invoice': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'state': lambda *a: 'draft',
|
||||
'state': 'draft',
|
||||
'journal_id': _get_journal,
|
||||
'currency_id': _get_currency,
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.invoice', context=c),
|
||||
'reference_type': lambda *a: 'none',
|
||||
'check_total': lambda *a: 0.0,
|
||||
'user_id': lambda s,cr,u,c: u,
|
||||
'reference_type': 'none',
|
||||
'check_total': 0.0,
|
||||
'user_id': lambda s, cr, u, c: u,
|
||||
}
|
||||
|
||||
def create(self, cr, uid, vals, context={}):
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
|
||||
if context.get('active_model','') in ['res.partner']:
|
||||
partner = self.pool.get(context['active_model']).read(cr,uid,context['active_ids'],['supplier','customer'])[0]
|
||||
if not view_type:
|
||||
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name','=','account.invoice.tree')])[0]
|
||||
view_type = 'tree'
|
||||
if view_type == 'form':
|
||||
if partner['supplier'] and not partner['customer']:
|
||||
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name','=','account.invoice.supplier.form')])[0]
|
||||
else:
|
||||
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name','=','account.invoice.form')])[0]
|
||||
return super(account_invoice,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
try:
|
||||
res = super(account_invoice, self).create(cr, uid, vals, context)
|
||||
return res
|
||||
except Exception,e:
|
||||
except Exception, e:
|
||||
if '"journal_id" viol' in e.args[0]:
|
||||
raise orm.except_orm(_('Configuration Error!'),
|
||||
_('There is no Accounting Journal of type Sale/Purchase defined!'))
|
||||
else:
|
||||
raise
|
||||
raise orm.except_orm(_('UnknownError'), str(e))
|
||||
|
||||
def confirm_paid(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, {'state':'paid'}, context=context)
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
for (id, name) in self.name_get(cr, uid, ids):
|
||||
message = _('Document ') + " '" + name + "' "+ _("has been paid.")
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
@@ -389,8 +405,8 @@ class account_invoice(osv.osv):
|
||||
if not rec_res_id and not pay_res_id:
|
||||
raise osv.except_osv(_('Configration Error !'),
|
||||
_('Can not find account chart for this company, Please Create account.'))
|
||||
rec_obj_acc=self.pool.get('account.account').browse(cr,uid,[rec_res_id])
|
||||
pay_obj_acc=self.pool.get('account.account').browse(cr,uid,[pay_res_id])
|
||||
rec_obj_acc=self.pool.get('account.account').browse(cr, uid, [rec_res_id])
|
||||
pay_obj_acc=self.pool.get('account.account').browse(cr, uid, [pay_res_id])
|
||||
p.property_account_receivable = rec_obj_acc[0]
|
||||
p.property_account_payable = pay_obj_acc[0]
|
||||
|
||||
@@ -418,7 +434,7 @@ class account_invoice(osv.osv):
|
||||
if payment_term != partner_payment_term:
|
||||
if partner_payment_term:
|
||||
to_update = self.onchange_payment_term_date_invoice(
|
||||
cr,uid,ids,partner_payment_term,date_invoice)
|
||||
cr, uid, ids, partner_payment_term, date_invoice)
|
||||
result['value'].update(to_update['value'])
|
||||
else:
|
||||
result['value']['date_due'] = False
|
||||
@@ -470,14 +486,14 @@ class account_invoice(osv.osv):
|
||||
partner_obj = self.pool.get('res.partner').browse(cr,uid,part_id)
|
||||
if partner_obj.property_account_payable and partner_obj.property_account_receivable:
|
||||
if partner_obj.property_account_payable.company_id.id != company_id and partner_obj.property_account_receivable.company_id.id != company_id:
|
||||
rec_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
|
||||
pay_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_payable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
|
||||
rec_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
|
||||
pay_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_payable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
|
||||
if not rec_pro_id:
|
||||
rec_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_receivable'),('company_id','=',company_id)])
|
||||
rec_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_receivable'),('company_id','=',company_id)])
|
||||
if not pay_pro_id:
|
||||
pay_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_payable'),('company_id','=',company_id)])
|
||||
rec_line_data = self.pool.get('ir.property').read(cr,uid,rec_pro_id,['name','value','res_id'])
|
||||
pay_line_data = self.pool.get('ir.property').read(cr,uid,pay_pro_id,['name','value','res_id'])
|
||||
pay_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_payable'),('company_id','=',company_id)])
|
||||
rec_line_data = self.pool.get('ir.property').read(cr, uid, rec_pro_id, ['name','value','res_id'])
|
||||
pay_line_data = self.pool.get('ir.property').read(cr, uid, pay_pro_id, ['name','value','res_id'])
|
||||
rec_res_id = rec_line_data and int(rec_line_data[0]['value'].split(',')[1]) or False
|
||||
pay_res_id = pay_line_data and int(pay_line_data[0]['value'].split(',')[1]) or False
|
||||
if not rec_res_id and not rec_res_id:
|
||||
@@ -494,15 +510,15 @@ class account_invoice(osv.osv):
|
||||
for line in inv_obj[0].invoice_line:
|
||||
if line.account_id:
|
||||
if line.account_id.company_id.id != company_id:
|
||||
result_id = self.pool.get('account.account').search(cr,uid,[('name','=',line.account_id.name),('company_id','=',company_id)])
|
||||
result_id = self.pool.get('account.account').search(cr, uid, [('name','=',line.account_id.name),('company_id','=',company_id)])
|
||||
if not result_id:
|
||||
raise osv.except_osv(_('Configration Error !'),
|
||||
_('Can not find account chart for this company in invoice line account, Please Create account.'))
|
||||
r_id = self.pool.get('account.invoice.line').write(cr,uid,[line.id],{'account_id': result_id[0]})
|
||||
r_id = self.pool.get('account.invoice.line').write(cr, uid, [line.id], {'account_id': result_id[0]})
|
||||
else:
|
||||
if invoice_line:
|
||||
for inv_line in invoice_line:
|
||||
obj_l = self.pool.get('account.account').browse(cr,uid,inv_line[2]['account_id'])
|
||||
obj_l = self.pool.get('account.account').browse(cr, uid, inv_line[2]['account_id'])
|
||||
if obj_l.company_id.id != company_id:
|
||||
raise osv.except_osv(_('Configration Error !'),
|
||||
_('invoice line account company is not match with invoice company.'))
|
||||
@@ -565,12 +581,13 @@ class account_invoice(osv.osv):
|
||||
def move_line_id_payment_get(self, cr, uid, ids, *args):
|
||||
res = []
|
||||
if not ids: return res
|
||||
cr.execute('select \
|
||||
l.id \
|
||||
from account_move_line l \
|
||||
left join account_invoice i on (i.move_id=l.move_id) \
|
||||
where i.id in ('+','.join(map(str,map(int, ids)))+') and l.account_id=i.account_id')
|
||||
res = map(lambda x: x[0], cr.fetchall())
|
||||
cr.execute('SELECT l.id '\
|
||||
'FROM account_move_line l '\
|
||||
'LEFT JOIN account_invoice i ON (i.move_id=l.move_id) '\
|
||||
'WHERE i.id IN %s '\
|
||||
'AND l.account_id=i.account_id',
|
||||
(tuple(ids),))
|
||||
res = map(itemgetter(0), cr.fetchall())
|
||||
return res
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
@@ -600,7 +617,7 @@ class account_invoice(osv.osv):
|
||||
ait_obj = self.pool.get('account.invoice.tax')
|
||||
for id in ids:
|
||||
cr.execute("DELETE FROM account_invoice_tax WHERE invoice_id=%s", (id,))
|
||||
partner = self.browse(cr, uid, id,context=context).partner_id
|
||||
partner = self.browse(cr, uid, id, context=context).partner_id
|
||||
if partner.lang:
|
||||
context.update({'lang': partner.lang})
|
||||
for taxe in ait_obj.compute(cr, uid, id, context=context).values():
|
||||
@@ -751,6 +768,10 @@ class account_invoice(osv.osv):
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
context = {}
|
||||
for inv in self.browse(cr, uid, ids):
|
||||
if not inv.journal_id.invoice_sequence_id:
|
||||
raise osv.except_osv(_('Error !'), _('Please define invoice sequence on invoice journal'))
|
||||
if not inv.invoice_line:
|
||||
raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.'))
|
||||
if inv.move_id:
|
||||
continue
|
||||
|
||||
@@ -773,10 +794,17 @@ class account_invoice(osv.osv):
|
||||
# one move line per tax line
|
||||
iml += ait_obj.move_line_get(cr, uid, inv.id)
|
||||
|
||||
entry_type=''
|
||||
if inv.type in ('in_invoice', 'in_refund'):
|
||||
ref = inv.reference
|
||||
entry_type = 'journal_pur_voucher'
|
||||
if inv.type == 'in_refund':
|
||||
entry_type = 'cont_voucher'
|
||||
else:
|
||||
ref = self._convert_ref(cr, uid, inv.number)
|
||||
entry_type = 'journal_sale_vou'
|
||||
if inv.type == 'out_refund':
|
||||
entry_type = 'cont_voucher'
|
||||
|
||||
diff_currency_p = inv.currency_id.id <> company_currency
|
||||
# create one move line for the total and possibly adjust the other lines amount
|
||||
@@ -847,10 +875,10 @@ class account_invoice(osv.osv):
|
||||
|
||||
line = self.finalize_invoice_move_lines(cr, uid, inv, line)
|
||||
|
||||
move = {'ref': inv.number, 'line_id': line, 'journal_id': journal_id, 'date': date}
|
||||
move = {'ref': inv.number, 'line_id': line, 'journal_id': journal_id, 'date': date, 'type': entry_type}
|
||||
period_id=inv.period_id and inv.period_id.id or False
|
||||
if not period_id:
|
||||
period_ids= self.pool.get('account.period').search(cr,uid,[('date_start','<=',inv.date_invoice or time.strftime('%Y-%m-%d')),('date_stop','>=',inv.date_invoice or time.strftime('%Y-%m-%d'))])
|
||||
period_ids= self.pool.get('account.period').search(cr, uid, [('date_start','<=',inv.date_invoice or time.strftime('%Y-%m-%d')),('date_stop','>=',inv.date_invoice or time.strftime('%Y-%m-%d'))])
|
||||
if len(period_ids):
|
||||
period_id=period_ids[0]
|
||||
if period_id:
|
||||
@@ -889,14 +917,15 @@ class account_invoice(osv.osv):
|
||||
|
||||
def action_number(self, cr, uid, ids, *args):
|
||||
cr.execute('SELECT id, type, number, move_id, reference ' \
|
||||
'FROM account_invoice ' \
|
||||
'WHERE id IN ('+','.join(map(str, ids))+')')
|
||||
'FROM account_invoice ' \
|
||||
'WHERE id IN %s',
|
||||
(tuple(ids),))
|
||||
obj_inv = self.browse(cr, uid, ids)[0]
|
||||
for (id, invtype, number, move_id, reference) in cr.fetchall():
|
||||
if not number:
|
||||
if obj_inv.journal_id.invoice_sequence_id:
|
||||
sid = obj_inv.journal_id.invoice_sequence_id.id
|
||||
number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id=%s', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id})
|
||||
number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id})
|
||||
else:
|
||||
number = self.pool.get('ir.sequence').get(cr, uid,
|
||||
'account.invoice.' + invtype)
|
||||
@@ -937,7 +966,7 @@ class account_invoice(osv.osv):
|
||||
raise osv.except_osv(_('Error !'), _('You cannot cancel the Invoice which is Partially Paid! You need to unreconcile concerned payment entries!'))
|
||||
|
||||
self.write(cr, uid, ids, {'state':'cancel', 'move_id':False})
|
||||
self._log_event(cr, uid, ids,-1.0, 'Cancel Invoice')
|
||||
self._log_event(cr, uid, ids, -1.0, 'Cancel Invoice')
|
||||
return True
|
||||
|
||||
###################
|
||||
@@ -1021,6 +1050,10 @@ class account_invoice(osv.osv):
|
||||
tax_lines = self.pool.get('account.invoice.tax').read(cr, uid, invoice['tax_line'])
|
||||
tax_lines = filter(lambda l: l['manual'], tax_lines)
|
||||
tax_lines = self._refund_cleanup_lines(cr, uid, tax_lines)
|
||||
if invoice['type'] == 'in_invoice':
|
||||
refund_journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','=','purchase_refund')])
|
||||
else:
|
||||
refund_journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','=','sale_refund')])
|
||||
if not date :
|
||||
date = time.strftime('%Y-%m-%d')
|
||||
invoice.update({
|
||||
@@ -1029,7 +1062,8 @@ class account_invoice(osv.osv):
|
||||
'state': 'draft',
|
||||
'number': False,
|
||||
'invoice_line': invoice_lines,
|
||||
'tax_line': tax_lines
|
||||
'tax_line': tax_lines,
|
||||
'journal_id': refund_journal_ids
|
||||
})
|
||||
if period_id :
|
||||
invoice.update({
|
||||
@@ -1070,6 +1104,15 @@ class account_invoice(osv.osv):
|
||||
else:
|
||||
amount_currency = False
|
||||
currency_id = False
|
||||
|
||||
pay_journal = self.pool.get('account.journal').read(cr, uid, pay_journal_id, ['type'], context=context)
|
||||
if invoice.type in ('in_invoice', 'out_invoice'):
|
||||
if pay_journal['type'] == 'bank':
|
||||
entry_type = 'bank_pay_voucher' # Bank payment
|
||||
else:
|
||||
entry_type = 'pay_voucher' # Cash payment
|
||||
else:
|
||||
entry_type = 'cont_voucher'
|
||||
if invoice.type in ('in_invoice', 'in_refund'):
|
||||
ref = invoice.reference
|
||||
else:
|
||||
@@ -1104,7 +1147,7 @@ class account_invoice(osv.osv):
|
||||
l2['name'] = name
|
||||
|
||||
lines = [(0, 0, l1), (0, 0, l2)]
|
||||
move = {'ref': ref, 'line_id': lines, 'journal_id': pay_journal_id, 'period_id': period_id, 'date': date}
|
||||
move = {'ref': ref, 'line_id': lines, 'journal_id': pay_journal_id, 'period_id': period_id, 'date': date, 'type': entry_type}
|
||||
move_id = self.pool.get('account.move').create(cr, uid, move, context=context)
|
||||
|
||||
line_ids = []
|
||||
@@ -1113,7 +1156,9 @@ class account_invoice(osv.osv):
|
||||
move_ids = [move_id,]
|
||||
if invoice.move_id:
|
||||
move_ids.append(invoice.move_id.id)
|
||||
cr.execute('SELECT id FROM account_move_line WHERE move_id = ANY(%s)',(move_ids,))
|
||||
cr.execute('SELECT id FROM account_move_line '\
|
||||
'WHERE move_id IN %s',
|
||||
((move_id, invoice.move_id.id),))
|
||||
lines = line.browse(cr, uid, map(lambda x: x[0], cr.fetchall()) )
|
||||
for l in lines+invoice.payment_ids:
|
||||
if l.account_id.id==src_account_id:
|
||||
@@ -1130,7 +1175,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):
|
||||
def _amount_line(self, cr, uid, ids, prop, unknow_none, unknow_dict):
|
||||
res = {}
|
||||
tax_obj = self.pool.get('account.tax')
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
@@ -1182,8 +1227,8 @@ class account_invoice_line(osv.osv):
|
||||
'partner_id': fields.related('invoice_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True)
|
||||
}
|
||||
_defaults = {
|
||||
'quantity': lambda *a: 1,
|
||||
'discount': lambda *a: 0.0,
|
||||
'quantity': 1,
|
||||
'discount': 0.0,
|
||||
'price_unit': _price_unit_default,
|
||||
}
|
||||
|
||||
@@ -1215,12 +1260,12 @@ class account_invoice_line(osv.osv):
|
||||
res = self.pool.get('product.product').browse(cr, uid, product, context=context)
|
||||
|
||||
if company_id:
|
||||
in_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_income'),('res_id','=','product.template,'+str(res.product_tmpl_id.id)+''),('company_id','=',company_id)])
|
||||
in_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_income'),('res_id','=','product.template,'+str(res.product_tmpl_id.id)+''),('company_id','=',company_id)])
|
||||
if not in_pro_id:
|
||||
in_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_income_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
|
||||
exp_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_expense'),('res_id','=','product.template,'+str(res.product_tmpl_id.id)+''),('company_id','=',company_id)])
|
||||
in_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_income_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
|
||||
exp_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_expense'),('res_id','=','product.template,'+str(res.product_tmpl_id.id)+''),('company_id','=',company_id)])
|
||||
if not exp_pro_id:
|
||||
exp_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_expense_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
|
||||
exp_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_expense_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
|
||||
|
||||
if not in_pro_id:
|
||||
in_acc = res.product_tmpl_id.property_account_income
|
||||
@@ -1230,7 +1275,7 @@ class account_invoice_line(osv.osv):
|
||||
else:
|
||||
app_acc_in = in_acc_cate
|
||||
else:
|
||||
app_acc_in = self.pool.get('account.account').browse(cr,uid,in_pro_id)[0]
|
||||
app_acc_in = self.pool.get('account.account').browse(cr, uid, in_pro_id)[0]
|
||||
if not exp_pro_id:
|
||||
ex_acc = res.product_tmpl_id.property_account_expense
|
||||
ex_acc_cate = res.categ_id.property_account_expense_categ
|
||||
@@ -1239,7 +1284,7 @@ class account_invoice_line(osv.osv):
|
||||
else:
|
||||
app_acc_exp = ex_acc_cate
|
||||
else:
|
||||
app_acc_exp = self.pool.get('account.account').browse(cr,uid,exp_pro_id)[0]
|
||||
app_acc_exp = self.pool.get('account.account').browse(cr, uid, exp_pro_id)[0]
|
||||
if not in_pro_id and not exp_pro_id:
|
||||
in_acc = res.product_tmpl_id.property_account_income
|
||||
in_acc_cate = res.categ_id.property_account_income_categ
|
||||
@@ -1255,13 +1300,13 @@ class account_invoice_line(osv.osv):
|
||||
# app_acc_in = self.pool.get('account.account').browse(cr,uid,in_pro_id)[0]
|
||||
# app_acc_exp = self.pool.get('account.account').browse(cr,uid,exp_pro_id)[0]
|
||||
if app_acc_in.company_id.id != company_id and app_acc_exp.company_id.id != company_id:
|
||||
in_res_id=self.pool.get('account.account').search(cr,uid,[('name','=',app_acc_in.name),('company_id','=',company_id)])
|
||||
exp_res_id=self.pool.get('account.account').search(cr,uid,[('name','=',app_acc_exp.name),('company_id','=',company_id)])
|
||||
in_res_id=self.pool.get('account.account').search(cr, uid, [('name','=',app_acc_in.name),('company_id','=',company_id)])
|
||||
exp_res_id=self.pool.get('account.account').search(cr, uid, [('name','=',app_acc_exp.name),('company_id','=',company_id)])
|
||||
if not in_res_id and not exp_res_id:
|
||||
raise osv.except_osv(_('Configration Error !'),
|
||||
_('Can not find account chart for this company, Please Create account.'))
|
||||
in_obj_acc=self.pool.get('account.account').browse(cr,uid,in_res_id)
|
||||
exp_obj_acc=self.pool.get('account.account').browse(cr,uid,exp_res_id)
|
||||
in_obj_acc=self.pool.get('account.account').browse(cr, uid, in_res_id)
|
||||
exp_obj_acc=self.pool.get('account.account').browse(cr, uid, exp_res_id)
|
||||
if in_acc or ex_acc:
|
||||
res.product_tmpl_id.property_account_income = in_obj_acc[0]
|
||||
res.product_tmpl_id.property_account_expense = exp_obj_acc[0]
|
||||
@@ -1285,10 +1330,10 @@ class account_invoice_line(osv.osv):
|
||||
taxep=None
|
||||
tax_obj = self.pool.get('account.tax')
|
||||
if type in ('out_invoice', 'out_refund'):
|
||||
taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid,a).tax_ids or False)
|
||||
taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a).tax_ids or False)
|
||||
tax_id = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
|
||||
else:
|
||||
taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid,a).tax_ids or False)
|
||||
taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a).tax_ids or False)
|
||||
tax_id = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
|
||||
if type in ('in_invoice', 'in_refund'):
|
||||
to_update = self.product_id_change_unit_price_inv(cr, uid, tax_id, price_unit or res.standard_price, qty, address_invoice_id, product, partner_id, context=context)
|
||||
@@ -1300,7 +1345,7 @@ class account_invoice_line(osv.osv):
|
||||
result['name'] = res.partner_ref
|
||||
|
||||
domain = {}
|
||||
result['uos_id'] = uom or res.uom_id.id or False
|
||||
result['uos_id'] = res.uom_id.id or uom or False
|
||||
if result['uos_id']:
|
||||
res2 = res.uom_id.category_id.id
|
||||
if res2 :
|
||||
@@ -1323,8 +1368,22 @@ class account_invoice_line(osv.osv):
|
||||
if company.currency_id.id != currency.id:
|
||||
new_price = res_final['value']['price_unit'] * currency.rate
|
||||
res_final['value']['price_unit'] = new_price
|
||||
|
||||
if uom:
|
||||
uom = self.pool.get('product.uom').browse(cr, uid, uom, context=context)
|
||||
if res.uom_id.category_id.id == uom.category_id.id:
|
||||
new_price = res_final['value']['price_unit'] * uom.factor_inv
|
||||
res_final['value']['price_unit'] = new_price
|
||||
return res_final
|
||||
|
||||
def uos_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
|
||||
res = self.product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context)
|
||||
if 'uos_id' in res['value']:
|
||||
del res['value']['uos_id']
|
||||
if not uom:
|
||||
res['value']['price_unit'] = 0.0
|
||||
return res
|
||||
|
||||
def move_line_get(self, cr, uid, invoice_id, context=None):
|
||||
res = []
|
||||
tax_grouped = {}
|
||||
@@ -1409,25 +1468,25 @@ class account_invoice_tax(osv.osv):
|
||||
'base_amount': fields.float('Base Code Amount', digits_compute=dp.get_precision('Account')),
|
||||
'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="The tax basis of the tax declaration."),
|
||||
'tax_amount': fields.float('Tax Code Amount', digits_compute=dp.get_precision('Account')),
|
||||
'company_id': fields.related('account_id','company_id',type='many2one',relation='res.company',string='Company',store=True),
|
||||
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True),
|
||||
}
|
||||
|
||||
def base_change(self, cr, uid, ids, base,currency_id=False,company_id=False,date_invoice=False):
|
||||
def base_change(self, cr, uid, ids, base, currency_id=False, company_id=False, date_invoice=False):
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
company_obj = self.pool.get('res.company')
|
||||
company_currency=False
|
||||
if company_id:
|
||||
company_currency = company_obj.read(cr,uid,[company_id],['currency_id'])[0]['currency_id'][0]
|
||||
company_currency = company_obj.read(cr, uid, [company_id], ['currency_id'])[0]['currency_id'][0]
|
||||
if currency_id and company_currency:
|
||||
base = cur_obj.compute(cr, uid, currency_id, company_currency, base, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False)
|
||||
return {'value': {'base_amount':base}}
|
||||
|
||||
def amount_change(self, cr, uid, ids, amount,currency_id=False,company_id=False,date_invoice=False):
|
||||
def amount_change(self, cr, uid, ids, amount, currency_id=False, company_id=False, date_invoice=False):
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
company_obj = self.pool.get('res.company')
|
||||
company_currency=False
|
||||
if company_id:
|
||||
company_currency = company_obj.read(cr,uid,[company_id],['currency_id'])[0]['currency_id'][0]
|
||||
company_currency = company_obj.read(cr, uid, [company_id], ['currency_id'])[0]['currency_id'][0]
|
||||
if currency_id and company_currency:
|
||||
amount = cur_obj.compute(cr, uid, currency_id, company_currency, amount, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False)
|
||||
return {'value': {'tax_amount':amount}}
|
||||
@@ -1512,4 +1571,7 @@ class res_partner(osv.osv):
|
||||
_columns = {
|
||||
'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices', readonly=True),
|
||||
}
|
||||
|
||||
res_partner()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
+35
-33
@@ -18,6 +18,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from operator import itemgetter
|
||||
|
||||
from osv import fields, osv
|
||||
import ir
|
||||
@@ -88,22 +89,19 @@ class res_partner(osv.osv):
|
||||
_name = 'res.partner'
|
||||
_inherit = 'res.partner'
|
||||
_description = 'Partner'
|
||||
|
||||
def _credit_debit_get(self, cr, uid, ids, field_names, arg, context):
|
||||
query = self.pool.get('account.move.line')._query_get(cr, 1, context=context)
|
||||
cr.execute("""select
|
||||
l.partner_id, a.type, sum(l.debit-l.credit)
|
||||
from
|
||||
account_move_line l
|
||||
left join
|
||||
account_account a on (l.account_id=a.id)
|
||||
where
|
||||
a.type =ANY(%s) and
|
||||
l.partner_id =ANY(%s) and
|
||||
l.reconcile_id is null and
|
||||
"""+query+"""
|
||||
group by
|
||||
l.partner_id, a.type
|
||||
""",(['receivable','payable'],ids,))
|
||||
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
|
||||
cr.execute("""SELECT l.partner_id, a.type, SUM(l.debit-l.credit)
|
||||
FROM account_move_line l
|
||||
LEFT JOIN account_account a ON (l.account_id=a.id)
|
||||
WHERE a.type IN ('receivable','payable')
|
||||
AND l.partner_id IN %s
|
||||
AND l.reconcile_id IS NULL
|
||||
AND """ + query + """
|
||||
GROUP BY l.partner_id, a.type
|
||||
""",
|
||||
(tuple(ids),))
|
||||
tinvert = {
|
||||
'credit': 'receivable',
|
||||
'debit': 'payable'
|
||||
@@ -117,27 +115,33 @@ class res_partner(osv.osv):
|
||||
res[pid][maps[type]] = (type=='receivable') and val or -val
|
||||
return res
|
||||
|
||||
def _credit_search(self, cr, uid, obj, name, args, context):
|
||||
def _asset_difference_search(self, cr, uid, obj, name, type, args, context=None):
|
||||
if not len(args):
|
||||
return []
|
||||
where = ' and '.join(map(lambda x: '(sum(debit-credit)'+x[1]+str(x[2])+')',args))
|
||||
query = self.pool.get('account.move.line')._query_get(cr, uid, context={})
|
||||
cr.execute(('select partner_id from account_move_line l where account_id in (select id from account_account where type=%s and active) and reconcile_id is null and '+query+' and partner_id is not null group by partner_id having '+where), ('receivable',) )
|
||||
having_values = tuple(map(itemgetter(2), args))
|
||||
where = ' AND '.join(
|
||||
map(lambda x: '(SUM(debit-credit) %(operator)s %%s)' % {
|
||||
'operator':x[1]},args))
|
||||
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
|
||||
cr.execute(('SELECT partner_id FROM account_move_line l '\
|
||||
'WHERE account_id IN '\
|
||||
'(SELECT id FROM account_account '\
|
||||
'WHERE type=%s AND active) '\
|
||||
'AND reconcile_id IS NULL '\
|
||||
'AND '+query+' '\
|
||||
'AND partner_id IS NOT NULL '\
|
||||
'GROUP BY partner_id HAVING '+where),
|
||||
(type,) + having_values)
|
||||
res = cr.fetchall()
|
||||
if not len(res):
|
||||
return [('id','=','0')]
|
||||
return [('id','in',map(lambda x:x[0], res))]
|
||||
return [('id','in',map(itemgetter(0), res))]
|
||||
|
||||
def _credit_search(self, cr, uid, obj, name, args, context):
|
||||
return self._asset_difference_search(cr, uid, obj, name, 'receivable', args, context=context)
|
||||
|
||||
def _debit_search(self, cr, uid, obj, name, args, context):
|
||||
if not len(args):
|
||||
return []
|
||||
query = self.pool.get('account.move.line')._query_get(cr, uid, context={})
|
||||
where = ' and '.join(map(lambda x: '(sum(debit-credit)'+x[1]+str(x[2])+')',args))
|
||||
cr.execute(('select partner_id from account_move_line l where account_id in (select id from account_account where type=%s and active) and reconcile_id is null and '+query+' and partner_id is not null group by partner_id having '+where), ('payable',) )
|
||||
res = cr.fetchall()
|
||||
if not len(res):
|
||||
return [('id','=','0')]
|
||||
return [('id','in',map(lambda x:x[0], res))]
|
||||
return self._asset_difference_search(cr, uid, obj, name, 'payable', args, context=context)
|
||||
|
||||
_columns = {
|
||||
'credit': fields.function(_credit_debit_get,
|
||||
@@ -183,10 +187,8 @@ class res_partner(osv.osv):
|
||||
help="This payment term will be used instead of the default one for the current partner"),
|
||||
'ref_companies': fields.one2many('res.company', 'partner_id',
|
||||
'Companies that refers to partner'),
|
||||
'last_reconciliation_date': fields.datetime('Last Reconciliation Date', help='Date on which partner account entries reconciled last time')
|
||||
}
|
||||
res_partner()
|
||||
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -10,9 +10,9 @@
|
||||
<form string="Fiscal Position">
|
||||
<field name="name" select="1"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<separator string="Mapping" colspan="4"/>
|
||||
<newline/>
|
||||
<field name="note" colspan="4"/>
|
||||
<field name="tax_ids" colspan="4" widget="one2many_list">
|
||||
<field name="tax_ids" colspan="2" widget="one2many_list" nolabel="1">
|
||||
<tree string="Tax Mapping" editable="bottom">
|
||||
<field name="tax_src_id" domain="[('parent_id','=',False)]"/>
|
||||
<field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
|
||||
@@ -22,7 +22,7 @@
|
||||
<field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
|
||||
</form>
|
||||
</field>
|
||||
<field name="account_ids" colspan="4" widget="one2many_list">
|
||||
<field name="account_ids" colspan="2" widget="one2many_list" nolabel="1">
|
||||
<tree string="Account Mapping" editable="bottom">
|
||||
<field name="account_src_id"/>
|
||||
<field name="account_dest_id"/>
|
||||
@@ -32,6 +32,8 @@
|
||||
<field name="account_dest_id"/>
|
||||
</form>
|
||||
</field>
|
||||
<separator string="Notes" colspan="4"/>
|
||||
<field name="note" colspan="4" nolabel="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -57,7 +59,7 @@
|
||||
<menuitem
|
||||
action="action_account_fiscal_position_form"
|
||||
id="menu_action_account_fiscal_position_form"
|
||||
parent="account.menu_finance_accounting" sequence="20"/>
|
||||
parent="next_id_27" sequence="20"/>
|
||||
|
||||
<!--
|
||||
Partners Extension
|
||||
@@ -70,8 +72,8 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<notebook>
|
||||
<page string="Accounting" position="inside">
|
||||
<page string="Notes" position="before">
|
||||
<page string="Accounting">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Customer Accounting Properties" colspan="2"/>
|
||||
<field name="property_account_receivable" groups="account.group_account_user" />
|
||||
@@ -119,13 +121,13 @@
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Partners info tab view-->
|
||||
|
||||
<act_window
|
||||
<act_window
|
||||
id="action_analytic_open"
|
||||
name="Analytic Accounts"
|
||||
res_model="account.analytic.account"
|
||||
@@ -134,5 +136,16 @@
|
||||
view_type="form"
|
||||
view_mode="tree,form,graph,calendar"/>
|
||||
|
||||
<record id="view_res_partner_reconcile" model="ir.ui.view">
|
||||
<field name="name">res.partner.form.reconcile</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="credit_limit" position="after">
|
||||
<field name="last_reconciliation_date"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</record>
|
||||
|
||||
<record id="process_node_invoiceinvoice0" model="process.node">
|
||||
<field name="menu_id" ref="account.menu_finance_invoice"/>
|
||||
<field name="menu_id" ref="account.menu_finance_receivables"/>
|
||||
<field name="model_id" ref="account.model_account_invoice"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Create Invoice"""" name="name"/>
|
||||
@@ -50,7 +50,7 @@
|
||||
</record>
|
||||
|
||||
<record id="process_node_accountingentries0" model="process.node">
|
||||
<field name="menu_id" ref="account.menu_action_move_line_form"/>
|
||||
<field name="menu_id" ref="account.menu_action_move_journal_line_form"/>
|
||||
<field name="model_id" ref="account.model_account_move"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Accounting"""" name="name"/>
|
||||
@@ -72,7 +72,7 @@
|
||||
</record>
|
||||
|
||||
<record id="process_node_paymententries0" model="process.node">
|
||||
<field name="menu_id" ref="account.menu_action_move_line_form"/>
|
||||
<field name="menu_id" ref="account.menu_action_move_journal_line_form"/>
|
||||
<field name="model_id" ref="account.model_account_move_line"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Payment"""" name="name"/>
|
||||
@@ -83,7 +83,7 @@
|
||||
</record>
|
||||
|
||||
<record id="process_node_reconciliation0" model="process.node">
|
||||
<field name="menu_id" ref="account.menu_action_move_line_search"/>
|
||||
<field name="menu_id" ref="account.menu_eaction_account_moves_all"/>
|
||||
<field name="model_id" ref="account.model_account_move_reconcile"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Reconciliation"""" name="name"/>
|
||||
@@ -105,7 +105,7 @@
|
||||
</record>
|
||||
|
||||
<record id="process_node_accountingstatemententries0" model="process.node">
|
||||
<field name="menu_id" ref="account.menu_action_move_line_search"/>
|
||||
<field name="menu_id" ref="account.menu_eaction_account_moves_all"/>
|
||||
<field name="model_id" ref="account.model_account_move_line"/>
|
||||
<field eval=""""subflow"""" name="kind"/>
|
||||
<field eval=""""Bank Statement"""" name="name"/>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</record>
|
||||
|
||||
<record id="process_node_supplierinvoiceinvoice0" model="process.node">
|
||||
<field name="menu_id" ref="account.menu_finance_invoice"/>
|
||||
<field name="menu_id" ref="account.menu_finance_payables"/>
|
||||
<field name="model_id" ref="account.model_account_invoice"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Create Invoice"""" name="name"/>
|
||||
@@ -62,7 +62,7 @@
|
||||
</record>
|
||||
|
||||
<record id="process_node_supplieraccountingentries0" model="process.node">
|
||||
<field name="menu_id" ref="account.menu_action_move_line_form"/>
|
||||
<field name="menu_id" ref="account.menu_action_move_journal_line_form"/>
|
||||
<field name="model_id" ref="account.model_account_move"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Accounting"""" name="name"/>
|
||||
@@ -72,7 +72,7 @@
|
||||
</record>
|
||||
|
||||
<record id="process_node_supplierpaymentorder0" model="process.node">
|
||||
<field name="menu_id" ref="account.menu_action_move_line_search"/>
|
||||
<field name="menu_id" ref="account.menu_eaction_account_moves_all"/>
|
||||
<field name="model_id" ref="account.model_account_move_line"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Payment Order"""" name="name"/>
|
||||
@@ -83,7 +83,7 @@
|
||||
</record>
|
||||
|
||||
<record id="process_node_supplierreconciliation0" model="process.node">
|
||||
<field name="menu_id" ref="account.menu_action_move_line_search"/>
|
||||
<field name="menu_id" ref="account.menu_eaction_account_moves_all"/>
|
||||
<field name="model_id" ref="account.model_account_move_reconcile"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Reconciliation"""" name="name"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,7 +15,7 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -33,7 +33,7 @@ class product_category(osv.osv):
|
||||
string="Income Account",
|
||||
method=True,
|
||||
view_load=True,
|
||||
help="This account will be used to value incoming stock(i.e. credit of incoming goods) for the current product category"),
|
||||
help="This account will be used for invoices to value sales for the current product category"),
|
||||
'property_account_expense_categ': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
@@ -41,7 +41,7 @@ class product_category(osv.osv):
|
||||
string="Expense Account",
|
||||
method=True,
|
||||
view_load=True,
|
||||
help="This account will be used to value outgoing stock(i.e. debit of outgoing goods) for the current product category"),
|
||||
help="This account will be used for invoices to value expenses for the current product category"),
|
||||
}
|
||||
product_category()
|
||||
|
||||
@@ -64,7 +64,7 @@ class product_template(osv.osv):
|
||||
string="Income Account",
|
||||
method=True,
|
||||
view_load=True,
|
||||
help="This account will be used instead of the default one to value incoming stock for the current product"),
|
||||
help="This account will be used for invoices instead of the default one to value sales for the current product"),
|
||||
'property_account_expense': fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
@@ -72,7 +72,7 @@ class product_template(osv.osv):
|
||||
string="Expense Account",
|
||||
method=True,
|
||||
view_load=True,
|
||||
help="This account will be used instead of the default one to value outgoing stock for the current product"),
|
||||
help="This account will be used for invoices instead of the default one to value expenses for the current product"),
|
||||
}
|
||||
product_template()
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
<separator string="Purchase Properties" colspan="2"/>
|
||||
<field name="property_account_income" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="property_account_expense" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="supplier_taxes_id"/>
|
||||
<field name="taxes_id"/>
|
||||
<field name="supplier_taxes_id"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,7 +15,7 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -46,7 +46,7 @@ class account_journal(osv.osv):
|
||||
_inherit="account.journal"
|
||||
|
||||
_columns = {
|
||||
'analytic_journal_id':fields.many2one('account.analytic.journal','Analytic Journal'),
|
||||
'analytic_journal_id':fields.many2one('account.analytic.journal','Analytic Journal',help="Journal for analytic entries"),
|
||||
}
|
||||
account_journal()
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Analytic Account">
|
||||
<group col="8" colspan="4">
|
||||
<group col="8" colspan="4">
|
||||
<filter icon="terp-check" string="Current" domain="[('state','=','open')]" help="Current Accounts"/>
|
||||
<filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
|
||||
<separator orientation="vertical"/>
|
||||
@@ -32,7 +32,15 @@
|
||||
<field name="code" select="1"/>
|
||||
<field name="partner_id" select="1"/>
|
||||
<field name="user_id" widget="selection"/>
|
||||
</group>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Parent" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
|
||||
<filter string="Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Associated Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
@@ -53,6 +61,10 @@
|
||||
<field name="balance"/>
|
||||
<field name="quantity"/>
|
||||
<field name="quantity_max"/>
|
||||
<field name="parent_id" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -101,7 +113,7 @@
|
||||
<field name="search_view_id" ref="account.view_account_analytic_account_search"/>
|
||||
</record>
|
||||
<!--<menuitem id="menu_analytic_account" name="Analytic Accounts" parent="account.menu_analytic_accounting"/>-->
|
||||
<menuitem action="action_account_analytic_account_form" id="account_analytic_def_account" parent="account.menu_analytic_accounting"/>
|
||||
<menuitem action="action_account_analytic_account_form" id="account_analytic_def_account" parent="menu_analytic"/>
|
||||
|
||||
<record id="act_account_renew_view" model="ir.actions.act_window">
|
||||
<field name="name">Accounts to Renew</field>
|
||||
@@ -114,7 +126,7 @@
|
||||
</record>
|
||||
|
||||
<record id="action_account_analytic_account_tree2" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Chart of Accounts</field>
|
||||
<field name="name">Chart of Analytic Accounts</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="domain">[('parent_id','=',False)]</field>
|
||||
@@ -122,10 +134,10 @@
|
||||
<field name="view_mode">form,graph</field>
|
||||
<field name="view_id" ref="view_account_analytic_account_tree"/>
|
||||
</record>
|
||||
<menuitem
|
||||
action="action_account_analytic_account_tree2"
|
||||
id="account_analytic_def_chart"
|
||||
parent="account_analytic_def_account"/>
|
||||
<!-- <menuitem-->
|
||||
<!-- action="action_account_analytic_account_tree2"-->
|
||||
<!-- id="account_analytic_def_chart"-->
|
||||
<!-- parent="account_analytic_def_account"/>-->
|
||||
<!-- <menuitem action="action_account_analytic_account_tree2" id="account_analytic_chart" parent="account.menu_finance_charts"/>-->
|
||||
|
||||
<!-- <wizard id="wizard_analytic_account_chart" menu="False" model="account.analytic.account" name="account.analytic.account.chart" string="Analytic Chart of Accounts"/>
|
||||
@@ -148,7 +160,7 @@
|
||||
<field name="journal_id" select="2"/>
|
||||
<field name="general_account_id" select="2"/>
|
||||
<field name="move_id" select="2"/>
|
||||
<separator string="Optionnal Information" colspan="4"/>
|
||||
<separator string="Optional Information" colspan="4"/>
|
||||
<field name="unit_amount" select="2"/>
|
||||
<field name="ref" select="2"/>
|
||||
<field name="currency_id" select="2"/>
|
||||
@@ -195,6 +207,13 @@
|
||||
<field name="date" select="1"/>
|
||||
<field name="user_id" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group string="Group By..." expand="0">
|
||||
<filter string="General Account" context="{'group_by':'general_account_id'}"/>
|
||||
<filter string="Analytic Account" context="{'group_by':'account_id'}"/>
|
||||
<filter string="Analytic Journal" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Product" context="{'group_by':'product_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
@@ -206,14 +225,14 @@
|
||||
<field name="context">{"search_default_user_id":uid}</field>
|
||||
<field name="view_id" ref="view_account_analytic_line_tree"/>
|
||||
</record>
|
||||
<wizard id="action_account_analytic_line" menu="False" model="account.analytic.line" name="account.analytic.line" string="Entries by Line"/>
|
||||
<menuitem id="next_id_41" name="Analytic Entries" parent="account.menu_finance_entries"/>
|
||||
<!-- <wizard id="action_account_analytic_line" menu="False" model="account.analytic.line" name="account.analytic.line" string="Entries by Line"/>-->
|
||||
<!-- <menuitem id="next_id_41" name="Analytic Entries" parent="account.menu_finance_entries"/>-->
|
||||
<!-- Entries by Line -->
|
||||
|
||||
<menuitem icon="STOCK_JUSTIFY_FILL"
|
||||
action="action_project_account_analytic_line_form"
|
||||
id="account_entries_analytic_entries"
|
||||
parent="next_id_41"/>
|
||||
<!-- <menuitem icon="STOCK_JUSTIFY_FILL"-->
|
||||
<!-- action="action_project_account_analytic_line_form"-->
|
||||
<!-- id="account_entries_analytic_entries"-->
|
||||
<!-- parent="next_id_41"/>-->
|
||||
|
||||
<record id="action_account_tree1" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Entries</field>
|
||||
@@ -278,6 +297,19 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_analytic_journal_search" model="ir.ui.view">
|
||||
<field name="name">account.analytic.journal.search</field>
|
||||
<field name="model">account.analytic.journal</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="analytic Journals">
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_analytic_journal_form" model="ir.ui.view">
|
||||
<field name="name">account.analytic.journal.form</field>
|
||||
<field name="model">account.analytic.journal</field>
|
||||
@@ -293,31 +325,48 @@
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_account_analytic_journal_form" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Journal Definition</field>
|
||||
<field name="name">Analytic Journals</field>
|
||||
<field name="res_model">account.analytic.journal</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="account.menu_analytic_accounting"/>
|
||||
<menuitem action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic"/>
|
||||
|
||||
#
|
||||
# Open journal entries
|
||||
#
|
||||
|
||||
<record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
|
||||
<field name="name">Entries of Open Analytic Journals</field>
|
||||
<field name="name">Analytic Journal Items</field>
|
||||
<field name="res_model">account.analytic.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_journal_open_form" id="account_analytic_journal_entries" parent="menu_finance_entries"/>
|
||||
<!-- <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
|
||||
<field name="name">Check Register</field>
|
||||
<field name="res_model">account.analytic.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('journal_id','=',active_id)]</field>
|
||||
</record>
|
||||
<record id="ir_open_account_journal_analytic" model="ir.values">
|
||||
<field eval="'tree_but_open'" name="key2"/>
|
||||
<field eval="'account.analytic.journal'" name="model"/>
|
||||
<field name="name">Open Analytic Journal</field>
|
||||
<field eval="'ir.actions.act_window,%d'%action_account_analytic_journal_open_form" name="value"/>
|
||||
<field eval="True" name="object"/>
|
||||
</record>
|
||||
</record> -->
|
||||
<!-- <menuitem action="action_account_analytic_journal_open_form" id="account_analytic_journal_entries" parent="menu_finance_bank_and_cash"/>-->
|
||||
<!-- <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
|
||||
<field name="name">Check Registers</field>
|
||||
<field name="res_model">account.analytic.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('journal_id','=',active_id)]</field>
|
||||
</record> -->
|
||||
<!-- <menuitem action="action_account_analytic_journal_open_form" id="account_analytic_journal_entries" parent="menu_finance_bank_and_cash"/>-->
|
||||
|
||||
<!-- <record id="ir_open_account_journal_analytic" model="ir.values">-->
|
||||
<!-- <field eval="'tree_but_open'" name="key2"/>-->
|
||||
<!-- <field eval="'account.analytic.journal'" name="model"/>-->
|
||||
<!-- <field name="name">Open Analytic Journal</field>-->
|
||||
<!-- <field eval="'ir.actions.act_window,%d'%action_account_analytic_journal_open_form" name="value"/>-->
|
||||
<!-- <field eval="True" name="object"/>-->
|
||||
<!-- </record>-->
|
||||
|
||||
#
|
||||
# Reporting
|
||||
@@ -331,13 +380,13 @@
|
||||
<menuitem action="action_account_analytic_journal_tree" id="account_analytic_journal_print" parent="account.next_id_40"/>
|
||||
|
||||
|
||||
<record id="action_account_analytic_journal_tree2" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Entries by Journal</field>
|
||||
<field name="res_model">account.analytic.journal</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_id" ref="view_account_analytic_journal_tree"/>
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_journal_tree2" id="account_analytic_journal_entries" parent="account.next_id_41"/>
|
||||
<!-- <record id="action_account_analytic_journal_tree2" model="ir.actions.act_window">-->
|
||||
<!-- <field name="name">Analytic Entries by Journal</field>-->
|
||||
<!-- <field name="res_model">account.analytic.journal</field>-->
|
||||
<!-- <field name="view_type">tree</field>-->
|
||||
<!-- <field name="view_id" ref="view_account_analytic_journal_tree"/>-->
|
||||
<!-- </record>-->
|
||||
<!-- <menuitem action="action_account_analytic_journal_tree2" id="account_analytic_journal_entries" parent="account.next_id_41"/>-->
|
||||
|
||||
#
|
||||
# Statistics
|
||||
|
||||
@@ -32,15 +32,9 @@ class account_analytic_balance(report_sxw.rml_parse):
|
||||
'get_objects': self._get_objects,
|
||||
'lines_g': self._lines_g,
|
||||
'move_sum': self._move_sum,
|
||||
# 'move_sum_debit': self._move_sum_debit,
|
||||
# 'move_sum_credit': self._move_sum_credit,
|
||||
'sum_all': self._sum_all,
|
||||
# 'sum_debit': self._sum_debit,
|
||||
# 'sum_credit': self._sum_credit,
|
||||
'sum_balance': self._sum_balance,
|
||||
# 'sum_quantity': self._sum_quantity,
|
||||
'move_sum_balance': self._move_sum_balance,
|
||||
# 'move_sum_quantity': self._move_sum_quantity,
|
||||
})
|
||||
self.acc_ids = []
|
||||
self.read_data = []
|
||||
@@ -81,10 +75,10 @@ class account_analytic_balance(report_sxw.rml_parse):
|
||||
sum(aal.amount) AS balance, sum(aal.unit_amount) AS quantity \
|
||||
FROM account_analytic_line AS aal, account_account AS aa \
|
||||
WHERE (aal.general_account_id=aa.id) \
|
||||
AND (aal.account_id in (" + ','.join(map(str, ids)) + "))\
|
||||
AND (aal.account_id IN aal.account_id IN %s)\
|
||||
AND (date>=%s) AND (date<=%s) AND aa.active \
|
||||
GROUP BY aal.general_account_id, aa.name, aa.code, aal.code \
|
||||
ORDER BY aal.code", (date1, date2))
|
||||
ORDER BY aal.code", (tuple(ids), date1, date2))
|
||||
res = self.cr.dictfetchall()
|
||||
|
||||
for r in res:
|
||||
@@ -107,62 +101,26 @@ class account_analytic_balance(report_sxw.rml_parse):
|
||||
self.acc_data_dict[account_id] = ids
|
||||
else:
|
||||
ids = self.acc_data_dict[account_id]
|
||||
|
||||
|
||||
query_params = (tuple(ids), date1, date2)
|
||||
if option == "credit" :
|
||||
self.cr.execute("SELECT -sum(amount) FROM account_analytic_line \
|
||||
WHERE account_id =ANY(%s) AND date>=%s AND date<=%s AND amount<0",
|
||||
(ids,date1, date2))
|
||||
WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0",query_params)
|
||||
elif option == "debit" :
|
||||
self.cr.execute("SELECT sum(amount) FROM account_analytic_line \
|
||||
WHERE account_id =ANY(%s)\
|
||||
AND date>=%s AND date<=%s AND amount>0",
|
||||
(ids,date1, date2))
|
||||
WHERE account_id IN %s\
|
||||
AND date>=%s AND date<=%s AND amount>0",query_params)
|
||||
elif option == "quantity" :
|
||||
self.cr.execute("SELECT sum(unit_amount) FROM account_analytic_line \
|
||||
WHERE account_id =ANY(%s)\
|
||||
AND date>=%s AND date<=%s",
|
||||
(ids,date1, date2))
|
||||
WHERE account_id IN %s\
|
||||
AND date>=%s AND date<=%s",query_params)
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
|
||||
# def _move_sum_debit(self, account_id, date1, date2):
|
||||
# account_analytic_obj = self.pool.get('account.analytic.account')
|
||||
# ids = account_analytic_obj.search(self.cr, self.uid,
|
||||
# [('parent_id', 'child_of', [account_id])])
|
||||
# self.cr.execute("SELECT sum(amount) \
|
||||
# FROM account_analytic_line \
|
||||
# WHERE account_id in ("+ ','.join(map(str, ids)) +") \
|
||||
# AND date>=%s AND date<=%s AND amount>0",
|
||||
# (date1, date2))
|
||||
# return self.cr.fetchone()[0] or 0.0
|
||||
#
|
||||
# def _move_sum_credit(self, account_id, date1, date2):
|
||||
# account_analytic_obj = self.pool.get('account.analytic.account')
|
||||
# ids = account_analytic_obj.search(self.cr, self.uid,
|
||||
# [('parent_id', 'child_of', [account_id])])
|
||||
# self.cr.execute("SELECT -sum(amount) \
|
||||
# FROM account_analytic_line \
|
||||
# WHERE account_id in ("+ ','.join(map(str, ids)) +") \
|
||||
# AND date>=%s AND date<=%s AND amount<0",
|
||||
# (date1, date2))
|
||||
# return self.cr.fetchone()[0] or 0.0
|
||||
#
|
||||
def _move_sum_balance(self, account_id, date1, date2):
|
||||
debit = self._move_sum(account_id, date1, date2, 'debit')
|
||||
credit = self._move_sum(account_id, date1, date2, 'credit')
|
||||
return (debit-credit)
|
||||
|
||||
# def _move_sum_quantity(self, account_id, date1, date2):
|
||||
# account_analytic_obj = self.pool.get('account.analytic.account')
|
||||
# ids = account_analytic_obj.search(self.cr, self.uid,
|
||||
# [('parent_id', 'child_of', [account_id])])
|
||||
# self.cr.execute("SELECT sum(unit_amount) \
|
||||
# FROM account_analytic_line \
|
||||
# WHERE account_id in ("+ ','.join(map(str, ids)) +") \
|
||||
# AND date>=%s AND date<=%s",
|
||||
# (date1, date2))
|
||||
# return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _sum_all(self, accounts, date1, date2, option):
|
||||
ids = map(lambda x: x['id'], accounts)
|
||||
if not len(ids):
|
||||
@@ -174,68 +132,25 @@ class account_analytic_balance(report_sxw.rml_parse):
|
||||
self.acc_sum_list = ids2
|
||||
else:
|
||||
ids2 = self.acc_sum_list
|
||||
query_params = (tuple(ids2), date1, date2)
|
||||
if option == "debit" :
|
||||
self.cr.execute("SELECT sum(amount) FROM account_analytic_line \
|
||||
WHERE account_id =ANY(%s) AND date>=%s AND date<=%s AND amount>0",
|
||||
(ids,date1, date2,))
|
||||
WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0",query_params)
|
||||
elif option == "credit" :
|
||||
self.cr.execute("SELECT -sum(amount) FROM account_analytic_line \
|
||||
WHERE account_id =ANY(%s) AND date>=%s AND date<=%s AND amount<0",
|
||||
(ids,date1, date2,))
|
||||
WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0",query_params)
|
||||
elif option == "quantity" :
|
||||
self.cr.execute("SELECT sum(unit_amount) FROM account_analytic_line \
|
||||
WHERE account_id =ANY(%s)AND date>=%s AND date<=%s",
|
||||
(ids,date1, date2,))
|
||||
WHERE account_id IN %s AND date>=%s AND date<=%s",query_params)
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
|
||||
# def _sum_debit(self, accounts, date1, date2):
|
||||
# ids = map(lambda x: x['id'], accounts)
|
||||
# if not len(ids):
|
||||
# return 0.0
|
||||
# account_analytic_obj = self.pool.get('account.analytic.account')
|
||||
# ids2 = account_analytic_obj.search(self.cr, self.uid,
|
||||
# [('parent_id', 'child_of', ids)])
|
||||
# self.cr.execute("SELECT sum(amount) \
|
||||
# FROM account_analytic_line \
|
||||
# WHERE account_id IN ("+','.join(map(str, ids2))+") \
|
||||
# AND date>=%s AND date<=%s AND amount>0",
|
||||
# (date1, date2))
|
||||
# return self.cr.fetchone()[0] or 0.0
|
||||
#
|
||||
# def _sum_credit(self, accounts, date1, date2):
|
||||
# ids = map(lambda x: x['id'], accounts)
|
||||
# if not len(ids):
|
||||
# return 0.0
|
||||
# ids = map(lambda x: x['id'], accounts)
|
||||
# account_analytic_obj = self.pool.get('account.analytic.account')
|
||||
# ids2 = account_analytic_obj.search(self.cr, self.uid,
|
||||
# [('parent_id', 'child_of', ids)])
|
||||
# self.cr.execute("SELECT -sum(amount) \
|
||||
# FROM account_analytic_line \
|
||||
# WHERE account_id IN ("+','.join(map(str, ids2))+") \
|
||||
# AND date>=%s AND date<=%s AND amount<0",
|
||||
# (date1, date2))
|
||||
# return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _sum_balance(self, accounts, date1, date2):
|
||||
debit = self._sum_all(accounts, date1, date2, 'debit') or 0.0
|
||||
credit = self._sum_all(accounts, date1, date2, 'credit') or 0.0
|
||||
return (debit-credit)
|
||||
|
||||
# def _sum_quantity(self, accounts, date1, date2):
|
||||
# ids = map(lambda x: x['id'], accounts)
|
||||
# if not len(ids):
|
||||
# return 0.0
|
||||
# account_analytic_obj = self.pool.get('account.analytic.account')
|
||||
# ids2 = account_analytic_obj.search(self.cr, self.uid,
|
||||
# [('parent_id', 'child_of', ids)])
|
||||
# self.cr.execute("SELECT sum(unit_amount) \
|
||||
# FROM account_analytic_line \
|
||||
# WHERE account_id IN ("+','.join(map(str, ids2))+") \
|
||||
# AND date>=%s AND date<=%s",
|
||||
# (date1, date2))
|
||||
# return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
report_sxw.report_sxw('report.account.analytic.account.balance',
|
||||
'account.analytic.account', 'addons/account/project/report/analytic_balance.rml',
|
||||
|
||||
@@ -77,41 +77,6 @@ class account_analytic_analytic_check(report_sxw.rml_parse):
|
||||
|
||||
return res
|
||||
|
||||
# def _lines_p(self, date1, date2):
|
||||
# res = []
|
||||
# acc_obj = self.pool.get('account.account')
|
||||
# for a in acc_obj.read(self.cr, self.uid, self.ids, ['name', 'code','sign']):
|
||||
# self.cr.execute("SELECT sum(debit), sum(credit) \
|
||||
# FROM account_move_line \
|
||||
# WHERE date>=%s AND date<=%s AND state<>'draft' AND account_id = %s", (date1, date2, a['id']))
|
||||
# (gd, gc) = self.cr.fetchone()
|
||||
# gd = gd or 0.0
|
||||
# gc = gc or 0.0
|
||||
#
|
||||
# self.cr.execute("SELECT abs(sum(amount)) AS balance \
|
||||
# FROM account_analytic_line \
|
||||
# WHERE date>=%s AND date<=%s AND amount*%s>0 AND general_account_id = %s", (date1, date2, a['sign'], a['id']))
|
||||
# (ad,) = self.cr.fetchone()
|
||||
# ad = ad or 0.0
|
||||
# self.cr.execute("SELECT abs(sum(amount)) AS balance \
|
||||
# FROM account_analytic_line \
|
||||
# WHERE date>=%s AND date<=%s AND amount*%s<0 AND general_account_id = %s", (date1, date2, a['sign'], a['id']))
|
||||
# (ac,) = self.cr.fetchone()
|
||||
# ac = ac or 0.0
|
||||
#
|
||||
# res.append({'code': a['code'], 'name': a['name'],
|
||||
# 'gen_debit': gd,
|
||||
# 'gen_credit': gc,
|
||||
# 'ana_debit': ad,
|
||||
# 'ana_credit': ac,
|
||||
# 'delta_debit': gd - ad,
|
||||
# 'delta_credit': gc - ac,})
|
||||
# self.sum_gen_deb += gd
|
||||
# self.sum_gen_cred += gc
|
||||
# self.sum_ana_deb += ad
|
||||
# self.sum_ana_cred += ac
|
||||
# return res
|
||||
|
||||
def _gen_deb(self, date1, date2):
|
||||
return self.sum_gen_deb
|
||||
|
||||
|
||||
@@ -93,15 +93,14 @@ class account_analytic_cost_ledger(report_sxw.rml_parse):
|
||||
ids = map(lambda x: x.id, accounts)
|
||||
if not len(ids):
|
||||
return 0.0
|
||||
self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id =ANY(%s) AND date>=%s AND date<=%s AND amount>0", (ids, date1, date2,))
|
||||
self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(ids), date1, date2,))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _sum_credit(self, accounts, date1, date2):
|
||||
ids = map(lambda x: x.id, accounts)
|
||||
if not len(ids):
|
||||
return 0.0
|
||||
ids = map(lambda x: x.id, accounts)
|
||||
self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id =ANY(%s) AND date>=%s AND date<=%s AND amount<0", (ids,date1, date2,))
|
||||
self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(ids),date1, date2,))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _sum_balance(self, accounts, date1, date2):
|
||||
|
||||
@@ -38,12 +38,17 @@ class account_inverted_analytic_balance(report_sxw.rml_parse):
|
||||
|
||||
def _lines_g(self, accounts, date1, date2):
|
||||
ids = map(lambda x: x.id, accounts)
|
||||
self.cr.execute("SELECT aa.name AS name, aa.code AS code, sum(aal.amount) AS balance, sum(aal.unit_amount) AS quantity, aa.id AS id \
|
||||
self.cr.execute("SELECT aa.name AS name, aa.code AS code, "
|
||||
"sum(aal.amount) AS balance, "
|
||||
"sum(aal.unit_amount) AS quantity, aa.id AS id \
|
||||
FROM account_analytic_line AS aal, account_account AS aa \
|
||||
WHERE (aal.general_account_id=aa.id) AND (aal.account_id =ANY(%s)) AND (date>=%s) AND (date<=%s) AND aa.active \
|
||||
GROUP BY aal.general_account_id, aa.name, aa.code, aal.code, aa.id ORDER BY aal.code", (ids,date1,date2,))
|
||||
WHERE (aal.general_account_id=aa.id) "
|
||||
"AND (aal.account_id IN %s) "
|
||||
"AND (date>=%s) AND (date<=%s) AND aa.active \
|
||||
GROUP BY aal.general_account_id, aa.name, aa.code, aal.code, aa.id "
|
||||
"ORDER BY aal.code",
|
||||
(tuple(ids), date1, date2))
|
||||
res = self.cr.dictfetchall()
|
||||
|
||||
for r in res:
|
||||
if r['balance'] > 0:
|
||||
r['debit'] = r['balance']
|
||||
@@ -58,10 +63,17 @@ class account_inverted_analytic_balance(report_sxw.rml_parse):
|
||||
|
||||
def _lines_a(self, accounts, general_account_id, date1, date2):
|
||||
ids = map(lambda x: x.id, accounts)
|
||||
self.cr.execute("SELECT sum(aal.amount) AS balance, sum(aal.unit_amount) AS quantity, aaa.code AS code, aaa.name AS name, account_id \
|
||||
FROM account_analytic_line AS aal, account_analytic_account AS aaa \
|
||||
WHERE aal.account_id=aaa.id AND aal.account_id =ANY(%s) AND aal.general_account_id=%s AND aal.date>=%s AND aal.date<=%s \
|
||||
GROUP BY aal.account_id, general_account_id, aaa.code, aaa.name ORDER BY aal.account_id", (ids,general_account_id, date1, date2,))
|
||||
self.cr.execute("SELECT sum(aal.amount) AS balance, "
|
||||
"sum(aal.unit_amount) AS quantity, "
|
||||
"aaa.code AS code, aaa.name AS name, account_id \
|
||||
FROM account_analytic_line AS aal, "
|
||||
"account_analytic_account AS aaa \
|
||||
WHERE aal.account_id=aaa.id AND aal.account_id IN %s "
|
||||
"AND aal.general_account_id=%s AND aal.date>=%s "
|
||||
"AND aal.date<=%s \
|
||||
GROUP BY aal.account_id, general_account_id, aaa.code, aaa.name "
|
||||
"ORDER BY aal.account_id",
|
||||
(tuple(ids), general_account_id, date1, date2))
|
||||
res = self.cr.dictfetchall()
|
||||
|
||||
aaa_obj = self.pool.get('account.analytic.account')
|
||||
@@ -86,14 +98,14 @@ class account_inverted_analytic_balance(report_sxw.rml_parse):
|
||||
ids = map(lambda x: x.id, accounts)
|
||||
self.cr.execute("SELECT sum(amount) \
|
||||
FROM account_analytic_line \
|
||||
WHERE account_id =ANY(%s) AND date>=%s AND date<=%s AND amount>0", (ids,date1, date2,))
|
||||
WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(ids),date1, date2,))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _sum_credit(self, accounts, date1, date2):
|
||||
ids = map(lambda x: x.id, accounts)
|
||||
self.cr.execute("SELECT -sum(amount) \
|
||||
FROM account_analytic_line \
|
||||
WHERE account_id =ANY(%s) AND date>=%s AND date<=%s AND amount<0", (ids,date1, date2,))
|
||||
WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(ids),date1, date2,))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _sum_balance(self, accounts, date1, date2):
|
||||
@@ -105,7 +117,7 @@ class account_inverted_analytic_balance(report_sxw.rml_parse):
|
||||
ids = map(lambda x: x.id, accounts)
|
||||
self.cr.execute("SELECT sum(unit_amount) \
|
||||
FROM account_analytic_line \
|
||||
WHERE account_id =ANY(%s) AND date>=%s AND date<=%s", (ids,date1, date2,))
|
||||
WHERE account_id IN %s AND date>=%s AND date<=%s", (tuple(ids),date1, date2,))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
report_sxw.report_sxw('report.account.analytic.account.inverted.balance', 'account.analytic.account', 'addons/account/project/report/inverted_analytic_balance.rml',parser=account_inverted_analytic_balance, header=False)
|
||||
|
||||
@@ -52,9 +52,9 @@ class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
|
||||
WHERE (aal.account_id=%s) AND (aal.date>=%s) \
|
||||
AND (aal.date<=%s) AND (aal.general_account_id=aa.id) \
|
||||
AND aa.active \
|
||||
AND (aal.journal_id =ANY(%s) ) \
|
||||
AND (aal.journal_id IN %s ) \
|
||||
GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code",
|
||||
(account_id, date1, date2,journal_ids))
|
||||
(account_id, date1, date2, tuple(journal_ids)))
|
||||
res = self.cr.dictfetchall()
|
||||
return res
|
||||
|
||||
@@ -79,9 +79,9 @@ class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
|
||||
account_analytic_journal AS aaj \
|
||||
WHERE (aal.general_account_id=%s) AND (aal.account_id=%s) \
|
||||
AND (aal.date>=%s) AND (aal.date<=%s) \
|
||||
AND (aal.journal_id=aaj.id) AND (aaj.id =ANY(%s)) \
|
||||
AND (aal.journal_id=aaj.id) AND (aaj.id IN %s) \
|
||||
ORDER BY aal.date, aaj.code, aal.code",
|
||||
(general_account_id, account_id, date1, date2,journal_ids,))
|
||||
(general_account_id, account_id, date1, date2,tuple(journal_ids)))
|
||||
res = self.cr.dictfetchall()
|
||||
return res
|
||||
|
||||
@@ -96,8 +96,8 @@ class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
|
||||
self.cr.execute("SELECT sum(unit_amount) \
|
||||
FROM account_analytic_line \
|
||||
WHERE account_id = %s AND date >= %s AND date <= %s \
|
||||
AND journal_id =ANY(%s)",
|
||||
(account_id, date1, date2,journal_ids,))
|
||||
AND journal_id IN %s",
|
||||
(account_id, date1, date2, tuple(journal_ids),))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
def _sum_quantity(self, accounts, date1, date2, journals):
|
||||
@@ -107,14 +107,14 @@ class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
|
||||
if not journals:
|
||||
self.cr.execute("SELECT sum(unit_amount) \
|
||||
FROM account_analytic_line \
|
||||
WHERE account_id =ANY(%s) AND date>=%s AND date<=%s",
|
||||
(ids, date1, date2,))
|
||||
WHERE account_id IN %s AND date>=%s AND date<=%s",
|
||||
(tuple(ids), date1, date2,))
|
||||
else:
|
||||
journal_ids = journals
|
||||
self.cr.execute("SELECT sum(unit_amount) \
|
||||
FROM account_analytic_line \
|
||||
WHERE account_id =ANY(%s) AND date >= %s AND date <= %s \
|
||||
AND journal_id =ANY(%s)",(ids, date1, date2, journal_ids))
|
||||
WHERE account_id IN %s AND date >= %s AND date <= %s \
|
||||
AND journal_id IN %s",(tuple(ids), date1, date2, tuple(journal_ids)))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
|
||||
report_sxw.report_sxw('report.account.analytic.account.quantity_cost_ledger',
|
||||
|
||||
@@ -2,43 +2,43 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="account_analytic_chart_view" model="ir.ui.view">
|
||||
<field name="name">Account Analytic Chart</field>
|
||||
<field name="model">account.analytic.chart</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Account Charts">
|
||||
<separator string="Select the Period for Analysis" colspan="4"/>
|
||||
<field name="from_date"/>
|
||||
<newline/>
|
||||
<field name="to_date"/>
|
||||
<newline/>
|
||||
<label string="(Keep empty to open the current situation)" align="0.0" colspan="3"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="analytic_account_chart_open_window" string="Open Charts" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_analytic_chart_view" model="ir.ui.view">
|
||||
<field name="name">Chart of Analytic Accounts</field>
|
||||
<field name="model">account.analytic.chart</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Account Charts">
|
||||
<separator string="Select the Period for Analysis" colspan="4"/>
|
||||
<field name="from_date"/>
|
||||
<newline/>
|
||||
<field name="to_date"/>
|
||||
<newline/>
|
||||
<label string="(Keep empty to open the current situation)" align="0.0" colspan="3"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="analytic_account_chart_open_window" string="Open Charts" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_analytic_chart" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Chart of Accounts</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.analytic.chart</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_analytic_chart_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<record id="action_account_analytic_chart" model="ir.actions.act_window">
|
||||
<field name="name">Chart of Analytic Accounts</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.analytic.chart</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_analytic_chart_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Analytic Chart of Accounts"
|
||||
parent="account.menu_finance_charts"
|
||||
action="action_account_analytic_chart"
|
||||
id="menu_action_analytic_account_tree2"
|
||||
icon="STOCK_INDENT"/>
|
||||
<menuitem
|
||||
name="Chart of Analytic Accounts"
|
||||
parent="account.menu_finance_charts"
|
||||
action="action_account_analytic_chart"
|
||||
id="menu_action_analytic_account_tree2"
|
||||
icon="STOCK_INDENT"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
||||
@@ -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 = {
|
||||
@@ -55,51 +55,3 @@ class account_analytic_cost_ledger_journal_report(osv.osv_memory):
|
||||
|
||||
account_analytic_cost_ledger_journal_report()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
#import time
|
||||
#import wizard
|
||||
#
|
||||
#_form = '''<?xml version="1.0"?>
|
||||
#<form string="Select period">
|
||||
# <separator string="Cost Legder for period" colspan="4"/>
|
||||
# <field name="date1"/>
|
||||
# <field name="date2"/>
|
||||
# <separator string="and Journals" colspan="4"/>
|
||||
# <field name="journal" colspan="4"/>
|
||||
#</form>'''
|
||||
#
|
||||
#_fields = {
|
||||
# 'date1': {'string':'Start of period', 'type':'date', 'required':True, 'default': lambda *a: time.strftime('%Y-01-01')},
|
||||
# 'date2': {'string':'End of period', 'type':'date', 'required':True, 'default': lambda *a: time.strftime('%Y-%m-%d')},
|
||||
# 'journal': {'string':'Journals','type':'many2many', 'relation':'account.analytic.journal'},
|
||||
#}
|
||||
#
|
||||
#
|
||||
#class wizard_report(wizard.interface):
|
||||
# states = {
|
||||
# 'init': {
|
||||
# 'actions': [],
|
||||
# 'result': {
|
||||
# 'type': 'form',
|
||||
# 'arch': _form,
|
||||
# 'fields': _fields,
|
||||
# 'state': [
|
||||
# ('end','Cancel'),
|
||||
# ('report','Print')
|
||||
# ]
|
||||
# }
|
||||
# },
|
||||
# 'report': {
|
||||
# 'actions': [],
|
||||
# 'result': {
|
||||
# 'type': 'print',
|
||||
# 'report': 'account.analytic.account.quantity_cost_ledger',
|
||||
# 'state': 'end'
|
||||
# }
|
||||
# },
|
||||
# }
|
||||
#
|
||||
#wizard_report('account.analytic.account.quantity_cost_ledger.report')
|
||||
#
|
||||
## vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
+14
-12
@@ -7,18 +7,20 @@
|
||||
<field name="model">account.analytic.cost.ledger.journal.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select period">
|
||||
<separator string="Cost Legder for period" colspan="4"/>
|
||||
<field name="date1"/>
|
||||
<field name="date2"/>
|
||||
<separator string="and Journals" colspan="4"/>
|
||||
<field name="journal" colspan="4"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Select period">
|
||||
<group width="450">
|
||||
<separator string="Cost Legder for period" colspan="4"/>
|
||||
<field name="date1"/>
|
||||
<field name="date2"/>
|
||||
<separator string="and Journals" colspan="4"/>
|
||||
<field name="journal" colspan="4" nolabel="1"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -32,26 +32,26 @@ class project_account_analytic_line(osv.osv_memory):
|
||||
def action_open_window(self, cr, uid, ids, context={}):
|
||||
mod_obj =self.pool.get('ir.model.data')
|
||||
domain = []
|
||||
for data in self.read(cr, uid, ids, context=context):
|
||||
from_date = data['from_date']
|
||||
to_date = data['to_date']
|
||||
if from_date and to_date:
|
||||
domain = [('date','>=',from_date), ('date','<=',to_date)]
|
||||
elif from_date:
|
||||
domain = [('date','>=',from_date)]
|
||||
elif to_date:
|
||||
domain = [('date','<=',to_date)]
|
||||
result = mod_obj._get_id(cr, uid, 'account', 'view_account_analytic_line_filter')
|
||||
id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
|
||||
return {
|
||||
'name': _('Analytic Entries by line'),
|
||||
'view_type': 'form',
|
||||
"view_mode": 'tree,form',
|
||||
'res_model': 'account.analytic.line',
|
||||
'type': 'ir.actions.act_window',
|
||||
'domain': domain,
|
||||
'search_view_id': id['res_id'],
|
||||
}
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
from_date = data['from_date']
|
||||
to_date = data['to_date']
|
||||
if from_date and to_date:
|
||||
domain = [('date','>=',from_date), ('date','<=',to_date)]
|
||||
elif from_date:
|
||||
domain = [('date','>=',from_date)]
|
||||
elif to_date:
|
||||
domain = [('date','<=',to_date)]
|
||||
result = mod_obj._get_id(cr, uid, 'account', 'view_account_analytic_line_filter')
|
||||
id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
|
||||
return {
|
||||
'name': _('Analytic Entries by line'),
|
||||
'view_type': 'form',
|
||||
"view_mode": 'tree,form',
|
||||
'res_model': 'account.analytic.line',
|
||||
'type': 'ir.actions.act_window',
|
||||
'domain': domain,
|
||||
'search_view_id': id['res_id'],
|
||||
}
|
||||
|
||||
project_account_analytic_line()
|
||||
|
||||
|
||||
@@ -35,10 +35,12 @@ import account_balance_landscape
|
||||
import compare_account_balance
|
||||
import account_invoice_report
|
||||
import account_report
|
||||
import account_analytic_report
|
||||
#import account_analytic_report
|
||||
import account_account_report
|
||||
import account_entries_report
|
||||
import account_analytic_entries_report
|
||||
import voucher_print
|
||||
import report_bs
|
||||
import report_pl
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@ class account_account_report(osv.osv):
|
||||
('closed', 'Closed'),
|
||||
], 'Internal Type', readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'currency_mode': fields.selection([('current', 'At Date'), ('average', 'Average Rate')], 'Outgoing Currencies Rate',readonly=True),
|
||||
'user_type': fields.many2one('account.account.type', 'Account Type',readonly=True),
|
||||
'currency_mode': fields.selection([('current', 'At Date'), ('average', 'Average Rate')], 'Outgoing Currencies Rate', readonly=True),
|
||||
'user_type': fields.many2one('account.account.type', 'Account Type', readonly=True),
|
||||
'quantity': fields.float('Quantity', readonly=True),
|
||||
'amount_total': fields.float('Total Amount', readonly=True),
|
||||
'credit': fields.float('Credit', readonly=True),
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_account_account_report_tree" model="ir.ui.view">
|
||||
<field name="name">account.account.report.tree</field>
|
||||
<field name="model">account.account.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Accounts Analysis">
|
||||
<field name="name" invisible="1" string="Account"/>
|
||||
<field name="code" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="company_id" invisible="1" group="base.multi_company"/>
|
||||
<field name="currency_mode" invisible="1"/>
|
||||
<field name="nbr" sum="#Accounts"/>
|
||||
<field name="user_type" invisible="1"/>
|
||||
<field name="parent_account_id" invisible="1"/>
|
||||
<field name="quantity" sum="Quantity"/>
|
||||
<field name="amount_total" sum="Total Amount"/>
|
||||
<field name="credit" sum="Credit"/>
|
||||
<field name="debit" sum="Debit"/>
|
||||
<field name="balance" sum="Balance"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_account_report_graph" model="ir.ui.view">
|
||||
<field name="name">account.account.report.graph</field>
|
||||
<field name="model">account.account.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Accounts Analysis" type="bar">
|
||||
<field name="name"/>
|
||||
<field name="credit" operator="+"/>
|
||||
<field name="debit" operator="+"/>
|
||||
<field name="balance" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_account_report_search" model="ir.ui.view">
|
||||
<field name="name">account.account.report.search</field>
|
||||
<field name="model">account.account.report</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Accounts Analysis">
|
||||
<group>
|
||||
<filter icon="terp-go-today"
|
||||
string="At Date"
|
||||
domain="[('currency_mode','=', 'current')]"/>
|
||||
<filter icon="terp-stock_format-default"
|
||||
string="Average Rate"
|
||||
domain="[('currency_mode','=','average')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Account"/>
|
||||
<field name="code"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Account" name="Account" icon="terp-folder-orange" context="{'group_by':'name'}"/>
|
||||
<filter string="Code" icon="terp-stock_format-scientific" context="{'group_by':'code'}"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Currencies Rate" icon="terp-dolar" context="{'group_by':'currency_mode'}"/>
|
||||
<filter string="Internal Type" icon="terp-go-home" context="{'group_by':'type'}"/>
|
||||
<filter string="Account Type" icon="terp-stock_symbol-selection" context="{'group_by':'user_type'}"/>
|
||||
<filter string="Parent Account" icon="terp-folder-orange" context="{'group_by':'parent_account_id'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." groups="base.group_extended">
|
||||
<field name="parent_account_id" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="type" />
|
||||
<field name="user_type" widget="selection"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_account_report" model="ir.actions.act_window">
|
||||
<field name="name">Accounts Analysis</field>
|
||||
<field name="res_model">account.account.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="context">{"search_default_Account":1,"search_default_At Date":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="search_view_id" ref="view_account_account_report_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_account_report" id="menu_action_account_account_report" parent="account.menu_finance_statistic_report_statement" sequence="6"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -54,7 +54,7 @@
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Currency" icon="terp-dolar" context="{'group_by':'currency_id'}"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import tools
|
||||
from osv import fields,osv
|
||||
|
||||
class analytic_report(osv.osv):
|
||||
_name = "analytic.report"
|
||||
_description = "Analytic Accounts Statistics"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'date_start': fields.date('Date Start', readonly=True),
|
||||
'date_end': fields.date('Date End',readonly=True),
|
||||
'name' : fields.char('Analytic Account', size=128, readonly=True),
|
||||
'partner_id' : fields.many2one('res.partner', 'Associated Partner',readonly=True),
|
||||
'journal_id' : fields.many2one('account.analytic.journal', 'Analytic Journal', readonly=True),
|
||||
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', readonly=True),
|
||||
'user_id' : fields.many2one('res.users', 'Account Manager',readonly=True),
|
||||
'product_id' : fields.many2one('product.product', 'Product',readonly=True),
|
||||
'total_quantity': fields.float('# Total Quantity',readonly=True),
|
||||
'debit' : fields.float('Debit',readonly=True),
|
||||
'credit' : fields.float('Credit',readonly=True),
|
||||
'balance' : fields.float('Balance',readonly=True),
|
||||
'year': fields.char('Year', size=4, readonly=True),
|
||||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
|
||||
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
|
||||
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'nbr':fields.integer('# of Lines', readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
'type': fields.selection([('view','View'), ('normal','Normal')], 'Account Type'),
|
||||
|
||||
'state': fields.selection([('draft','Draft'),
|
||||
('open','Open'),
|
||||
('pending','Pending'),
|
||||
('cancelled', 'Cancelled'),
|
||||
('close','Close'),
|
||||
('template', 'Template')],
|
||||
'State', readonly=True),
|
||||
|
||||
}
|
||||
_order = 'date_start desc'
|
||||
def init(self, cr):
|
||||
tools.drop_view_if_exists(cr, 'analytic_report')
|
||||
cr.execute("""
|
||||
create or replace view analytic_report as (
|
||||
select
|
||||
min(s.id) as id,
|
||||
to_char(s.create_date, 'YYYY') as year,
|
||||
to_char(s.create_date, 'MM') as month,
|
||||
to_char(s.create_date, 'YYYY-MM-DD') as day,
|
||||
l.journal_id,
|
||||
l.product_id,
|
||||
s.parent_id,
|
||||
s.date_start,
|
||||
s.date as date_end,
|
||||
s.user_id,
|
||||
s.company_id,
|
||||
s.type,
|
||||
s.name,
|
||||
s.partner_id,
|
||||
sum(s.quantity) as total_quantity,
|
||||
s.debit,
|
||||
s.credit,
|
||||
s.balance,
|
||||
count(*) as nbr,
|
||||
s.state
|
||||
from account_analytic_account s
|
||||
left join account_analytic_line l on (s.id=l.account_id)
|
||||
GROUP BY s.create_date,s.state,l.journal_id,s.name,
|
||||
s.partner_id,s.date_start,s.date,s.user_id,
|
||||
s.company_id,s.type,
|
||||
s.debit,s.credit,s.balance,s.parent_id,l.product_id
|
||||
)
|
||||
""")
|
||||
analytic_report()
|
||||
@@ -1,128 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_analytic_report_tree" model="ir.ui.view">
|
||||
<field name="name">analytic.report.tree</field>
|
||||
<field name="model">analytic.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Analytic Accounts Analysis">
|
||||
<field name="parent_id" invisible="1" string="Analytic Account"/>
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="journal_id" string="Analytic Journal" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="date_start" invisible="1"/>
|
||||
<field name="date_end" invisible="1"/>
|
||||
<field name="total_quantity" sum=" # Total Quantity"/>
|
||||
<field name="nbr" sum ="# of Lines"/>
|
||||
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="debit" sum ="Debit"/>
|
||||
<field name="credit" sum ="Credit"/>
|
||||
<field name="balance" sum ="Balance"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="year" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_analytic_report_search" model="ir.ui.view">
|
||||
<field name="name">analytic.report.search</field>
|
||||
<field name="model">analytic.report</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Analytic Accounts Analysis">
|
||||
<group>
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')),('day','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Accounts of last 365 days"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
name="This Month"
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')), ('day','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Accounts of last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
separator="1"
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')), ('day','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Accounts during last 7 days"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-document-new"
|
||||
string="Draft"
|
||||
domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-camera_test"
|
||||
string="Open"
|
||||
domain="[('state','=','open')]"/>
|
||||
<filter icon="terp-gtk-media-pause"
|
||||
string="Pending"
|
||||
domain="[('state','=','pending')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="product_id" />
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-folder-orange"
|
||||
string="My Accounts"
|
||||
help="My Account"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="10" col="12">
|
||||
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Associated Partner" icon="terp-personal+" context="{'group_by':'partner_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<filter string="Analytic Account" icon="terp-folder-green" context="{'group_by':'parent_id'}"/>
|
||||
<filter string="Analytic Journal" icon="terp-folder-green" context="{'group_by':'journal_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
|
||||
<filter string="Account Type" icon="terp-stock_symbol-selection" context="{'group_by':'type'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." colspan="10" col="12" groups="base.group_extended">
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="state"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<field name="type"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_account_analytic_report_search" model="ir.ui.view">
|
||||
<field name="name">account.analytic.report.graph</field>
|
||||
<field name="model">analytic.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Analytic Accounts Analysis" type="bar">
|
||||
<field name="user_id"/>
|
||||
<field name="credit" operator="+"/>
|
||||
<field name="debit" operator="+"/>
|
||||
<field name="balance" operator="+"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_analytic_report_all" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Accounts Analysis</field>
|
||||
<field name="res_model">analytic.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="context">{'search_default_This Month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="search_view_id" ref="view_analytic_report_search"/>
|
||||
</record>
|
||||
<menuitem action="action_analytic_report_all" id="menu_action_analytic_report_all" parent="account.menu_finance_statistic_report_statement" sequence="8"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -68,14 +68,14 @@ class account_balance(report_sxw.rml_parse):
|
||||
result=''
|
||||
if form.has_key('periods') and form['periods']:
|
||||
period_ids = form['periods']
|
||||
per_ids = self.pool.get('account.period').browse(self.cr,self.uid,form['periods'])
|
||||
per_ids = self.pool.get('account.period').browse(self.cr, self.uid, form['periods'])
|
||||
for r in per_ids:
|
||||
if r == per_ids[len(per_ids)-1]:
|
||||
result+=r.name+". "
|
||||
else:
|
||||
result+=r.name+", "
|
||||
else:
|
||||
fy_obj = self.pool.get('account.fiscalyear').browse(self.cr,self.uid,form['fiscalyear'])
|
||||
fy_obj = self.pool.get('account.fiscalyear').browse(self.cr, self.uid, form['fiscalyear'])
|
||||
res = fy_obj.period_ids
|
||||
len_res = len(res)
|
||||
for r in res:
|
||||
@@ -118,7 +118,7 @@ class account_balance(report_sxw.rml_parse):
|
||||
child_ids = self.pool.get('account.account')._get_children_and_consol(self.cr, self.uid, ids, ctx)
|
||||
if child_ids:
|
||||
ids = child_ids
|
||||
accounts = self.pool.get('account.account').read(self.cr, self.uid, ids,['type','code','name','debit','credit','balance','parent_id'], ctx)
|
||||
accounts = self.pool.get('account.account').read(self.cr, self.uid, ids, ['type','code','name','debit','credit','balance','parent_id'], ctx)
|
||||
for account in accounts:
|
||||
if account['id'] in done:
|
||||
continue
|
||||
|
||||
@@ -217,11 +217,11 @@
|
||||
<td><para style="P10">Balance</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P14">[[ repeatIn(lines(data['form']), 'a') ]]<font>[[ a['level']>2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
|
||||
<td><para style="P14"><font>[[ a['level']>2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font color="white">[[ '..'*(a['level']-1) ]]</font><font>[[ a['name'] ]]</font></para></td>
|
||||
<td><para style="P3"><font>[[ a['level']>2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]]</font></para></td>
|
||||
<td><para style="P3"><font>[[ a['level']>2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]]</font></para></td>
|
||||
<td><para style="P3"><font>[[ a['level']>2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]]</font></para></td>
|
||||
<td><para style="P14">[[ repeatIn(lines(data['form']), 'a') ]]<font>[[ (a['level']>2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
|
||||
<td><para style="P14"><font>[[ (a['level']>2 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['level']>2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]]</font></para></td>
|
||||
<td><para style="P3"><font>[[ (a['level']>2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font')]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]]</font></para></td>
|
||||
<td><para style="P3"><font>[[ (a['level']>2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]]</font><font>[[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]]</font></para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
|
||||
@@ -351,7 +351,7 @@ class account_balance_landscape(rml_parse.rml_parse):
|
||||
|
||||
if perc==1:
|
||||
if form['select_account']!=False:
|
||||
ref_ac=self.pool.get('account.account').browse(self.cr, self.uid,form['select_account'],ctx.copy())
|
||||
ref_ac=self.pool.get('account.account').browse(self.cr, self.uid, form['select_account'], ctx.copy())
|
||||
if ref_ac.balance<>0.00:
|
||||
ref_bal=ref_ac.balance
|
||||
else:
|
||||
@@ -365,7 +365,7 @@ class account_balance_landscape(rml_parse.rml_parse):
|
||||
total_for_perc=[]
|
||||
# if perc==1:
|
||||
self.done_total=1
|
||||
self.total_for_perc=self.linesForTotal(form,ids={},doneAccount={},level=1)
|
||||
self.total_for_perc=self.linesForTotal(form, ids={}, doneAccount={}, level=1)
|
||||
self.done_total=0
|
||||
|
||||
for t1 in range(0,len(form['fiscalyear'])):
|
||||
@@ -376,13 +376,13 @@ class account_balance_landscape(rml_parse.rml_parse):
|
||||
# self.result_total = {}
|
||||
|
||||
for temp in range(0,len(form['fiscalyear'])):
|
||||
fy=self.pool.get('account.fiscalyear').name_get(self.cr,self.uid,form['fiscalyear'][temp])
|
||||
fy=self.pool.get('account.fiscalyear').name_get(self.cr, self.uid, form['fiscalyear'][temp])
|
||||
years["year"+str(temp)]=fy[0][1][12:16]
|
||||
|
||||
return [years]
|
||||
|
||||
|
||||
def linesForTotal(self,form,ids={},doneAccount={},level=1):
|
||||
def linesForTotal(self, form, ids={}, doneAccount={}, level=1):
|
||||
if self.done_total==1:
|
||||
self.done_total==1
|
||||
else:
|
||||
@@ -443,7 +443,7 @@ class account_balance_landscape(rml_parse.rml_parse):
|
||||
ids2 = [(x.code,x.id) for x in entry[0].child_id]
|
||||
ids2.sort()
|
||||
|
||||
result_total_parent = self.linesForTotal(form, [x[1] for x in ids2],doneAccount,level+1)
|
||||
result_total_parent = self.linesForTotal(form, [x[1] for x in ids2], doneAccount, level+1)
|
||||
|
||||
return [self.result_total]
|
||||
|
||||
@@ -462,7 +462,7 @@ class account_balance_landscape(rml_parse.rml_parse):
|
||||
ctx['periods'] = form['periods']
|
||||
ctx['period_manner']=form['period_manner']
|
||||
ctx['state'] = form['context'].get('state','all')
|
||||
tmp1 = self.pool.get('account.account').browse(self.cr, self.uid, ids,ctx.copy())
|
||||
tmp1 = self.pool.get('account.account').browse(self.cr, self.uid, ids, ctx.copy())
|
||||
|
||||
if len(tmp1):
|
||||
accounts.append(tmp1)
|
||||
@@ -598,12 +598,12 @@ class account_balance_landscape(rml_parse.rml_parse):
|
||||
|
||||
return result
|
||||
|
||||
def get_years(self,form):
|
||||
def get_years(self, form):
|
||||
result =[]
|
||||
res={}
|
||||
for temp in range(0,len(form['fiscalyear'])):
|
||||
for temp in range(0, len(form['fiscalyear'])):
|
||||
res={}
|
||||
fy=self.pool.get('account.fiscalyear').name_get(self.cr,self.uid,form['fiscalyear'][temp])
|
||||
fy=self.pool.get('account.fiscalyear').name_get(self.cr, self.uid, form['fiscalyear'][temp])
|
||||
res['year']=fy[0][1]
|
||||
res['last_str']=temp
|
||||
|
||||
@@ -611,7 +611,7 @@ class account_balance_landscape(rml_parse.rml_parse):
|
||||
self.linesForYear(form)
|
||||
return result
|
||||
|
||||
def get_lines(self,year_dict,form):
|
||||
def get_lines(self, year_dict, form):
|
||||
final_result = []
|
||||
line_l =[]
|
||||
res = {}
|
||||
@@ -643,7 +643,7 @@ class account_balance_landscape(rml_parse.rml_parse):
|
||||
final_result.append(res)
|
||||
return final_result
|
||||
|
||||
def cal_total(self,year_dict):
|
||||
def cal_total(self, year_dict):
|
||||
total_l = self.result_total
|
||||
if total_l:
|
||||
for k,v in total_l.items():
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user