[MERGE] Merge with lp:openobject:addons

bzr revid: sbh@tinyerp.com-20100830054518-78k23iuti0u7e9yn
This commit is contained in:
sbh (Open ERP) 2010-08-30 11:15:18 +05:30
commit 7d1e238a14
1396 changed files with 74768 additions and 26123 deletions

View File

@ -45,7 +45,6 @@ module named account_voucher.
'init_xml': [],
"depends" : ["product", "analytic", "process","board"],
'update_xml': [
#'test/test_parent_structure.yml',
'security/account_security.xml',
'security/ir.model.access.csv',
'account_menuitem.xml',
@ -53,6 +52,7 @@ module named account_voucher.
'wizard/account_statement_from_invoice_view.xml',
'wizard/account_move_bank_reconcile_view.xml',
'wizard/account_use_model_view.xml',
'account_installer.xml',
'account_view.xml',
'account_report.xml',
'wizard/account_report_common_view.xml',
@ -60,6 +60,7 @@ module named account_voucher.
'wizard/account_period_close_view.xml',
'wizard/account_fiscalyear_close_state.xml',
'wizard/account_chart_view.xml',
'wizard/account_tax_chart_view.xml',
'wizard/account_move_journal_view.xml',
'wizard/account_move_line_reconcile_select_view.xml',
'wizard/account_open_closed_fiscalyear_view.xml',
@ -80,7 +81,6 @@ module named account_voucher.
'wizard/account_invoice_state_view.xml',
'wizard/account_report_partner_balance_view.xml',
'wizard/account_report_account_balance_view.xml',
# 'wizard/account_move_line_select_view.xml',
'wizard/account_report_aged_partner_balance_view.xml',
'wizard/account_compare_account_balance_report_view.xml',
'wizard/account_report_partner_ledger_view.xml',
@ -110,19 +110,15 @@ module named account_voucher.
'process/supplier_invoice_process.xml',
'sequence_view.xml',
'company_view.xml',
'account_installer.xml',
'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',
'board_account_view.xml',
"wizard/account_report_profit_loss_view.xml",
"wizard/account_report_balance_sheet_view.xml"
],
'demo_xml': [
#'demo/price_accuracy00.yml',
'account_demo.xml',
'project/project_demo.xml',
'project/analytic_account_demo.xml',
@ -137,7 +133,6 @@ module named account_voucher.
'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',

View File

@ -138,7 +138,6 @@ class account_payment_term_line(osv.osv):
account_payment_term_line()
class account_account_type(osv.osv):
_name = "account.account.type"
_description = "Account Type"
@ -198,19 +197,6 @@ class account_account(osv.osv):
_parent_store = True
logger = netsvc.Logger()
def _get_children_and_consol(self, cr, uid, ids, context={}):
ids2=[]
temp=[]
read_data= self.read(cr, uid, ids,['id','child_id'], context)
for data in read_data:
ids2.append(data['id'])
if data['child_id']:
temp=[]
for x in data['child_id']:
temp.append(x)
ids2 += self._get_children_and_consol(cr, uid, temp, context)
return ids2
def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
if context is None:
@ -245,7 +231,9 @@ class account_account(osv.osv):
return super(account_account, self).search(cr, uid, args, offset, limit,
order, context=context, count=count)
def _get_children_and_consol(self, cr, uid, ids, context={}):
def _get_children_and_consol(self, cr, uid, ids, context=None):
if context is None:
context = {}
#this function search for all the children and all consolidated children (recursively) of the given account ids
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context)
ids3 = []
@ -413,24 +401,13 @@ class account_account(osv.osv):
'manage this. So if you import from another software system you may have to use the rate at date. ' \
'Incoming transactions always use the rate at date.', \
required=True),
'check_history': fields.boolean('Display History',
help="Check this box if you want to print all entries when printing the General Ledger, "\
"otherwise it will only print its balance."),
'level': fields.function(_get_level, string='Level', method=True, store=True, type='integer'),
}
def _default_company(self, cr, uid, context={}):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0]
_defaults = {
'type': lambda *a : 'view',
'reconcile': lambda *a: False,
'company_id': _default_company,
'active': lambda *a: True,
'check_history': lambda *a: True,
'currency_mode': lambda *a: 'current',
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'account.account', context=c),
}
@ -618,7 +595,7 @@ class account_journal(osv.osv):
_columns = {
'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,
'type': fields.selection([('sale', 'Sale'),('sale_refund','Sale Refund'), ('purchase', 'Purchase'), ('purchase_refund','Purchase Refund'),('expense', 'Expense'), ('cash', 'Cash'), ('bank', 'Bank and Cheques'), ('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."\
@ -632,15 +609,15 @@ class account_journal(osv.osv):
'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', 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."),
'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=False),
'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, 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."),
# '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'),
}
@ -648,7 +625,7 @@ class account_journal(osv.osv):
'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:
@ -674,21 +651,21 @@ class account_journal(osv.osv):
'purchase_refund':'seq_out_refund',
'sale_refund':'seq_in_refund'
}
seq_pool = self.pool.get('ir.sequence')
seq_typ_pool = self.pool.get('ir.sequence.type')
date_pool = self.pool.get('ir.model.data')
result = True
journal = self.browse(cr, uid, ids[0], context)
code = journal.code.lower()
code = journal.code.lower()
types = {
'name':journal.name,
'code':code
}
type_id = seq_typ_pool.create(cr, uid, types)
seq = {
'name':journal.name,
'code':code,
@ -698,54 +675,41 @@ class account_journal(osv.osv):
'number_increment':1
}
seq_id = seq_pool.create(cr, uid, seq)
res = {}
if not journal.sequence_id:
res.update({
'sequence_id':seq_id
})
if journal.type in journal_type and not journal.invoice_sequence_id:
res_ids = date_pool.search(cr, uid, [('model','=','ir.sequence'), ('name','=',journal_seq.get(journal.type, 'sale'))])
inv_seq_id = date_pool.browse(cr, uid, res_ids[0]).res_id
inv_seq_id
res.update({
'invoice_sequence_id':inv_seq_id
})
result = self.write(cr, uid, [journal.id], res)
return result
def create(self, cr, uid, vals, context={}):
journal_id = super(account_journal, self).create(cr, uid, vals, context)
self.create_sequence(cr, uid, [journal_id], context)
# journal_name = self.browse(cr, uid, [journal_id])[0].code
# periods = self.pool.get('account.period')
# ids = periods.search(cr, uid, [('date_stop','>=',time.strftime('%Y-%m-%d'))])
# for period in periods.browse(cr, uid, ids):
# self.pool.get('account.journal.period').create(cr, uid, {
# 'name': (journal_name or '')+':'+(period.code or ''),
# 'journal_id': journal_id,
# 'period_id': period.id
# })
return journal_id
def name_search(self, cr, user, name, args=None, operator='ilike', context={}, limit=100):
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args = []
if context is None:
context = {}
ids = []
if context.get('journal_type', False):
args += [('type','=',context.get('journal_type'))]
if name:
ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit, context=context)
ids = self.search(cr, user, [('code', 'ilike', name)]+ args, limit=limit, context=context)
if not ids:
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context)
ids = self.search(cr, user, [('name', 'ilike', name)]+ args, limit=limit, context=context)#fix it ilike should be replace with operator
return self.name_get(cr, user, ids, context=context)
def onchange_type(self, cr, uid, ids, type, currency):
data_pool = self.pool.get('ir.model.data')
user_pool = self.pool.get('res.users')
type_map = {
'sale':'account_sp_journal_view',
'sale_refund':'account_sp_refund_journal_view',
@ -757,23 +721,23 @@ class account_journal(osv.osv):
'general':'account_journal_view',
'situation':'account_journal_view'
}
res = {}
view_id = type_map.get(type, 'general')
user = user_pool.browse(cr, uid, uid)
if type in ('cash', 'bank') and currency and user.company_id.currency_id.id != currency:
view_id = 'account_journal_bank_view_multi'
data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=',view_id)])
data = data_pool.browse(cr, uid, data_id[0])
res.update({
'centralisation':type == 'situation',
'view_id':data.res_id,
})
return {
'value':res
}
@ -790,10 +754,8 @@ class account_fiscalyear(osv.osv):
'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'),
'state': fields.selection([('draft','Draft'), ('done','Done')], 'State', readonly=True,
help='When fiscal year is created. The state is \'Draft\'. At the end of the year it is in \'Done\' state.'),
'state': fields.selection([('draft','Open'), ('done','Closed')], 'State', readonly=True),
}
_defaults = {
'state': lambda *a: 'draft',
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
@ -850,9 +812,9 @@ class account_fiscalyear(osv.osv):
context = {}
ids = []
if name:
ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit)
ids = self.search(cr, user, [('code', 'ilike', name)]+ args, limit=limit)
if not ids:
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
ids = self.search(cr, user, [('name', operator, name)]+ args, limit=limit)
return self.name_get(cr, user, ids, context=context)
account_fiscalyear()
@ -870,11 +832,10 @@ 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.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True)
'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
}
_defaults = {
'state': lambda *a: 'draft',
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
'state': 'draft',
}
_order = "date_start"
@ -922,13 +883,10 @@ class account_period(osv.osv):
return ids
def action_draft(self, cr, uid, ids, *args):
users_roles = self.pool.get('res.users').browse(cr, uid, uid).roles_id
for role in users_roles:
if role.name=='Period':
mode = 'draft'
for id in ids:
cr.execute('update account_journal_period set state=%s where period_id=%s', (mode, id))
cr.execute('update account_period set state=%s where id=%s', (mode, id))
mode = 'draft'
for id in ids:
cr.execute('update account_journal_period set state=%s where period_id=%s', (mode, id))
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={}, limit=80):
@ -1005,7 +963,6 @@ class account_journal_period(osv.osv):
_defaults = {
'state': lambda *a: 'draft',
'active': lambda *a: True,
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
}
_order = "period_id"
@ -1027,6 +984,38 @@ class account_move(osv.osv):
_description = "Account Entry"
_order = 'id desc'
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
"""
Returns a list of tupples containing id, name, as internally it is called {def name_get}
result format : {[(id, name), (id, name), ...]}
@param cr: A database cursor
@param user: ID of the user currently logged in
@param name: name to search
@param args: other arguments
@param operator: default operator is 'ilike', it can be changed
@param context: context arguments, like lang, time zone
@param limit: Returns first 'n' ids of complete result, default is 80.
@return: Returns a list of tupples containing id and name
"""
if not args:
args=[]
if not context:
context={}
ids = []
if name:
ids += self.search(cr, user, [('name','ilike',name)]+args, limit=limit, context=context)
if not ids and name and type(name) == int:
ids += self.search(cr, user, [('id','=',name)]+args, limit=limit, context=context)
if not ids:
ids += self.search(cr, user, args, limit=limit, context=context)
return self.name_get(cr, user, ids, context=context)
def name_get(self, cursor, user, ids, context=None):
if not len(ids):
return []
@ -1059,21 +1048,25 @@ class account_move(osv.osv):
return result
def _search_amount(self, cr, uid, obj, name, args, context):
ids = []
cr.execute('select move_id,sum(debit) from account_move_line group by move_id')
result = dict(cr.fetchall())
for item in args:
if item[1] == '>=':
res = [('id', 'in', [k for k,v in result.iteritems() if v >= item[2]])]
ids = set()
for cond in args:
amount = cond[2]
if isinstance(cond[2],(list,tuple)):
if cond[1] in ['in','not in']:
amount = tuple(cond[2])
else:
continue
else:
res = [('id', 'in', [k for k,v in result.iteritems() if v <= item[2]])]
ids += res
if not ids:
return [('id', '>', '0')]
return ids
if cond[1] in ['=like', 'like', 'not like', 'ilike', 'not ilike', 'in', 'not in', 'child_of']:
continue
cr.execute("select move_id from account_move_line group by move_id having sum(debit) %s %%s" % (cond[1]) ,(amount,))
res_ids = set(id[0] for id in cr.fetchall())
ids = ids and (ids & res_ids) or res_ids
if ids:
return [('id','in',tuple(ids))]
else:
return [('id', '=', '0')]
_columns = {
'name': fields.char('Number', size=64, required=True),
@ -1126,18 +1119,24 @@ class account_move(osv.osv):
'You cannot create entries on different periods/journals in the same move',
['line_id']),
]
def post(self, cr, uid, ids, context=None):
invoice = context.get('invoice', False)
if self.validate(cr, uid, ids, context) and len(ids):
for move in self.browse(cr, uid, ids):
if move.name =='/':
new_name = False
journal = move.journal_id
if journal.sequence_id:
c = {'fiscalyear_id': move.period_id.fiscalyear_id.id}
new_name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id, context=c)
if invoice and invoice.internal_number:
new_name = invoice.internal_number
else:
raise osv.except_osv(_('Error'), _('No sequence defined in the journal !'))
if journal.sequence_id:
c = {'fiscalyear_id': move.period_id.fiscalyear_id.id}
new_name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id, context=c)
else:
raise osv.except_osv(_('Error'), _('No sequence defined in the journal !'))
if new_name:
self.write(cr, uid, [move.id], {'name':new_name})
@ -1185,7 +1184,7 @@ class account_move(osv.osv):
'balance':False,
'account_tax_id':False,
})
if 'journal_id' in vals and vals.get('journal_id', False):
for l in vals['line_id']:
if not l[0]:
@ -1391,8 +1390,6 @@ class account_move(osv.osv):
self.pool.get('account.move.line').write(cr, uid, line_ids, {
'journal_id': move.journal_id.id,
'period_id': move.period_id.id,
#'tax_code_id': False,
#'tax_amount': False,
'state': 'draft'
}, context, check=False)
# Create analytic lines for the valid moves
@ -1634,15 +1631,15 @@ class account_tax(osv.osv):
"""
Returns a list of tupples containing id, name, as internally it is called {def name_get}
result format : {[(id, name), (id, name), ...]}
@param cr: A database cursor
@param user: ID of the user currently logged in
@param name: name to search
@param name: name to search
@param args: other arguments
@param operator: default operator is 'ilike', it can be changed
@param context: context arguments, like lang, time zone
@param limit: Returns first 'n' ids of complete result, default is 80.
@return: Returns a list of tupples containing id and name
"""
if not args:
@ -1652,10 +1649,10 @@ class account_tax(osv.osv):
ids = []
ids = self.search(cr, user, args, limit=limit, context=context)
return self.name_get(cr, user, ids, context=context)
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
journal_pool = self.pool.get('account.journal')
if context and context.has_key('type'):
if context.get('type') in ('out_invoice','out_refund'):
args += [('type_tax_use','in',['sale','all'])]
@ -1666,7 +1663,7 @@ class account_tax(osv.osv):
journal = journal_pool.browse(cr, uid, context.get('journal_id'))
if journal.type in ('sale', 'purchase'):
args += [('type_tax_use','in',[journal.type,'all'])]
return super(account_tax, self).search(cr, uid, args, offset, limit, order, context, count)
def name_get(self, cr, uid, ids, context={}):
@ -1683,7 +1680,7 @@ class account_tax(osv.osv):
if user.company_id:
return user.company_id.id
return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0]
_defaults = {
'python_compute': lambda *a: '''# price_unit\n# address : res.partner.address object or False\n# product : product.product object or None\n# partner : res.partner object or None\n\nresult = price_unit * 0.10''',
'python_compute_inv': lambda *a: '''# price_unit\n# address : res.partner.address object or False\n# product : product.product object or False\n\nresult = price_unit * 0.10''',
@ -1803,11 +1800,11 @@ class account_tax(osv.osv):
tin = self.compute_inv(cr, uid, tin, price_unit, quantity, address_id=address_id, product=product, partner=partner)
for r in tin:
totalex -= r['amount']
totlex_qty=0.0
totlex_qty=0.0
try:
totlex_qty=totalex/quantity
except:
pass
pass
tex = self._compute(cr, uid, tex, totlex_qty, quantity, address_id=address_id, product=product, partner=partner)
for r in tex:
totalin += r['amount']
@ -1875,8 +1872,6 @@ class account_tax(osv.osv):
amount = localdict['result']
elif tax.type=='balance':
amount = cur_price_unit - reduce(lambda x,y: y.get('amount',0.0)+x, res, 0.0)
# data['balance'] = cur_price_unit
if tax.include_base_amount:
cur_price_unit -= amount
@ -1951,12 +1946,14 @@ class account_model(osv.osv):
'name': fields.char('Model Name', size=64, required=True, help="This is a model for recurring accounting entries"),
'ref': fields.char('Reference', size=64),
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
'lines_id': fields.one2many('account.model.line', 'model_id', 'Model Entries'),
'legend' :fields.text('Legend', readonly=True, size=100),
}
_defaults = {
'legend': lambda self, cr, uid, context:_('You can specify year, month and date in the name of the model using the following labels:\n\n%(year)s : To Specify Year \n%(month)s : To Specify Month \n%(date)s : Current Date\n\ne.g. My model on %(date)s'),
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id
}
def generate(self, cr, uid, ids, datas={}, context={}):
move_ids = []
@ -2113,11 +2110,10 @@ class account_subscription_line(osv.osv):
'date': fields.date('Date', required=True),
'move_id': fields.many2one('account.move', 'Entry'),
}
_defaults = {
}
def move_create(self, cr, uid, ids, context={}):
def move_create(self, cr, uid, ids, context=None):
tocheck = {}
for line in self.browse(cr, uid, ids, context):
for line in self.browse(cr, uid, ids, context=context):
datas = {
'date': line.date,
}
@ -2126,7 +2122,8 @@ class account_subscription_line(osv.osv):
self.write(cr, uid, [line.id], {'move_id':ids[0]})
if tocheck:
self.pool.get('account.subscription').check(cr, uid, tocheck.keys(), context)
return True
return ids
_rec_name = 'date'
account_subscription_line()
@ -2205,7 +2202,6 @@ 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'])
if not tids or not tids[0]['parent_id']:
return False
@ -2230,12 +2226,8 @@ class account_add_tmpl_wizard(osv.osv_memory):
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])
vals={
'name': account_template.name,
#'sign': account_template.sign,
'currency_id': account_template.currency_id and account_template.currency_id.id or False,
'code': account_template.code,
'type': account_template.type,
@ -2244,10 +2236,8 @@ class account_add_tmpl_wizard(osv.osv_memory):
'shortcut': account_template.shortcut,
'note': account_template.note,
'parent_id': data[0]['cparent_id'],
# 'tax_ids': [(6,0,tax_ids)], todo!!
'company_id': company_id,
}
# print "Creating:", vals
new_account = acc_obj.create(cr, uid, vals)
return {'type':'state', 'state': 'end' }
@ -2310,6 +2300,7 @@ class account_chart_template(osv.osv):
'property_account_income_categ': fields.many2one('account.account.template','Income Category Account'),
'property_account_expense': fields.many2one('account.account.template','Expense Account on Product Template'),
'property_account_income': fields.many2one('account.account.template','Income Account on Product Template'),
'property_reserve_and_surplus_account': fields.many2one('account.account.template', 'Reserve and Surplus Account', domain=[('type', '=', 'payable')] , help='This Account is used for transferring Profit/Loss(If It is Profit : Amount will be added, Loss : Amount will be deducted.), Which is calculated from Profilt & Loss Report'),
}
account_chart_template()
@ -2561,7 +2552,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
code_acc=str(code_acc) + (str('0'*(dig-code_main)))
vals={
'name': (obj_acc_root.id == account_template.id) and obj_multi.company_id.name or account_template.name,
#'sign': account_template.sign,
'currency_id': account_template.currency_id and account_template.currency_id.id or False,
'code': code_acc,
'type': account_template.type,
@ -2591,7 +2581,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_sp_journal_view')])
data = data_pool.browse(cr, uid, data_id[0])
view_id = data.res_id
seq_id = obj_sequence.search(cr, uid, [('name','=','Account Journal')])[0]
if obj_multi.seq_journal:
@ -2632,16 +2622,16 @@ class wizard_multi_charts_accounts(osv.osv_memory):
data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_bank_view')])
data = data_pool.browse(cr, uid, data_id[0])
view_id_cash = data.res_id
data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_bank_view_multi')])
data = data_pool.browse(cr, uid, data_id[0])
ref_acc_bank = data.res_id
view_id_cur = data.res_id
ref_acc_bank = obj_multi.chart_template_id.bank_account_view_id
current_num = 1
for line in obj_multi.bank_accounts_id:
#create the account_account for this bank journal
tmp = self.pool.get('res.partner.bank').name_get(cr, uid, [line.acc_no.id])[0][1]
tmp = line.acc_name
dig = obj_multi.code_digits
if ref_acc_bank.code:
try:
@ -2649,7 +2639,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
except Exception,e:
new_code = str(ref_acc_bank.code.ljust(dig-len(str(current_num)),'0')) + str(current_num)
vals = {
'name': line.acc_no.bank and line.acc_no.bank.name+' '+tmp or tmp,
'name': tmp,
'currency_id': line.currency_id and line.currency_id.id or False,
'code': new_code,
'type': 'other',
@ -2693,7 +2683,8 @@ class wizard_multi_charts_accounts(osv.osv_memory):
('property_account_expense_categ','product.category','account.account'),
('property_account_income_categ','product.category','account.account'),
('property_account_expense','product.template','account.account'),
('property_account_income','product.template','account.account')
('property_account_income','product.template','account.account'),
('property_reserve_and_surplus_account','res.company','account.account')
]
for record in todo_list:
r = []
@ -2706,6 +2697,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'fields_id': field[0],
'value': account and 'account.account,'+str(acc_template_ref[account.id]) or False,
}
if r:
#the property exist: modify it
property_obj.write(cr, uid, r, vals)
@ -2742,15 +2734,15 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'position_id' : new_fp,
}
obj_ac_fp.create(cr, uid, vals_acc)
#fially inactive the demo chart of accounts
data_id = data_pool.search(cr, uid, [('model','=','account.account'), ('name','=','chart0')])
if data_id:
data = data_pool.browse(cr, uid, data_id[0])
account_id = data.res_id
if account_id:
cr.execute("update account_account set active='f' where id=%s" % (account_id))
acc_ids = obj_acc._get_children_and_consol(cr, uid, [account_id])
if acc_ids:
cr.execute("update account_account set active='f' where id in " + str(tuple(acc_ids)))
wizard_multi_charts_accounts()
class account_bank_accounts_wizard(osv.osv_memory):

View File

@ -42,7 +42,7 @@ class account_analytic_line(osv.osv):
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'),
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c),
}
}
_order = 'date'
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
@ -65,7 +65,6 @@ class account_analytic_line(osv.osv):
return False
return True
_constraints = [
# (_check_company, 'You can not create analytic line that is not in the same company than the account line', ['account_id'])
]
# Compute the cost based on the price type define into company

View File

@ -1,28 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<assert model="account.move" search="[]" string="For all Ledger Postings, the state is valid implies that the sum of credits equals the sum of debits">
<assert model="account.move" search="[]" string="For all Journal Items, the state is valid implies that the sum of credits equals the sum of debits">
<test expr="not len(line_id) or line_id[0].state != 'valid' or (sum([l.debit - l.credit for l in line_id]) &lt;= 0.00001)"/>
</assert>
<!-- <assert model="account.account" search="[]" string="For all accounts, the balance is equal to the sum of the balance of its childs">
<assert model="account.account" search="[]" string="For all accounts, the balance is equal to the sum of the balance of its childs">
<test expr="not len(child_id) or (balance - sum([c.balance for c in child_id]) &lt;= 0.00001)"/>
</assert>
<assert model="account.move.line" search="[('account_id.type', '=', 'view')]" string="Accounts of view type do not contain any move line">
<test expr="False"/>
</assert>
<assert model="account.invoice" search="[('state', 'in', ['paid', 'open'])]" string="The total amount of all paid or open invoices is correctly computed">
<test expr="sum([l.price_subtotal for l in invoice_line]) - amount_untaxed &lt;= 0.00001"/>
</assert>
<assert model="account.move.reconcile" search="[]" string="For each reconciliation, the sum of credits equals the sum of debits">
<test expr="sum([l.debit - l.credit for l in line_id]) &lt;= 0.00001"/>
</assert>
-->
</data>
</openerp>

View File

@ -20,9 +20,9 @@
##############################################################################
import time
import netsvc
from osv import fields, osv
from tools.misc import currency
from tools.translate import _
import decimal_precision as dp
@ -52,13 +52,13 @@ class account_bank_statement(osv.osv):
journal_pool = self.pool.get('account.journal')
journal_type = context.get('journal_type', False)
journal_id = False
if journal_type:
ids = journal_pool.search(cr, uid, [('type', '=', journal_type)])
if ids:
journal_id = ids[0]
return journal_id
return journal_id
def _default_balance_start(self, cr, uid, context={}):
cr.execute('select id from account_bank_statement where journal_id=%s order by date desc limit 1', (1,))
@ -126,12 +126,12 @@ class account_bank_statement(osv.osv):
currency_id = res[statement_id]
res[statement_id] = (currency_id, currency_names[currency_id])
return res
_order = "date desc"
_name = "account.bank.statement"
_description = "Bank Statement"
_columns = {
'name': fields.char('Name', size=64, required=True, states={'confirm': [('readonly', True)]}),
'name': fields.char('Name', size=64, required=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself', states={'confirm': [('readonly', True)]}),
'date': fields.date('Date', required=True, states={'confirm': [('readonly', True)]}),
'journal_id': fields.many2one('account.journal', 'Journal', required=True,
states={'confirm': [('readonly', True)]}, domain=[('type', '=', 'bank')]),
@ -185,7 +185,7 @@ class account_bank_statement(osv.osv):
context.update({
'period_id':pids[0]
})
return {
'value':res,
'context':context,
@ -194,16 +194,19 @@ class account_bank_statement(osv.osv):
def button_dummy(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {}, context)
return True
def button_confirm_bank(self, cr, uid, ids, context={}):
def button_confirm_bank(self, cr, uid, ids, context=None):
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')
account_analytic_line_obj = self.pool.get('account.analytic.line')
account_bank_statement_line_obj = self.pool.get('account.bank.statement.line')
obj_seq = self.pool.get('ir.sequence')
if context is None:
context = {}
company_currency_id = res_users_obj.browse(cr, uid, uid,
context=context).company_id.currency_id.id
@ -220,6 +223,11 @@ class account_bank_statement(osv.osv):
raise osv.except_osv(_('Configuration Error !'),
_('Please verify that an account is defined in the journal.'))
if not st.name == '/':
next_number = st.name
else:
next_number = obj_seq.get(cr, uid, 'account.bank.statement')
for line in st.move_line_ids:
if line.state <> 'valid':
raise osv.except_osv(_('Error !'),
@ -228,14 +236,18 @@ class account_bank_statement(osv.osv):
# 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})
if move.analytic_account_id:
if not st.journal_id.analytic_journal_id:
raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (st.journal_id.name,))
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)]
'move_ids': [(4, move_id, False)]
})
if not move.amount:
continue
@ -266,6 +278,7 @@ class account_bank_statement(osv.osv):
'journal_id': st.journal_id.id,
'period_id': st.period_id.id,
'currency_id': st.currency.id,
'analytic_account_id': move.analytic_account_id and move.analytic_account_id.id or False
}
amount = res_currency_obj.compute(cr, uid, st.currency.id,
@ -287,7 +300,28 @@ class account_bank_statement(osv.osv):
account=acc_cur)
val['amount_currency'] = amount_cur
torec.append(account_move_line_obj.create(cr, uid, val , context=context))
move_line_id = account_move_line_obj.create(cr, uid, val , context=context)
torec.append(move_line_id)
if move.analytic_account_id:
anal_val = {}
amt = (val['credit'] or 0.0) - (val['debit'] or 0.0)
anal_val = {
'name': val['name'],
'ref': val['ref'],
'date': val['date'],
'amount': amt,
'account_id': val['analytic_account_id'],
'currency_id': val['currency_id'],
'general_account_id': val['account_id'],
'journal_id': st.journal_id.analytic_journal_id.id,
'period_id': val['period_id'],
'user_id': uid,
'move_id': move_line_id
}
if val.get('amount_currency', False):
anal_val['amount_currency'] = val['amount_currency']
account_analytic_line_obj.create(cr, uid, anal_val, context=context)
if move.reconcile_id and move.reconcile_id.line_new_ids:
for newline in move.reconcile_id.line_new_ids:
@ -336,7 +370,7 @@ class account_bank_statement(osv.osv):
context=context):
if line.state <> 'valid':
raise osv.except_osv(_('Error !'),
_('Ledger Posting line "%s" is not valid') % line.name)
_('Journal Item "%s" is not valid') % line.name)
if move.reconcile_id and move.reconcile_id.line_ids:
## Search if move has already a partial reconciliation
@ -365,17 +399,12 @@ class account_bank_statement(osv.osv):
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))
move_name = next_number + ' - ' + str(move.sequence)
account_move_obj.write(cr, uid, [move_id], {'name': move_name, 'state': 'posted'}) # Bank statements will not consider boolean on journal entry_posted
if st.journal_id.entry_posted:
account_move_obj.write(cr, uid, [move_id], {'state':'posted'})
self.log(cr, uid, st.id, 'Statement %s is confirmed and entries are created.' % st.name)
done.append(st.id)
next_number = self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement')
self.write(cr, uid, [st.id], {'name':next_number}, context)
self.write(cr, uid, [st.id], {'name': next_number}, context=context)
self.write(cr, uid, done, {'state':'confirm'}, context=context)
return True
@ -394,28 +423,15 @@ class account_bank_statement(osv.osv):
return True
def onchange_journal_id(self, cursor, user, statement_id, journal_id, context=None):
if not journal_id:
return {'value': {'currency': False}}
account_journal_obj = self.pool.get('account.journal')
res_users_obj = self.pool.get('res.users')
res_currency_obj = self.pool.get('res.currency')
cursor.execute('SELECT balance_end_real \
FROM account_bank_statement \
WHERE journal_id = %s \
ORDER BY date DESC,id DESC LIMIT 1', (journal_id,))
WHERE journal_id = %s AND NOT state = %s \
ORDER BY date DESC,id DESC LIMIT 1', (journal_id, 'draft'))
res = cursor.fetchone()
balance_start = res and res[0] or 0.0
currency_id = account_journal_obj.browse(cursor, user, journal_id,
context=context).currency.id
if not currency_id:
currency_id = res_users_obj.browse(cursor, user, user,
context=context).company_id.currency_id.id
currency = res_currency_obj.name_get(cursor, user, [currency_id],
context=context)[0]
return {'value': {'balance_start': balance_start, 'currency': currency}}
return {'value': {'balance_start': balance_start}}
def unlink(self, cr, uid, ids, context=None):
stat = self.read(cr, uid, ids, ['state'])
@ -600,26 +616,27 @@ class account_bank_statement_reconcile_line(osv.osv):
'account_id': fields.many2one('account.account', 'Account', required=True),
'line_id': fields.many2one('account.bank.statement.reconcile', 'Reconcile'),
'amount': fields.float('Amount', required=True),
'analytic_id': fields.many2one('account.analytic.account',"Analytic Account")
'analytic_id': fields.many2one('account.analytic.account',"Analytic Account", domain=[('parent_id', '!=', False)])
}
_defaults = {
'name': lambda *a: 'Write-Off',
'name': 'Write-Off',
}
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=None):
res = {'value': {}}
obj_partner = self.pool.get('res.partner')
if context is None:
context = {}
if not partner_id:
return res
line = self.browse(cursor, user, line_id)
if not line or (line and not line[0].account_id):
part = self.pool.get('res.partner').browse(cursor, user, partner_id,
context=context)
part = obj_partner.browse(cursor, user, partner_id, context=context)
if type == 'supplier':
account_id = part.property_account_payable.id
else:
@ -645,10 +662,6 @@ 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):
@ -670,7 +683,7 @@ class account_bank_statement_line(osv.osv):
res[line.id] = 0.0
return res
_order = "date,name desc"
_order = "statement_id desc, sequence"
_name = "account.bank.statement.line"
_description = "Bank Statement Line"
_columns = {
@ -689,6 +702,7 @@ class account_bank_statement_line(osv.osv):
select=True, required=True, ondelete='cascade'),
'reconcile_id': fields.many2one('account.bank.statement.reconcile',
'Reconcile'),
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),
'move_ids': fields.many2many('account.move',
'account_bank_statement_line_move_rel', 'move_id','statement_id',
'Moves'),
@ -707,7 +721,4 @@ class account_bank_statement_line(osv.osv):
account_bank_statement_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -28,14 +28,14 @@ from tools.translate import _
import decimal_precision as dp
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
@ -51,7 +51,7 @@ class account_cashbox_line(osv.osv):
""" Calculates Sub total on change of number
@param pieces: Names of fields.
@param number:
"""
"""
sub=pieces*number
return {'value':{'subtotal': sub or 0.0}}
@ -65,9 +65,9 @@ class account_cashbox_line(osv.osv):
account_cashbox_line()
class account_cash_statement(osv.osv):
_inherit = 'account.bank.statement'
def _get_starting_balance(self, cr, uid, ids, context=None):
""" Find starting balance
@ -78,23 +78,23 @@ class account_cash_statement(osv.osv):
res ={}
for statement in self.browse(cr, uid, ids):
amount_total=0.0
if statement.journal_id.type not in('cash'):
continue
for line in statement.starting_details_ids:
amount_total+= line.pieces * line.number
res[statement.id] = {
'balance_start':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
@ -102,7 +102,7 @@ class account_cash_statement(osv.osv):
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 "
@ -118,19 +118,6 @@ class account_cash_statement(osv.osv):
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')
@ -163,7 +150,7 @@ class account_cash_statement(osv.osv):
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')
@ -171,7 +158,7 @@ class account_cash_statement(osv.osv):
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
def _get_cash_open_box_lines(self, cr, uid, ids, context={}):
@ -195,14 +182,14 @@ class account_cash_statement(osv.osv):
}
res.append((0, 0, dct))
return res
_columns = {
'company_id':fields.many2one('res.company', 'Company', required=False),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, states={'confirm': [('readonly', True)]}, domain=[('type', '=', 'cash')]),
'balance_end_real': fields.float('Closing Balance', digits_compute=dp.get_precision('Account'), states={'confirm':[('readonly', True)]}, help="closing balance entered by the cashbox verifier"),
'state': fields.selection(
[('draft', 'Draft'),
('confirm', 'Confirm'),
('confirm', 'Confirmed'),
('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"),
@ -210,7 +197,7 @@ class account_cash_statement(osv.osv):
'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),
'name': fields.char('Name', size=64, required=True, readonly=False, help='if you give the Name other then / , its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'),
'user_id':fields.many2one('res.users', 'Responsible', required=False),
}
_defaults = {
@ -226,8 +213,8 @@ class account_cash_statement(osv.osv):
company_id = vals and vals.get('company_id',False)
if company_id:
sql = [
('company_id', '=', vals['company_id']),
('journal_id', '=', vals['journal_id']),
('company_id', '=', vals['company_id']),
('journal_id', '=', vals['journal_id']),
('state', '=', 'open')
]
open_jrnl = self.search(cr, uid, sql)
@ -247,112 +234,112 @@ class account_cash_statement(osv.osv):
res_id = super(account_cash_statement, self).create(cr, uid, vals, context=context)
self.write(cr, uid, [res_id], {})
return res_id
def write(self, cr, uid, ids, vals, context=None):
"""
Update redord(s) comes in {ids}, with new value comes as {vals}
return True on success, False otherwise
@param cr: cursor to database
@param user: id of current user
@param ids: list of record ids to be update
@param vals: dict of new values to be set
@param context: context arguments, like lang, time zone
@return: True on success, False otherwise
"""
super(account_cash_statement, self).write(cr, uid, ids, vals)
res = self._get_starting_balance(cr, uid, ids)
for rs in res:
super(account_cash_statement, self).write(cr, uid, rs, res.get(rs))
return True
def onchange_journal_id(self, cr, uid, statement_id, journal_id, context={}):
""" Changes balance start and starting details if journal_id changes"
""" 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
@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])
vals = {}
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)))
if statement.name and statement.name == '/':
number = self.pool.get('ir.sequence').get(cr, uid, 'account.cash.statement')
vals.update({
'name':number
})
# 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)
#
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:
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)
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.update({
'date':time.strftime("%Y-%m-%d %H:%M:%S"),
'date':time.strftime("%Y-%m-%d %H:%M:%S"),
'state':'open',
})
self.write(cr, uid, ids, vals)
return True
def button_confirm_cash(self, cr, uid, ids, context={}):
""" Check the starting and ending detail of statement
@return: True
""" Check the starting and ending detail of statement
@return: True
"""
done = []
res_currency_obj = self.pool.get('res.currency')
@ -360,24 +347,20 @@ class account_cash_statement(osv.osv):
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):
self.write(cr, uid, [st.id], {'balance_end_real':st.balance_end})
st.balance_end_real = st.balance_end
if not st.state == 'open':
continue
if not self._equal_balance(cr, uid, ids, st, context):
raise osv.except_osv(_('Error !'), _('CashBox Balance is not matching with Calculated 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 !'),
@ -499,7 +482,7 @@ class account_cash_statement(osv.osv):
context=context):
if line.state <> 'valid':
raise osv.except_osv(_('Error !'),
_('Ledger Posting line "%s" is not valid') % line.name)
_('Journal Item "%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)
@ -519,7 +502,7 @@ class account_cash_statement(osv.osv):
if st.journal_id.entry_posted:
account_move_obj.write(cr, uid, [move_id], {'state':'posted'})
done.append(st.id)
vals = {
'state':'confirm',
'closing_date':time.strftime("%Y-%m-%d %H:%M:%S")

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<data>
<!--
Fiscal year
-->
Fiscal year
-->
<record id="data_fiscalyear" model="account.fiscalyear">
<field eval="'Fiscal Year '+time.strftime('%Y')" name="name"/>
@ -15,11 +15,12 @@
</record>
<!--
Fiscal Periods
-->
Fiscal Periods
-->
<record id="period_1" model="account.period">
<field eval="'Jan.'+time.strftime('%Y')" name="name"/>
<field eval="'01/'+time.strftime('%Y')" name="code"/>
<field eval="'01/'+time.strftime('%Y')" name="name"/>
<field eval="True" name="special"/>
<field name="fiscalyear_id" ref="data_fiscalyear"/>
<field eval="time.strftime('%Y')+'-01-01'" name="date_start"/>
@ -27,7 +28,8 @@
<field name="company_id" ref="base.main_company"/>
</record>
<record id="period_2" model="account.period">
<field eval="'Feb.'+time.strftime('%Y')" name="name"/>
<field eval="'02/'+time.strftime('%Y')" name="code"/>
<field eval="'02/'+time.strftime('%Y')" name="name"/>
<field eval="True" name="special"/>
<field name="fiscalyear_id" ref="data_fiscalyear"/>
<field eval="time.strftime('%Y')+'-02-01'" name="date_start"/>
@ -35,7 +37,8 @@
<field name="company_id" ref="base.main_company"/>
</record>
<record id="period_3" model="account.period">
<field eval="'Mar.'+time.strftime('%Y')" name="name"/>
<field eval="'03/'+time.strftime('%Y')" name="code"/>
<field eval="'03/'+time.strftime('%Y')" name="name"/>
<field eval="True" name="special"/>
<field name="fiscalyear_id" ref="data_fiscalyear"/>
<field eval="time.strftime('%Y')+'-03-01'" name="date_start"/>
@ -43,7 +46,8 @@
<field name="company_id" ref="base.main_company"/>
</record>
<record id="period_4" model="account.period">
<field eval="'Apr.'+time.strftime('%Y')" name="name"/>
<field eval="'04/'+time.strftime('%Y')" name="code"/>
<field eval="'04/'+time.strftime('%Y')" name="name"/>
<field eval="True" name="special"/>
<field name="fiscalyear_id" ref="data_fiscalyear"/>
<field eval="time.strftime('%Y')+'-04-01'" name="date_start"/>
@ -51,7 +55,8 @@
<field name="company_id" ref="base.main_company"/>
</record>
<record id="period_5" model="account.period">
<field eval="'May.'+time.strftime('%Y')" name="name"/>
<field eval="'05/'+time.strftime('%Y')" name="code"/>
<field eval="'05/'+time.strftime('%Y')" name="name"/>
<field eval="True" name="special"/>
<field name="fiscalyear_id" ref="data_fiscalyear"/>
<field eval="time.strftime('%Y')+'-05-01'" name="date_start"/>
@ -59,7 +64,8 @@
<field name="company_id" ref="base.main_company"/>
</record>
<record id="period_6" model="account.period">
<field eval="'Jun.'+time.strftime('%Y')" name="name"/>
<field eval="'06/'+time.strftime('%Y')" name="code"/>
<field eval="'06/'+time.strftime('%Y')" name="name"/>
<field name="fiscalyear_id" ref="data_fiscalyear"/>
<field eval="True" name="special"/>
<field eval="time.strftime('%Y')+'-06-01'" name="date_start"/>
@ -67,7 +73,8 @@
<field name="company_id" ref="base.main_company"/>
</record>
<record id="period_7" model="account.period">
<field eval="'Jul.'+time.strftime('%Y')" name="name"/>
<field eval="'07/'+time.strftime('%Y')" name="code"/>
<field eval="'07/'+time.strftime('%Y')" name="name"/>
<field eval="True" name="special"/>
<field name="fiscalyear_id" ref="data_fiscalyear"/>
<field eval="time.strftime('%Y')+'-07-01'" name="date_start"/>
@ -75,7 +82,8 @@
<field name="company_id" ref="base.main_company"/>
</record>
<record id="period_8" model="account.period">
<field eval="'Aug.'+time.strftime('%Y')" name="name"/>
<field eval="'08/'+time.strftime('%Y')" name="code"/>
<field eval="'08/'+time.strftime('%Y')" name="name"/>
<field eval="True" name="special"/>
<field name="fiscalyear_id" ref="data_fiscalyear"/>
<field eval="time.strftime('%Y')+'-08-01'" name="date_start"/>
@ -83,7 +91,8 @@
<field name="company_id" ref="base.main_company"/>
</record>
<record id="period_9" model="account.period">
<field eval="'Sep.'+time.strftime('%Y')" name="name"/>
<field eval="'09/'+time.strftime('%Y')" name="code"/>
<field eval="'09/'+time.strftime('%Y')" name="name"/>
<field eval="True" name="special"/>
<field name="fiscalyear_id" ref="data_fiscalyear"/>
<field eval="time.strftime('%Y')+'-09-01'" name="date_start"/>
@ -91,7 +100,8 @@
<field name="company_id" ref="base.main_company"/>
</record>
<record id="period_10" model="account.period">
<field eval="'Oct.'+time.strftime('%Y')" name="name"/>
<field eval="'10/'+time.strftime('%Y')" name="code"/>
<field eval="'10/'+time.strftime('%Y')" name="name"/>
<field eval="True" name="special"/>
<field name="fiscalyear_id" ref="data_fiscalyear"/>
<field eval="time.strftime('%Y')+'-10-01'" name="date_start"/>
@ -99,7 +109,8 @@
<field name="company_id" ref="base.main_company"/>
</record>
<record id="period_11" model="account.period">
<field eval="'Nov.'+time.strftime('%Y')" name="name"/>
<field eval="'11/'+time.strftime('%Y')" name="code"/>
<field eval="'11/'+time.strftime('%Y')" name="name"/>
<field eval="True" name="special"/>
<field name="fiscalyear_id" ref="data_fiscalyear"/>
<field eval="time.strftime('%Y')+'-11-01'" name="date_start"/>
@ -107,7 +118,8 @@
<field name="company_id" ref="base.main_company"/>
</record>
<record id="period_12" model="account.period">
<field eval="'Dec.'+time.strftime('%Y')" name="name"/>
<field eval="'12/'+time.strftime('%Y')" name="code"/>
<field eval="'12/'+time.strftime('%Y')" name="name"/>
<field eval="True" name="special"/>
<field name="fiscalyear_id" ref="data_fiscalyear"/>
<field eval="time.strftime('%Y')+'-12-01'" name="date_start"/>

View File

@ -14,7 +14,7 @@
action="action_account_period_tree"
id="menu_action_account_period_close_tree"
parent="account.menu_account_end_year_treatments"
sequence="0"/>
sequence="0" groups="base.group_extended"/>
</data>
</openerp>

View File

@ -1,101 +1,140 @@
<openerp>
<data>
<record id="view_account_installer" model="ir.ui.view">
<field name="name">account.installer.view</field>
<field name="model">account.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Accounting Modules Installation</attribute>
</form>
<data>
<record id="view_account_configuration_installer" model="ir.ui.view">
<field name="name">account.installer.form</field>
<field name="model">account.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Accounting System Configuration</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string">Configure Your Accounting System</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<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>
</xpath>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
<attribute name='rowspan'>23</attribute>
<attribute name='string'></attribute>
</xpath>
<group colspan="8">
<group colspan="4" height="450" width="600">
<field name="charts"/>
<group colspan="4">
<separator col="4" colspan="4" string="Configure Fiscal Year"/>
<field name="company_id" colspan="4" widget="selection" groups="base.group_multi_company"/>
<field name="date_start" on_change="on_change_start_date(date_start)"/>
<field name="date_stop"/>
<field name="period" colspan="4"/>
</group>
<group colspan="4" attrs="{'invisible':[('charts','!=','configurable')]}">
<separator col="4" colspan="4" string="Bank and Cost Account"/>
<field colspan="4" mode="tree" height="200" name="bank_accounts_id" nolabel="1" widget="one2many_list">
<form string="">
<field name="acc_name"/>
<field name="account_type"/>
<field name="currency_id" widget="selection"/>
</form>
<tree editable="bottom" string="">
<field name="acc_name"/>
<field name="account_type"/>
<field name="currency_id" widget="selection"/>
</tree>
</field>
</group>
<group colspan="4" attrs="{'invisible':[('charts','!=','configurable')]}">
<field name="sale_tax" colspan="2" on_change="on_change_tax(sale_tax)"/>
<field name="purchase_tax" colspan="2" />
</group>
</group>
</group>
</data>
</field>
</record>
<separator string="title" position="attributes">
<attribute name="string"
>Configure Your Accounting System</attribute>
</separator>
<xpath expr="//label[@string='description']"
position="attributes">
<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>
</xpath>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
<attribute name='rowspan'>23</attribute>
<attribute name='string'></attribute>
</xpath>
<group colspan="8">
<group colspan="4" height="450" width="600">
<field name="charts"/>
<group colspan="4">
<separator col="4" colspan="4" string="Configure Fiscal Year"/>
<field name="date_start" on_change="on_change_start_date(date_start)"/>
<field name="date_stop"/>
<field name="period" colspan="4"/>
</group>
<group colspan="4" attrs="{'invisible':[('charts','!=','configurable')]}">
<separator col="4" colspan="4" string="Bank and Cost Account"/>
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list">
<form string="">
<field name="acc_name"/>
<field name="account_type"/>
<field name="currency_id" widget="selection"/>
<record id="view_account_modules_installer" model="ir.ui.view">
<field name="name">account.installer.modules.form</field>
<field name="model">account.installer.modules</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Extra Accounting Modules Installation</attribute>
</form>
<tree editable="bottom" string="">
<field name="acc_name"/>
<field name="account_type"/>
<field name="currency_id" widget="selection"/>
</tree>
</field>
</group>
<group colspan="4" attrs="{'invisible':[('charts','!=','configurable')]}">
<field name="sale_tax" colspan="2" on_change="on_change_tax(sale_tax)"/>
<field name="purchase_tax" colspan="2" />
</group>
<group colspan="4" groups="base.group_extended">
<separator col="4" colspan="4" string="Install Extra Account Module"/>
<field name="account_analytic_plans"/>
<field name="account_payment"/>
<field name="account_followup"/>
<field name="account_asset"/>
<field name="account_voucher"/>
<field name="account_voucher_payment"/>
</group>
</group>
</group>
</data>
</field>
</record>
<separator string="title" position="attributes">
<attribute name="string">Install Extra Accounting Modules In Your Accounting System</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">From this screen, you can install extra accounting modules in your accounting system. Select the modules to directly install them. If you do not think you need any of these right now, you can easily install them later.</attribute>
</xpath>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
<attribute name='rowspan'>23</attribute>
<attribute name='string'></attribute>
</xpath>
<group colspan="8">
<group colspan="4" height="450" width="600">
<group colspan="4">
<field name="account_analytic_plans"/>
<field name="account_payment"/>
<field name="account_followup"/>
<field name="account_voucher"/>
<!-- <field name="account_voucher_payment"/>-->
</group>
</group>
</group>
</data>
</field>
</record>
<record id="action_account_installer" model="ir.actions.act_window">
<field name="name">Accounting Modules Installation</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.installer</field>
<field name="view_id" ref="view_account_installer"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="action_account_configuration_installer" model="ir.actions.act_window">
<field name="name">Accounting Chart Configuration</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.installer</field>
<field name="view_id" ref="view_account_configuration_installer"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="account_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_account_installer"/>
<field name="sequence">3</field>
<field name="restart">onskip</field>
</record>
<record id="action_account_installer" model="ir.actions.act_window">
<field name="name">Accounting Modules Installation</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.installer.modules</field>
<field name="view_id" ref="view_account_modules_installer"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="account_ir_actions_todo_tree" model="ir.ui.view">
<field name="model">ir.actions.todo</field>
<field name="name">account_installer_action_replace</field>
<field name="type">tree</field>
<field name="inherit_id" ref="base.ir_actions_todo_tree"/>
<field name="arch" type="xml">
<xpath expr="//button[@string='Launch']" position="replace">
<button name="%(action_account_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
</xpath>
</field>
</record>
<record id="account_configuration_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_account_configuration_installer"/>
<field name="sequence">3</field>
<field name="restart">onskip</field>
</record>
</data>
<record id="account_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_account_installer"/>
<field name="sequence">5</field>
<field name="restart">always</field>
</record>
<record id="account_ir_actions_todo_tree" model="ir.ui.view">
<field name="model">ir.actions.todo</field>
<field name="name">account_installer_action_replace</field>
<field name="type">tree</field>
<field name="inherit_id" ref="base.ir_actions_todo_tree"/>
<field name="arch" type="xml">
<xpath expr="//button[@string='Launch']" position="replace">
<button name="%(action_account_configuration_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@ -16,7 +16,7 @@
</calendar>
</field>
</record>
<record model="ir.ui.view" id="view_invoice_graph">
<field name="name">account.invoice.graph</field>
<field name="model">account.invoice</field>
@ -28,7 +28,7 @@
</graph>
</field>
</record>
<record id="view_invoice_line_tree" model="ir.ui.view">
<field name="name">account.invoice.line.tree</field>
<field name="model">account.invoice.line</field>
@ -45,7 +45,7 @@
</tree>
</field>
</record>
<record id="view_invoice_line_form" model="ir.ui.view">
<field name="name">account.invoice.line.form</field>
<field name="model">account.invoice.line</field>
@ -62,10 +62,9 @@
<field colspan="4" name="name"/>
<field colspan="4" name="origin" groups="base.group_extended"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(parent.fiscal_position,account_id)" groups="base.group_user"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id)]" name="account_analytic_id" groups="base.group_user,base.group_extended"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="base.group_extended"/>
<newline/>
<field name="price_subtotal"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field colspan="4" name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]"/>
</page>
@ -76,7 +75,7 @@
</form>
</field>
</record>
<record id="view_invoice_tax_tree" model="ir.ui.view">
<field name="name">account.invoice.tax.tree</field>
<field name="model">account.invoice.tax</field>
@ -92,7 +91,7 @@
</tree>
</field>
</record>
<record id="view_invoice_tax_form" model="ir.ui.view">
<field name="name">account.invoice.tax.form</field>
<field name="model">account.invoice.tax</field>
@ -119,13 +118,13 @@
<field name="model">account.invoice</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="blue:state in ('draft');black:state in ('proforma','proforma2','open');gray:state in ('paid','cancel')" string="Invoice">
<tree colors="blue:state in ('draft');black:state in ('proforma','proforma2','open');gray:state in ('cancel')" string="Invoice">
<field name="date_invoice"/>
<field name="number"/>
<field name="partner_id" groups="base.group_user"/>
<field name="name"/>
<field name="journal_id" invisible="1"/>
<field name="period_id" invisible="1"/>
<field name="period_id" invisible="1" groups="account.group_account_user"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="user_id"/>
<field name="date_due"/>
@ -137,10 +136,7 @@
<field name="state"/>
<button name="invoice_open" states="draft,proforma2" string="Approve" 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="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='open,paid' icon="gtk-execute"/>
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="terp-dolar_ok!"/>
</tree>
</field>
</record>
@ -156,22 +152,22 @@
<field domain="[('type', '=', 'purchase')]" name="journal_id"/>
<field name="number" readonly="1"/>
<field name="type" invisible="1"/>
<field name="currency_id" domain="[('company_id','=', company_id)]" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}"/>
<field name="currency_id" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" groups="account.group_account_user"/>
<newline/>
<field name="partner_id" domain="[('supplier','=', 1)]" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" context="{'default_customer': 0}"/>
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
<field name="fiscal_position" groups="base.group_extended" widget="selection"/>
<newline/>
<field name="date_invoice"/>
<field name="period_id" groups="base.group_user"/>
<group colspan="2" col="1" groups="base.group_user">
<field name="period_id" groups="account.group_account_user"/>
<group colspan="2" col="1" groups="account.group_account_user">
<label align="0.0" string="(keep empty to use the current period)"/>
</group>
</group>
<notebook colspan="4">
<page string="Invoice">
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id),('journal_id','=',journal_id)]" name="account_id" groups="base.group_user"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id),('journal_id','=',journal_id)]" name="account_id" groups="account.group_account_user"/>
<field name="reference_type" nolabel="1" size="0"/>
<field name="reference" nolabel="1"/>
<field name="date_due"/>
@ -181,7 +177,7 @@
<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 domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(parent.fiscal_position,account_id)"/>
<field name="invoice_line_tax_id" view_mode="2" context="{'type':parent.type}" domain="[('parent_id','=',False)]"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id)]" name="account_analytic_id"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="base.group_extended"/>
<field name="quantity"/>
<field name="price_unit"/>
<!-- Removed if subtotal is set -->
@ -213,9 +209,9 @@
<field name="residual"/>
<group col="6" colspan="4">
<button name="invoice_open" states="draft,proforma2" string="Approve" icon="terp-camera_test"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='open,paid' icon="gtk-execute"/>
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
<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='Refund' states='open,paid' icon="gtk-execute"/>
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="terp-dolar_ok!"/>
<button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="base.group_no_one"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
</group>
@ -232,7 +228,7 @@
<field name="origin" 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"/>
<field name="move_id" groups="account.group_account_user"/>
<separator colspan="4" string="Additional Information"/>
<field colspan="4" name="comment" nolabel="1"/>
</page>
@ -265,22 +261,22 @@
<field name="journal_id" groups="base.group_user"/>
<field name="number"/>
<field name="type" invisible="1"/>
<field name="currency_id" domain="[('company_id','=', company_id)]" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}"/>
<field name="currency_id" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" groups="account.group_account_user"/>
<newline/>
<field name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" groups="base.group_user"/>
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
<field name="fiscal_position" groups="base.group_extended" widget="selection"/>
<newline/>
<field name="date_invoice"/>
<field name="period_id" groups="base.group_user"/>
<group colspan="2" col="1" groups="base.group_user">
<field name="period_id" groups="account.group_account_user"/>
<group colspan="2" col="1" groups="account.group_account_user">
<label align="0.0" string="(keep empty to use the current period)"/>
</group>
</group>
<notebook colspan="4">
<page string="Invoice">
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id),('journal_id','=',journal_id)]" name="account_id" groups="base.group_user"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id),('journal_id','=',journal_id)]" name="account_id" groups="account.group_account_user"/>
<field name="name"/>
<field name="payment_term" widget="selection"/>
<field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list"/>
@ -305,13 +301,14 @@
<field name="state"/>
<field name="residual"/>
<group col="7" colspan="4" groups="base.group_user">
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-check"/>
<button name="invoice_open" states="draft,proforma2" string="Create" icon="terp-document-new"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='open,paid' icon="gtk-execute"/>
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-gtk-media-pause" groups="account.group_account_user"/>
<button name="invoice_open" states="draft,proforma2" string="Create" icon="terp-camera_test"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="terp-dolar_ok!"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="base.group_no_one"/>
</group>
</group>
</page>
@ -326,8 +323,8 @@
<field name="origin"/>
<field colspan="4" domain="[('partner_id','=',partner_id)]" name="address_contact_id"
groups="base.group_extended"/>
<field name="move_id" groups="base.group_user"/>
<separator colspan="4" string="Additionnal Information"/>
<field name="move_id" groups="account.group_account_user"/>
<separator colspan="4" string="Additional Information"/>
<field colspan="4" name="comment" nolabel="1"/>
</page>
<page string="Payments">
@ -357,15 +354,15 @@
<search string="Search Invoice">
<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'])]" help="Invoices"/>
<filter icon="terp-gtk-media-pause" string="Proforma" domain="[('state','=','proforma2')]" help="Proforma Invoices"/>
<filter icon="terp-camera_test" string="Invoices" domain="[('state','not in',['draft','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" select="1" default="uid" widget="selection" string="Responsible">
<filter domain="[('user_id','=',uid)]" help="Responsible" icon="terp-partner" separator="1"/>
<field name="user_id" select="1" default="uid" widget="selection" string="Salesman">
<filter domain="[('user_id','=',uid)]" help="My invoices" icon="terp-personal" separator="1"/>
</field>
<field name="origin"/>
<field name="amount_total"/>
@ -373,14 +370,14 @@
<newline/>
<group col="10" colspan="4">
<field name="journal_id" widget="selection" select='1'/>
<field name="period_id" select='1'/>
<field name="period_id" select='1' string="Period"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<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="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_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"/>
@ -417,14 +414,13 @@
<field name="view_mode">tree</field>
<field name="act_window_id" ref="action_invoice_tree"/>
</record>
<record id="action_invoice_tree_view2" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field name="view_mode">form</field>
<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"/>-->
<record id="action_invoice_tree1" model="ir.actions.act_window">
<field name="name">Customer Invoices</field>
@ -437,13 +433,13 @@
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">Most of customer invoices are automatically generated in draft mode by OpenERP flows, following a purchase order for instance. Review, confirm or cancel, pay or refund your customers' invoices here. A manual invoice can be created here.</field>
</record>
<record id="action_invoice_tree1_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field name="view_mode">tree</field>
<field name="act_window_id" ref="action_invoice_tree1"/>
</record>
<record id="action_invoice_tree1_view2" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field name="view_mode">form</field>
@ -474,7 +470,7 @@
<field name="domain">[('type','=','out_refund')]</field>
<field name="context">{'type':'out_refund'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">A customer refund is a credit note to your customer that cancel invoice or a part of it.</field>
<field name="help">A customer refund is a credit note to your customer that cancel invoice or a part of it.</field>
</record>
<record id="action_invoice_tree3_view1" model="ir.actions.act_window.view">
@ -504,13 +500,26 @@
</record>
<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"/>
<act_window context="{'search_default_partner_id':[active_id]}" id="act_res_partner_2_account_invoice_opened" name="Invoices" res_model="account.invoice" src_model="res.partner"/>
<act_window domain="[('journal_id','=',active_id),('state','!=','draft'),('reconciled','=',False)]" id="act_account_journal_2_account_invoice_opened" name="Unpaid invoices" res_model="account.invoice" src_model="account.journal"/>
<act_window domain="[('account_analytic_id', '=', active_id)]" id="act_account_analytic_account_2_account_invoice_line" name="Invoice lines" res_model="account.invoice.line" src_model="account.analytic.account"/>
<act_window domain="[('partner_id', '=', partner_id), ('account_id.type', 'in', ['receivable', 'payable']), ('reconcile_id','=',False)]" id="act_account_invoice_account_move_unreconciled" name="Unreconciled Entries" res_model="account.move.line" src_model="account.invoice"/>
<act_window
domain="[('partner_id', '=', partner_id), ('account_id.reconcile', '=', True)]"
context="{'search_default_unreconciled':True}"
id="act_account_invoice_account_move_unreconciled"
name="Items to Reconcile"
res_model="account.move.line"
src_model="account.invoice"/>
<act_window
domain="[('move_id', '=', move_id)]"
id="act_account_invoice_account_move_invoice_link"
name="Invoice Items"
res_model="account.move.line"
src_model="account.invoice"/>
</data>
</openerp>

View File

@ -12,19 +12,6 @@
<field name="flow_start">True</field>
<field name="name">draft</field>
</record>
<!-- <record model="workflow.activity" id="act_confirm">
<field name="wkf_id" ref="wkf"/>
<field name="name">confirm</field>
</record> -->
<!-- <record id="act_proforma" model="workflow.activity">-->
<!-- <field name="wkf_id" ref="wkf"/>-->
<!-- <field name="name">proforma</field>-->
<!-- <field name="action">action_move_create()-->
<!--write({'state':'proforma'})</field>-->
<!-- <field name="kind">function</field>-->
<!-- </record>-->
<record id="act_proforma2" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
@ -65,35 +52,11 @@ write({'state':'cancel'})</field>
<field name="kind">function</field>
</record>
<!--
<record model="workflow.transition" id="t1">
<field name="act_from" ref="act_draft"/>
<field name="act_to" ref="act_confirm"/>
</record>
-->
<!-- <record id="t3" model="workflow.transition">-->
<!-- <field name="act_from" ref="act_draft"/>-->
<!-- <field name="act_to" ref="act_proforma"/>-->
<!-- <field name="signal">invoice_proforma</field>-->
<!-- </record>-->
<record id="t4" model="workflow.transition">
<field name="act_from" ref="act_draft"/>
<field name="act_to" ref="act_open"/>
<field name="signal">invoice_open</field>
</record>
<!-- <record id="t5" model="workflow.transition">-->
<!-- <field name="act_from" ref="act_proforma"/>-->
<!-- <field name="act_to" ref="act_open"/>-->
<!-- <field name="signal">invoice_open</field>-->
<!-- </record>-->
<!-- <record id="t7" model="workflow.transition">-->
<!-- <field name="act_from" ref="act_proforma"/>-->
<!-- <field name="act_to" ref="act_paid"/>-->
<!-- <field name="trigger_model">account.move.line</field>-->
<!-- <field name="trigger_expr_id">move_line_id_payment_get()</field>-->
<!-- <field name="condition">test_paid()</field>-->
<!-- </record>-->
<record id="t8" model="workflow.transition">
<field name="act_from" ref="act_open"/>
<field name="act_to" ref="act_paid"/>
@ -106,11 +69,6 @@ write({'state':'cancel'})</field>
<field name="act_to" ref="act_cancel"/>
<field name="signal">invoice_cancel</field>
</record>
<!-- <record id="t11" model="workflow.transition">-->
<!-- <field name="act_from" ref="act_proforma"/>-->
<!-- <field name="act_to" ref="act_cancel"/>-->
<!-- <field name="signal">invoice_cancel</field>-->
<!-- </record>-->
<record id="t12" model="workflow.transition">
<field name="act_from" ref="act_open"/>
<field name="act_to" ref="act_cancel"/>
@ -126,7 +84,7 @@ write({'state':'cancel'})</field>
<field name="act_to" ref="act_cancel"/>
<field name="signal">invoice_cancel</field>
</record>
<record id="open_test_to_paid" model="workflow.transition">
<field name="act_from" ref="act_open_test"/>
<field name="act_to" ref="act_paid"/>
@ -134,7 +92,7 @@ write({'state':'cancel'})</field>
<field name="trigger_expr_id">move_line_id_payment_get()</field>
<field name="condition">test_paid()</field>
</record>
<record id="draft_to_pro2" model="workflow.transition">
<field name="act_from" ref="account.act_draft"/>
<field name="act_to" ref="act_proforma2"/>
@ -147,14 +105,6 @@ write({'state':'cancel'})</field>
<field name="signal">invoice_open</field>
</record>
<record id="pro2_to_paid" model="workflow.transition">
<field name="act_from" ref="act_proforma2"/>
<field name="act_to" ref="account.act_paid"/>
<field name="trigger_model">account.move.line</field>
<field name="trigger_expr_id">move_line_id_payment_get()</field>
<field name="condition">test_paid()</field>
</record>
<record id="pro2_to_cancel" model="workflow.transition">
<field name="act_from" ref="act_proforma2"/>
<field name="act_to" ref="account.act_cancel"/>

View File

@ -3,45 +3,32 @@
<data>
<menuitem icon="terp-account" id="menu_finance" name="Accounting" sequence="13"/>
<menuitem id="menu_finance_receivables" name="Receivables" parent="menu_finance" sequence="1" groups="group_account_user,group_account_manager,base.group_system"/>
<menuitem id="menu_finance_payables" name="Payables" parent="menu_finance" sequence="2" groups="group_account_user,group_account_manager,base.group_system"/>
<menuitem id="menu_finance_receivables" name="Customers" parent="menu_finance" sequence="1" groups="group_account_user,group_account_manager,base.group_system"/>
<menuitem id="menu_finance_payables" name="Vendors" parent="menu_finance" sequence="2" groups="group_account_user,group_account_manager,base.group_system"/>
<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,group_account_manager,base.group_system"/>
<menuitem id="periodical_processing_journal_entries_validation" name="Entries to Review" parent="menu_finance_periodical_processing"/>
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user,group_account_manager,base.group_system,group_account_invoice"/>
<menuitem id="periodical_processing_journal_entries_validation" name="Draft Entries" parent="menu_finance_periodical_processing" groups="group_account_user,group_account_manager,base.group_system"/>
<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" groups="base.group_system"/>
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12" groups="base.group_system"/>
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12" groups="base.group_system,group_account_manager,group_account_user"/>
<menuitem id="menu_finance_reporting_budgets" name="Budgets" 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" groups="base.group_system"/>
<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="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration" groups="base.group_extended"/>
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts" groups="base.group_extended"/>
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting" groups="base.group_extended"/>
<menuitem id="menu_configuration_misc" name="Miscellaneous" 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_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_finance_generic_reporting" name="Generic Reporting" parent="menu_finance_reporting" sequence="100" groups="base.group_system,group_account_manager"/>
<menuitem id="menu_finance_entries" name="Accounting" parent="menu_finance" sequence="4"
groups="group_account_user,group_account_manager,base.group_system"/>
<menuitem id="account.menu_finance_recurrent_entries" name="Recurring Entries" parent="menu_finance_periodical_processing" sequence="15"/>
<menuitem id="account.menu_finance_recurrent_entries" name="Recurring Entries" parent="menu_finance_periodical_processing" sequence="15"
groups="base.group_extended"/>
<!-- <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_account_end_year_treatments" name="End of Period" parent="menu_finance_periodical_processing" groups="group_account_user,group_account_manager,base.group_system"/>
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="menu_finance_reporting" sequence="300" groups="account.group_account_manager"/>

View File

@ -29,7 +29,7 @@ import tools
class account_move_line(osv.osv):
_name = "account.move.line"
_description = "Entry Lines"
_description = "Journal Items"
def _query_get(self, cr, uid, obj='l', context={}):
fiscalyear_obj = self.pool.get('account.fiscalyear')
@ -144,7 +144,26 @@ class account_move_line(osv.osv):
del(data['account_tax_id'])
return data
def convert_to_period(self, cr, uid, context={}):
period_obj = self.pool.get('account.period')
#check if the period_id changed in the context from client side
if context.get('period_id', False):
period_id = context.get('period_id')
if type(period_id) == str:
ids = period_obj.search(cr, uid, [('name','ilike',period_id)])
context.update({
'period_id':ids[0]
})
return context
def _default_get(self, cr, uid, fields, context={}):
period_obj = self.pool.get('account.period')
context = self.convert_to_period(cr, uid, context)
# Compute simple values
data = super(account_move_line, self).default_get(cr, uid, fields, context)
# Starts: Manual entry from account.move form
@ -185,8 +204,6 @@ class account_move_line(osv.osv):
if not 'move_id' in fields: #we are not in manual entry
return data
period_obj = self.pool.get('account.period')
# Compute the current move
move_id = False
partner_id = False
@ -288,6 +305,7 @@ class account_move_line(osv.osv):
ml = self.browse(cr, uid, id, context)
return map(lambda x: x.id, ml.move_id.line_id)
# TODO: this is false, it does not uses draft and closed periods
def _balance(self, cr, uid, ids, prop, unknow_none, unknow_dict):
res={}
# TODO group the foreach in sql
@ -327,9 +345,9 @@ class account_move_line(osv.osv):
result = []
for line in self.browse(cr, uid, ids, context):
if line.ref:
result.append((line.id, (line.name or '')+' ('+line.ref+')'))
result.append((line.id, (line.move_id.name or '')+' ('+line.ref+')'))
else:
result.append((line.id, line.name))
result.append((line.id, line.move_id.name))
return result
def _balance_search(self, cursor, user, obj, name, args, domain=None, context=None):
@ -407,9 +425,9 @@ class account_move_line(osv.osv):
'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),
'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')),
'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade", domain=[('type','<>','view'), ('type', '<>', 'closed')], select=2),
'move_id': fields.many2one('account.move', 'Move', ondelete="cascade", states={'valid':[('readonly',True)]}, help="The move of this entry line.", select=2),
'move_id': fields.many2one('account.move', 'Move', ondelete="cascade", help="The move of this entry line.", select=2, required=True),
'narration': fields.related('move_id','narration', type='text', relation='account.move', string='Narration'),
'ref': fields.char('Ref.', size=64),
'ref': fields.related('move_id', 'ref', string='Reference', type='char', size=64, store=True),
'statement_id': fields.many2one('account.bank.statement', 'Statement', help="The bank statement used for bank reconciliation", select=1),
'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2),
'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),
@ -418,10 +436,10 @@ class account_move_line(osv.osv):
'period_id': fields.many2one('account.period', 'Period', required=True, select=2),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, select=1),
'blocked': fields.boolean('Litigation', help="You can check this box to mark the entry line as a litigation with the associated partner"),
'blocked': fields.boolean('Litigation', help="You can check this box to mark this journal item as a litigation with the associated partner"),
'partner_id': fields.many2one('res.partner', 'Partner'),
'date_maturity': fields.date('Maturity date', help="This field is used for payable and receivable entries. You can put the limit date for the payment of this entry line."),
'date_maturity': fields.date('Maturity date', help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line."),
'date': fields.related('move_id','date', string='Effective date', type='date', required=True,
store={
'account.move': (_get_move_lines, ['date'], 20)
@ -430,7 +448,7 @@ class account_move_line(osv.osv):
'analytic_lines': fields.one2many('account.analytic.line', 'move_id', 'Analytic lines'),
'centralisation': fields.selection([('normal','Normal'),('credit','Credit Centralisation'),('debit','Debit Centralisation')], 'Centralisation', size=6),
'balance': fields.function(_balance, fnct_search=_balance_search, method=True, string='Balance'),
'state': fields.selection([('draft','Draft'), ('valid','Valid')], 'State', readonly=True,
'state': fields.selection([('draft','Unbalanced'), ('valid','Valid')], 'State', readonly=True,
help='When new move line is created the state will be \'Draft\'.\n* When all the payments are done it will be in \'Valid\' state.'),
'tax_code_id': fields.many2one('account.tax.code', 'Tax Account', help="The Account can either be a base tax code or a tax code account."),
'tax_amount': fields.float('Tax/Base Amount', digits_compute=dp.get_precision('Account'), select=True, help="If the Tax account is a tax code account, this field will contain the taxed amount.If the tax account is base tax code, "\
@ -438,9 +456,9 @@ class account_move_line(osv.osv):
'invoice': fields.function(_invoice, method=True, string='Invoice',
type='many2one', relation='account.invoice', fnct_search=_invoice_search),
'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')),
'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)
}
@ -555,18 +573,18 @@ class account_move_line(osv.osv):
if journal:
jt = self.pool.get('account.journal').browse(cr, uid, journal).type
#FIXME: Bank and cash journal are such a journal we can not assume a account based on this 2 journals
# Bank and cash journal can have a payment or receipt transection, and in both type partner account
# Bank and cash journal can have a payment or receipt transaction, and in both type partner account
# will not be same id payment then payable, and if receipt then receivable
#if jt in ('sale', 'purchase_refund', 'bank', 'cash'):
if jt in ('sale', 'purchase_refund'):
val['account_id'] = self.pool.get('account.fiscal.position').map_account(cr, uid, part and part.property_account_position or False, id2)
elif jt in ('purchase', 'sale_refund', 'expense'):
elif jt in ('purchase', 'sale_refund', 'expense', 'bank', 'cash'):
val['account_id'] = self.pool.get('account.fiscal.position').map_account(cr, uid, part and part.property_account_position or False, id1)
if val.get('account_id', False):
d = self.onchange_account_id(cr, uid, ids, val['account_id'])
val.update(d['value'])
return {'value':val}
def onchange_account_id(self, cr, uid, ids, account_id=False, partner_id=False):
@ -783,6 +801,7 @@ class account_move_line(osv.osv):
return r_id
def view_header_get(self, cr, user, view_id, view_type, context):
context = self.convert_to_period(cr, user, context)
if context.get('account_id', False):
cr.execute('select code from account_account where id=%s', (context['account_id'],))
res = cr.fetchone()
@ -798,42 +817,55 @@ class account_move_line(osv.osv):
return j+(p and (':'+p) or '')
return False
# def onchange_date(self, cr, user, ids, date, context={}):
# """
# Returns a dict that contains new values and context
# @param cr: A database cursor
# @param user: ID of the user currently logged in
# @param date: latest value from user input for field date
# @param args: other arguments
# @param context: context arguments, like lang, time zone
# @return: Returns a dict which contains new values, and context
# """
# res = {}
# period_pool = self.pool.get('account.period')
# pids = period_pool.search(cr, user, [('date_start','<=',date), ('date_stop','>=',date)])
# if pids:
# res.update({
# 'period_id':pids[0]
# })
# context.update({
# 'period_id':pids[0]
# })
# return {
# 'value':res,
# 'context':context,
# }
def onchange_date(self, cr, user, ids, date, context={}):
"""
Returns a dict that contains new values and context
@param cr: A database cursor
@param user: ID of the user currently logged in
@param date: latest value from user input for field date
@param args: other arguments
@param context: context arguments, like lang, time zone
@return: Returns a dict which contains new values, and context
"""
res = {}
period_pool = self.pool.get('account.period')
pids = period_pool.search(cr, user, [('date_start','<=',date), ('date_stop','>=',date)])
if pids:
res.update({
'period_id':pids[0]
})
context.update({
'period_id':pids[0]
})
return {
'value':res,
'context':context,
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False):
journal_pool = self.pool.get('account.journal')
result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
if view_type != 'tree':
#Remove the toolbar from the form view
if view_type == 'form':
if result.get('toolbar', False):
result['toolbar']['action'] = []
#Restrict the list of journal view in search view
if view_type == 'search':
journal_list = journal_pool.name_search(cr, uid, '', [], context=context)
result['fields']['journal_id']['selection'] = journal_list
return result
if context.get('view_mode', False):
return result
fld = []
fields = {}
flds = []
title = "Accounting Entries" #self.view_header_get(cr, uid, view_id, view_type, context)
xml = '''<?xml version="1.0"?>\n<tree string="%s" editable="top" refresh="5" on_write="on_create_write">\n\t''' % (title)
journal_pool = self.pool.get('account.journal')
xml = '''<?xml version="1.0"?>\n<tree string="%s" editable="top" refresh="5" on_write="on_create_write" colors="red:state==\'draft\';black:state==\'valid\'">\n\t''' % (title)
ids = journal_pool.search(cr, uid, [])
journals = journal_pool.browse(cr, uid, ids)
@ -876,29 +908,41 @@ class account_move_line(osv.osv):
if common_fields.get(field) == total:
fields.get(field).append(None)
if field=='state':
state = 'colors="red:state==\'draft\'"'
# 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 == 'move_id':
attrs.append('required="False"')
elif field == 'account_tax_id':
attrs.append('domain="[(\'parent_id\',\'=\',False)]"')
attrs.append("context=\"{'journal_id':journal_id}\"")
elif field == 'account_id' and journal.id:
attrs.append('domain="[(\'journal_id\', \'=\', '+str(journal.id)+'),(\'type\',\'&lt;&gt;\',\'view\'), (\'type\',\'&lt;&gt;\',\'closed\')]" on_change="onchange_account_id(account_id, partner_id)"')
elif field == 'partner_id':
attrs.append('on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"')
elif field == 'journal_id':
attrs.append("context=\"{'journal_id':journal_id}\"")
elif field == 'statement_id':
attrs.append("domain=\"[('state','!=','confirm'),('journal_id.type','=','bank')]\"")
elif field == 'date':
attrs.append('on_change="onchange_date(date)"')
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])+'"')
@ -953,7 +997,7 @@ class account_move_line(osv.osv):
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'][:10],'%Y-%m-%d')>=time.strptime(period.date_start,'%Y-%m-%d') or not time.strptime(vals['date'][:10],'%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 !'))
raise osv.except_osv(_('Error'),_('The date of your Journal Entry is not in the defined period!'))
else:
return True
@ -1115,11 +1159,6 @@ class account_move_line(osv.osv):
'journal_id': journal.analytic_journal_id.id,
'ref': vals.get('ref', False),
})]
#else:
# raise osv.except_osv(_('No analytic journal !'), _('Please set an analytic journal on this financial journal !'))
#if not 'currency_id' in vals:
# vals['currency_id'] = account.company_id.currency_id.id
result = super(osv.osv, self).create(cr, uid, vals, context)
# CREATE Taxes
@ -1188,11 +1227,6 @@ class account_move_line(osv.osv):
self.create(cr, uid, data, context)
del vals['account_tax_id']
# No needed, related to the job
#if not is_new_move and 'date' in vals:
# if context and ('__last_update' in context):
# del context['__last_update']
# self.pool.get('account.move').write(cr, uid, [move_id], {'date':vals['date']}, context=context)
if check and ((not context.get('no_store_function')) or journal.entry_posted):
tmp = self.pool.get('account.move').validate(cr, uid, [vals['move_id']], context)
if journal.entry_posted and tmp:

View File

@ -47,20 +47,6 @@
name="Taxes"
parent="account.menu_finance_generic_reporting" sequence="3"/>
<!-- <wizard
id="wizard_vat_declaration"
menu="False"
model="account.tax.code"
name="account.vat.declaration"
string="Print Taxes Report"/> -->
<!-- <menuitem
icon="STOCK_PRINT"
action="wizard_vat_declaration"
id="menu_wizard_vat_declaration"
parent="menu_tax_report"
type="wizard"/> -->
<report id="account_account_balance_compare"
string="Account balance"
model="account.account"
@ -77,16 +63,5 @@
auto="False"
menu="False"/>
<!--
<report id="analytic_journal"
string="Analytic journal"
model="account.analytic.account"
name="account.analytic.journal"
xml="account/report/analytic_journal.rml"
auto="False" />
-->
</data>
</openerp>

View File

@ -104,7 +104,7 @@
<field name="special"/>
<separator colspan="4" string="States"/>
<field name="state" select="1"/>
<button name="action_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="action_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert" groups="account.group_account_manager"/>
</form>
</field>
</record>
@ -113,7 +113,7 @@
<field name="model">account.period</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="blue:state in ('draft');gray:state in ('done') " string="Period">
<tree colors="blue:state in ('draft');gray:state in ('done') " string="Period">
<field name="code"/>
<field name="name"/>
<field name="date_start"/>
@ -160,7 +160,6 @@
<group col="2" colspan="2">
<separator string="Reconcile" colspan="2"/>
<field name="reconcile"/>
<!-- <field name="active"/>-->
</group>
<separator string="Default Taxes" colspan="4"/>
<field colspan="4" name="tax_ids" nolabel="1" domain="[('parent_id','=',False)]"/>
@ -243,8 +242,8 @@
<field name="debit"/>
<field name="credit"/>
<field name="balance"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="company_currency_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="type"/>
</tree>
</field>
@ -256,7 +255,6 @@
<field name="view_id" ref="view_account_tree"/>
<field name="domain">[('parent_id','=',False)]</field>
</record>
<!-- <menuitem action="action_account_tree" id="menu_action_account_tree" parent="account.account_account_menu"/>-->
<!--
Journal
@ -273,9 +271,6 @@
<field colspan="4" name="name" select="1"/>
<field name="field" select="1"/>
<field name="sequence"/>
<!-- <newline/>-->
<!-- <field name="readonly"/>-->
<!-- <field name="required"/>-->
</form>
</field>
</record>
@ -287,8 +282,6 @@
<tree string="Journal Column">
<field name="sequence"/>
<field name="name"/>
<!-- <field name="required"/>-->
<!-- <field name="readonly"/>-->
</tree>
</field>
</record>
@ -394,7 +387,7 @@
</group>
<group colspan="2" col="2">
<separator string="Invoicing Data" colspan="4"/>
<field name="invoice_sequence_id"/>
<!-- <field name="invoice_sequence_id"/>-->
<field name="group_invoice_lines"/>
</group>
<group colspan="2" col="2" groups="base.group_extended">
@ -428,7 +421,7 @@
<search string="Search Bank Statements">
<group col="8" colspan="4">
<filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
<filter string="Confirm" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
<filter string="Confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
<separator orientation="vertical"/>
<field name="date"/>
<field name="name"/>
@ -472,9 +465,9 @@
<search string="Search Bank Statements">
<group col="8" colspan="4">
<filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
<filter string="Confirm" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
<filter string="Confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
<separator orientation="vertical"/>
<field name="journal_id" widget="selection"/>
<field name="journal_id" widget="selection"/>
<field name="date"/>
<field name="name"/>
</group>
@ -493,13 +486,18 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Bank Statement">
<group col="6" colspan="4">
<group col="7" colspan="4">
<field name="name" select="1"/>
<field name="date" select="1" on_change="onchange_date(date)"/>
<field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" select="1"/>
<newline/>
<field name="period_id"/>
<field name="balance_start"/>
<field name="balance_end_real"/>
<field name="currency" invisible="1"/>
<button name="%(action_view_account_statement_from_invoice_lines)d"
string="Import Invoices" type="action" icon="gtk-dnd"
attrs="{'invisible':[('state','=','confirm')]}"/>
</group>
<notebook colspan="4">
<page string="Transaction">
@ -522,6 +520,7 @@
<field name="type"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency)"/>
<field domain="[('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id"/>
<field name="analytic_account_id" groups="base.group_extended" />
<field name="amount"/>
<field context="{'partner_id':partner_id,'amount':amount,'account_id':account_id,'currency_id': parent.currency,'journal_id':parent.journal_id, 'date':date}" name="reconcile_id"/>
<field name="ref"/>
@ -538,10 +537,6 @@
<group col="8" colspan="4">
<field name="state"/>
<field name="balance_end"/>
<button name="%(action_view_account_statement_from_invoice_lines)d"
string="Import Invoice" type="action" icon="gtk-dnd" attrs="{'invisible':[('state','=','confirm')]}"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
<button name="button_confirm_bank" states="draft" string="Confirm" type="object" icon="terp-camera_test"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
@ -580,13 +575,6 @@
<field name="filter" eval="True"/>
</record>
<!-- <record id="action_bank_statement_tree2" model="ir.actions.act_window">-->
<!-- <field name="name">New Statement</field>-->
<!-- <field name="res_model">account.bank.statement</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">form,tree</field>-->
<!-- </record>-->
<record id="view_bank_statement_reconcile" model="ir.ui.view">
<field name="name">account.bank.statement.reconcile.form</field>
<field name="model">account.bank.statement.reconcile</field>
@ -610,11 +598,11 @@
<field name="name"/>
</tree>
</field>
<group col="5" colspan="4">
<group col="7" colspan="4">
<field name="total_entry"/>
<field name="total_new"/>
<field name="total_balance"/>
<button colspan="2" name="dummy" string="Compute" icon="terp-stock_format-scientific"/>
<button name="dummy" string="Compute" icon="terp-stock_format-scientific"/>
</group>
</form>
</field>
@ -665,7 +653,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_account_type_form" groups="base.group_extended,base.group_system" id="menu_action_account_type_form" parent="menu_low_level"/>
<menuitem action="action_account_type_form" groups="base.group_extended" id="menu_action_account_type_form" parent="menu_low_level"/>
<!--
Entries
-->
@ -723,9 +711,9 @@
<tree string="Account Tax Code" toolbar="1">
<field name="name"/>
<field name="code"/>
<field name="sum"/>
<field name="sum_period"/>
<field name="company_id"/>
<field name="sum"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
</record>
@ -870,12 +858,13 @@
<field name="view_id" ref="view_tax_code_tree"/>
<field name="help">Chart of Taxes is a tree view reflecting the structure of the Tax Cases (or tax codes) and shows the current tax situation. The tax chart represents the amount of each area of the tax declaration for your country. Its presented in a hierarchical structure, which can be modified to fit your needs.</field>
</record>
<!--
<menuitem
action="action_tax_code_tree"
id="menu_action_tax_code_tree"
parent="menu_finance_charts"
sequence="12"/>
<!-- <wizard id="action_move_journal_line_form" menu="False" model="account.move.line" name="account.move.journal" string="Entries by Line"/-->
sequence="12"/> --> <!-- move to wizard -->
<!--
Entries lines
@ -887,7 +876,7 @@
<field name="type">tree</field>
<field eval="4" name="priority"/>
<field name="arch" type="xml">
<tree colors="blue:state in ('draft');black:state in ('valid')" string="Account Entry Line" editable="top" on_write="on_create_write">
<tree colors="red:state in ('draft');black:state in ('valid')" string="Account Entry Line" editable="top" on_write="on_create_write">
<field name="date"/>
<field name="period_id"/>
<field name="move_id"/>
@ -900,12 +889,12 @@
<field name="debit" sum="Total debit"/>
<field name="credit" sum="Total credit"/>
<field name="account_tax_id" groups="base.group_extended"/>
<field name="analytic_account_id"/>
<field name="analytic_account_id" groups="base.group_extended" domain="[('parent_id','!=',False)]"/>
<field name="amount_currency" groups="base.group_extended"/>
<field name="currency_id" groups="base.group_extended"/>
<field name="state"/>
<field name="reconcile_id"/>
<field name="reconcile_partial_id" groups="base.group_extended"/>
<field name="reconcile_id"/>
<field name="state"/>
</tree>
</field>
</record>
@ -921,7 +910,7 @@
<field name="name" select="1"/>
<field name="ref"/>
<field name="partner_id" select="1" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="company_id" required="1" groups="base.group_multi_company"/>
@ -935,28 +924,28 @@
<field name="credit"/>
<field name="quantity"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Accounting Documents"/>
<field name="invoice"/>
<field name="invoice" readonly="True"/>
<field name="move_id" required="False"/>
<field name="statement_id"/>
<field name="statement_id" readonly="True"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Dates"/>
<field name="date" select="1"/>
<field name="date_maturity"/>
<field name="date_created"/>
<field name="date_created" readonly="True"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Taxes"/>
<field name="tax_code_id"/>
<field name="tax_amount"/>
<field name="account_tax_id" domain="[('parent_id','=',False)]"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Currency"/>
<field name="currency_id"/>
@ -974,16 +963,16 @@
<field name="state"/>
<field name="blocked"/>
</group>
<group col="2" colspan="2">
<group col="2" colspan="2" groups="base.group_extended">
<separator colspan="2" string="Analytic"/>
<field name="analytic_account_id"/>
<field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="base.group_extended"/>
</group>
<separator string="Narration" colspan="4"/>
<field name="narration" colspan="4" nolabel="1"/>
</page>
<page string="Analytic Lines">
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
<page string="Analytic Lines" groups="base.group_extended">
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}" groups="base.group_extended"/>
</page>
</notebook>
</form>
@ -1022,15 +1011,15 @@
<field name="blocked" select="3"/>
<newline/>
<field name="account_tax_id" domain="[('parent_id','=',False)]"/>
<field name="analytic_account_id"/>
<field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="base.group_extended"/>
<separator colspan="4" string="State"/>
<newline/>
<field name="reconcile_id"/>
<field name="reconcile_partial_id"/>
<field name="state"/>
</page>
<page string="Analytic Lines">
<field colspan="4" name="analytic_lines" nolabel="1"/>
<page string="Analytic Lines" groups="base.group_extended">
<field colspan="4" name="analytic_lines" nolabel="1" groups="base.group_extended"/>
</page>
</notebook>
</form>
@ -1048,8 +1037,8 @@
<field name="credit" operator="+"/>
</graph>
</field>
</record>
</record>
<record id="view_account_move_line_filter" model="ir.ui.view">
<field name="name">Entry Lines</field>
<field name="model">account.move.line</field>
@ -1057,39 +1046,72 @@
<field name="arch" type="xml">
<search string="Search Entry Lines">
<group col='10' colspan='4'>
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Entry Lines"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','valid')]" help="Posted Entry Lines"/>
<filter icon="terp-document-new" string="Unbalanced" domain="[('state','=','draft')]" help="Unbalanced Entry Lines"/>
<separator orientation="vertical"/>
<filter icon="terp-camera_test" string="Posted" domain="[('move_id.state','=','posted')]" help="Posted Entry Lines"/>
<filter icon="terp-stock_symbol-selection" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Entry Lines"/>
<filter icon="terp-stock_symbol-selection" string="Unreconciled" domain="[('reconcile_id','=',False), ('account_id.type','in',['receivable', 'payable'])]" help="Unreconciled Entry Lines"/>
<separator orientation="vertical"/>
<field name="ref" select="1" string="Reference"/>
<filter
icon="terp-dolar_ok!"
string="Unreconciled"
domain="[('reconcile_id','=',False), ('account_id.type','in',['receivable', 'payable'])]" help="Unreconciled Journal Items"
name="unreconciled"/>
<separator orientation="vertical"/>
<field name="move_id" select="1" string="Number (Move)"/>
<field name="name" select="1"/>
<field name="date" select='1'/>
<field name="account_id" select='1'/>
<field name="partner_id" select='1'>
<filter help="Next Partner Entries to reconcile" name="next_partner" string="Next Partner to reconcile" context="{'next_partner_only': 1}" icon="terp-partner" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>
<filter help="Next Partner Entries to reconcile" name="next_partner" string="Next Partner to reconcile" context="{'next_partner_only': 1}" icon="terp-gtk-jump-to-ltr" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>
</field>
</group>
<newline/>
<group col="10" colspan="4">
<field name="journal_id" required="1" widget="selection" context="{'journal_id':self, 'visible_id':self or 0, 'normal_view':False}"/>
<field name="period_id" required="1" widget="selection" context="{'period_id':self}"/>
<field name="journal_id" widget="selection" context="{'journal_id':self, 'visible_id':self or 0, 'normal_view':False}"/>
<field name="period_id" context="{'period_id':self, 'search_default_period_id':self}"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="12" col="10">
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Account" icon="terp-folder-orange" context="{'group_by':'account_id'}"/>
<separator orientation="vertical"/>
<filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
</group>
<newline/>
<group expand="0" string="Extended options...">
<field name="ref" select="1" string="Reference"/>
<field name="name" select="1"/>
<field name="narration" select="1"/>
<field name="date" select='1'/>
<field name="balance" string="Debit/Credit" select='1'/>
</group>
</search>
</field>
</record>
<record id="action_account_moves_all_a" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_account_move_line_filter"/>
</record>
<menuitem
action="action_account_moves_all_a"
icon="STOCK_JUSTIFY_FILL"
id="menu_action_account_moves_all"
parent="account.menu_finance_entries"
sequence="4"
groups="group_account_user,group_account_manager,base.group_system"
/>
<record id="action_move_line_select" model="ir.actions.act_window">
<field name="name">Entry Lines</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="search_view_id" ref="view_account_move_line_filter"/>
</record>
@ -1113,7 +1135,7 @@
<field name="search_view_id" ref="view_account_move_line_filter"/>
<field name="domain">[('account_id', 'child_of', active_id)]</field>
</record>
<record id="ir_account_move_line_select" model="ir.values">
<field name="key2">tree_but_open</field>
<field name="model">account.account</field>
@ -1181,7 +1203,7 @@
<field name="name" select="1"/>
<field name="ref"/>
<field name="partner_id" select="1" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="company_id" required="1" groups="base.group_multi_company"/>
@ -1195,7 +1217,7 @@
<field name="credit"/>
<field name="quantity"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Accounting Documents"/>
<field name="invoice"/>
@ -1209,14 +1231,14 @@
<field name="date_maturity"/>
<field name="date_created"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Taxes"/>
<field name="tax_code_id"/>
<field name="tax_amount"/>
<field name="account_tax_id" domain="[('parent_id','=',False)]"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Currency"/>
<field name="currency_id"/>
@ -1234,16 +1256,16 @@
<field name="state"/>
<field name="blocked"/>
</group>
<group col="2" colspan="2">
<group col="2" colspan="2" groups="base.group_extended">
<separator colspan="2" string="Analytic"/>
<field name="analytic_account_id"/>
<field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="base.group_extended"/>
</group>
<separator string="Narration" colspan="4"/>
<field name="narration" colspan="4" nolabel="1"/>
</page>
<page string="Analytic Lines">
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
<page string="Analytic Lines" groups="base.group_extended">
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}" groups="base.group_extended"/>
</page>
</notebook>
</form>
@ -1256,7 +1278,7 @@
<field name="date_maturity"/>
<field name="debit" sum="Total Debit"/>
<field name="credit" sum="Total Credit"/>
<field name="analytic_account_id"/>
<field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="base.group_extended"/>
<field name="amount_currency" groups="base.group_extended"/>
<field name="currency_id" groups="base.group_extended"/>
<field name="tax_code_id"/>
@ -1289,13 +1311,12 @@
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Entries"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Entries"/>
<separator orientation="vertical"/>
<filter icon="terp-stock_effects-object-colorize" string="To Review" domain="[('to_check','=',True)]" groups="base.group_extended" help="To Review"/>
<filter icon="terp-stock_zoom" string="To Review" domain="[('to_check','=',True)]" groups="base.group_extended" help="To Review"/>
<separator orientation="vertical"/>
<field name="ref" select="1"/>
<field name="name" select="1"/>
<field name="partner_id" select='1'/>
<field name="partner_id" select='1'/>
<field name="date" select='1'/>
<field name="narration" select="1"/>
</group>
<newline/>
<group col='8' colspan='4'>
@ -1348,58 +1369,9 @@
res_model="account.move.line"
src_model="account.move"/>
<!-- <record id="action_move_to_review" model="ir.actions.act_window">-->
<!-- <field name="name">Journal Entries</field>-->
<!-- <field name="type">ir.actions.act_window</field>-->
<!-- <field name="res_model">account.move</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_id" ref="view_move_tree"/>-->
<!-- <field name="search_view_id" ref="view_account_move_filter"/>-->
<!-- <field name="domain">[('to_check','=',True), ('state','=','draft')]</field>-->
<!-- </record>-->
<!-- <menuitem-->
<!-- action="action_move_to_review"-->
<!-- id="menu_action_move_to_review"-->
<!-- parent="periodical_processing_journal_entries_validation"-->
<!-- />-->
<!-- <menuitem id="next_id_29" name="Search Entries" parent="account.menu_finance_entries" sequence="40"/>-->
<!-- <menuitem action="action_move_line_form" id="menu_action_move_line_form" parent="next_id_29"/>-->
<!-- <record id="action_move_line_form_encode_by_move" model="ir.actions.act_window">
<field name="name">Journal Entries</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
</record>
<menuitem action="action_move_line_form_encode_by_move" id="menu_encode_entries_by_move" parent="menu_finance_entries"/>-->
<record id="action_account_moves_sale" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="search_view_id" ref="view_account_move_line_filter"/>
<field name="domain">[('journal_id.type', 'in', ['sale', 'purchase_refund'])]</field>
</record>
<menuitem action="action_account_moves_sale" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables"/>
<record id="action_account_moves_purchase" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="search_view_id" ref="view_account_move_line_filter"/>
<field name="domain">[('journal_id.type', 'in', ['purchase', 'sale_refund'])]</field>
</record>
<menuitem action="action_account_moves_purchase" id="menu_eaction_account_moves_purchase" parent="menu_finance_payables"/>
<record id="account.act_account_move_to_account_move_line_open" model="ir.actions.act_window">
<field eval="[(6,0,[ref('account.group_accounting_accountant')])]" name="groups_id"/>
</record>
<record id="action_move_line_search" model="ir.actions.act_window">
<field name="name">Entry Lines</field>
@ -1421,26 +1393,8 @@
<field name="view_mode">form</field>
<field name="act_window_id" ref="action_move_line_search"/>
</record>
<!-- <record id="action_move_line_search_view4" model="ir.actions.act_window">-->
<!-- <field name="name">Cheque Register</field>-->
<!-- <field name="type">ir.actions.act_window</field>-->
<!-- <field name="res_model">account.move.line</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form</field>-->
<!-- <field name="view_id" ref="view_move_line_tree"/>-->
<!-- <field name="search_view_id" ref="view_account_move_line_filter"/>-->
<!-- <field name="domain">[('journal_id.type', '=', 'bank')]</field>-->
<!-- </record>-->
<!-- -->
<!-- <menuitem action="action_move_line_search_view4" id="journal_bank_move_lines" parent="menu_finance_bank_and_cash"/>-->
<!-- <menuitem action="action_move_line_search" id="menu_action_move_line_search" parent="account.next_id_29"/>-->
<menuitem id="menu_finance_charts" name="Charts" parent="account.menu_finance" sequence="4"/>
<!-- <wizard id="wizard_account_chart" menu="False" model="account.account" name="account.chart" string="Chart of Accounts"/>
<menuitem icon="STOCK_INDENT" action="wizard_account_chart" id="menu_action_account_tree2" parent="account.menu_finance_charts" type="wizard"/>
-->
<record id="view_bank_statement_reconcile_form" model="ir.ui.view">
<field name="name">account.bank.statement.reconcile.form</field>
@ -1480,6 +1434,7 @@
<field name="type"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency)"/>
<field domain="[('journal_id', '=', parent.journal_id)]" name="account_id"/>
<field name="analytic_account_id" groups="base.group_extended" />
<field name="amount"/>
<field context="{'partner_id': partner_id, 'amount': amount, 'account_id': account_id, 'date':date}" name="reconcile_id"/>
</form>
@ -1503,25 +1458,12 @@
<field name="view_mode">form,tree</field>
<field name="view_id" ref="view_bank_statement_reconcile_form"/>
</record>
<!-- <menuitem
id="next_id_30"
name="Bank Reconciliation"
parent="menu_finance_periodical_processing"
groups="group_account_user"/> -->
<!-- <menuitem action="action_bank_statement_reconciliation_form" id="menu_action_account_bank_reconcile_tree" parent="next_id_30"/>-->
<!-- <wizard id="action_account_bank_reconcile_tree" menu="False" model="account.move.line" name="account.move.bank.reconcile" string="Bank reconciliation"/> -->
<!-- <menuitem action="action_account_bank_reconcile_tree" id="menu_action_account_bank_reconcile_check_tree" parent="account.next_id_30" type="wizard"/> -->
<!-- bank reconsilation -->
<menuitem action="action_account_bank_reconcile_tree"
id="menu_action_account_bank_reconcile_check_tree"
parent="periodical_processing_reconciliation" groups="group_account_user" />
<act_window
context="{'search_default_next_partner':1}"
context="{'search_default_next_partner':1,'view_mode':True}"
id="action_account_manual_reconcile" name="Entry Lines"
res_model="account.move.line"
view_id="view_move_line_tree"/>
/>
<menuitem
@ -1576,12 +1518,10 @@
<field name="view_type">tree</field>
<field name="help">You can look up individual account entries by searching for useful information. To search for account entries, open a journal, then select a record line.</field>
</record>
<menuitem action="action_account_journal_period_tree" id="menu_action_account_journal_period_tree" parent="account.menu_finance_generic_reporting" sequence="2"/>
<!--
# Account Models
-->
# Account Models
-->
<record id="view_model_line_tree" model="ir.ui.view">
<field name="name">account.model.line.tree</field>
@ -1633,6 +1573,7 @@
<field name="name" select="1"/>
<field name="ref" select="1"/>
<field name="journal_id" select="1"/>
<field name="company_id" select="1" widget='selection'/>
<field colspan="4" nolabel="1" name="lines_id" height="250" widget="one2many_list"/>
<separator string="Legend" colspan="4"/>
<field name="legend" colspan="4" nolabel="1"/>
@ -1650,6 +1591,7 @@
<tree string="Entry Model">
<field name="name"/>
<field name="journal_id"/>
<field name="company_id"/>
</tree>
</field>
</record>
@ -1659,7 +1601,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_model_form" id="menu_action_model_form" sequence="5" parent="account.menu_configuration_misc"/>
<menuitem action="action_model_form" id="menu_action_model_form" sequence="5" parent="account.menu_configuration_misc" groups="base.group_extended"/>
<!--
# Payment Terms
@ -1715,26 +1657,7 @@
</form>
</field>
</record>
<!-- <record id="view_account_move_line_filter" model="ir.ui.view">-->
<!-- <field name="name">Payment Terms</field>-->
<!-- <field name="model">account.payment.term</field>-->
<!-- <field name="type">search</field>-->
<!-- <field name="arch" type="xml">-->
<!-- <search string="Search Payment Terms">-->
<!-- <group col='10' colspan='4'>-->
<!-- <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Entry Lines"/>-->
<!-- <filter icon="terp-camera_test" string="Posted" domain="[('state','=','valid')]" help="Posted Entry Lines"/>-->
<!-- <separator orientation="vertical"/>-->
<!-- <field name="date" select='1'/>-->
<!-- <field name="account_id" select='1'/>-->
<!-- <field name="partner_id" select='1'>-->
<!-- <filter help="Next Partner Entries to reconcile" name="next_partner" string="Next Partner to reconcile" context="{'next_partner_only': 1}" icon="terp-partner" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>-->
<!-- </field>-->
<!-- <field name="balance" string="Debit/Credit" select='1'/>-->
<!-- </group>-->
<!-- </search>-->
<!-- </field>-->
<!-- </record>-->
<record id="action_payment_term_form" model="ir.actions.act_window">
<field name="name">Payment Terms</field>
<field name="res_model">account.payment.term</field>
@ -1744,8 +1667,8 @@
<menuitem action="action_payment_term_form" id="menu_action_payment_term_form" parent="menu_configuration_misc"/>
<!--
# Account Subscriptions
-->
# Account Subscriptions
-->
<record id="view_subscription_line_form" model="ir.ui.view">
<field name="name">account.subscription.line.form</field>
@ -1799,15 +1722,14 @@
<separator colspan="4" string="Starts on"/>
<field name="date_start" select="1"/>
<field name="period_total"/>
</group>
<group col="2" colspan="2">
<separator colspan="4" string="Valid Up to"/>
<field name="period_nbr"/>
<field name="period_type"/>
</group>
<group col="2" colspan="2">
</group>
<separator colspan="4" string="Subscription Lines"/>
@ -1828,7 +1750,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_subscription_form" id="menu_action_subscription_form" sequence="5" parent="account.menu_configuration_misc"/>
<menuitem name="Define Recurring Entries" action="action_subscription_form" id="menu_action_subscription_form" sequence="1" parent="account.menu_finance_recurrent_entries"/>
<record id="action_subscription_form_running" model="ir.actions.act_window">
<field name="name">Running Subscriptions</field>
@ -1869,15 +1791,6 @@
<field name="domain">[('account_id','child_of', [active_id]),('state','&lt;&gt;','draft')]</field>
<field name="context">{'account_id':active_id}</field>
</record>
<!-- <wizard id="wizard_move_line_select" menu="False" model="account.move.line" name="account.move.line.select" string="Move line select"/>-->
<!-- <record id="ir_open_account_account" model="ir.values">-->
<!-- <field eval="'tree_but_open'" name="key2"/>-->
<!-- <field eval="'account.account'" name="model"/>-->
<!-- <field name="name">Account Entries</field>-->
<!-- <field eval="'ir.actions.wizard,%d'%wizard_move_line_select" name="value"/>-->
<!-- <field eval="True" name="object"/>-->
<!-- </record>-->
<record id="view_move_line_tax_tree" model="ir.ui.view">
<field name="name">account.move.line.tax.tree</field>
@ -1885,7 +1798,7 @@
<field name="type">tree</field>
<field eval="4" name="priority"/>
<field name="arch" type="xml">
<tree colors="blue:state in ('draft');black:state in ('valid')" string="Account Entry Line">
<tree colors="red:state in ('draft');black:state in ('valid')" string="Account Entry Line">
<field name="date"/>
<field name="move_id"/>
<field name="statement_id" string="St."/>
@ -1897,7 +1810,7 @@
<field name="debit" sum="Total debit"/>
<field name="credit" sum="Total credit"/>
<field name="account_tax_id"/>
<field name="analytic_account_id"/>
<field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="base.group_extended"/>
<field name="state"/>
</tree>
</field>
@ -1928,9 +1841,9 @@
<act_window domain="[('journal_id', '=', active_id)]" id="act_account_journal_2_account_move_line" name="Journal Items" res_model="account.move.line" src_model="account.journal"/>
<act_window context="{'search_default_reconcile_id':False}" domain="[('partner_id', '=', active_id),('reconcile_id','=',False),('account_id.reconcile', '=', True),('account_id.type', 'in', ['receivable', 'payable'])]" id="act_account_partner_account_move_all" name="Receivables &amp; Payables" res_model="account.move.line" src_model="res.partner"/>
<act_window context="{'search_default_reconcile_id':False, 'search_default_partner_id':[active_id]}" domain="[('account_id.reconcile', '=', True),('account_id.type', 'in', ['receivable', 'payable'])]" id="act_account_partner_account_move_all" name="Receivables &amp; Payables" res_model="account.move.line" src_model="res.partner"/>
<act_window domain="[('partner_id', '=', active_id)]" id="act_account_partner_account_move" name="Journal Items" res_model="account.move.line" src_model="res.partner"/>
<act_window context="{'search_default_partner_id':[active_id]}" id="act_account_partner_account_move" name="Journal Items" res_model="account.move.line" src_model="res.partner"/>
<record id="view_account_addtmpl_wizard_form" model="ir.ui.view">
<field name="name">Create Account</field>
@ -2075,6 +1988,7 @@
<field name="property_account_income_categ"/>
<field name="property_account_expense"/>
<field name="property_account_income"/>
<field name="property_reserve_and_surplus_account"/>
</group>
</form>
</field>
@ -2128,7 +2042,7 @@
<field name="view_mode">tree,form,search</field>
</record>
<menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_accounts"/>
<menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_accounts" sequence="1"/>
<!-- Account Tax Templates -->
@ -2312,8 +2226,7 @@
<attribute name='string'></attribute>
</xpath>
<group string="res_config_contents" position="replace">
<field name="company_id" widget="selection"
/>
<field name="company_id" widget="selection"/>
<field name ="code_digits" />
<field name="chart_template_id"/>
<field name ="seq_journal" />
@ -2345,7 +2258,7 @@
<field name="target">new</field>
</record>
<menuitem parent="account.account_template_folder" action="action_wizard_multi_chart" id="menu_wizard"/>
<menuitem name="New Company Financial Setting" parent="account.account_template_folder" action="account.action_account_configuration_installer" id="menu_wizard"/>
<record id="account_account_graph" model="ir.ui.view">
<field name="name">account.account.graph</field>
@ -2414,24 +2327,7 @@
<menuitem
action="action_account_fiscal_position_template_form"
id="menu_action_account_fiscal_position_form_template"
parent="account_template_folder" sequence="20"/>
<record id="action_account_moves_all" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="search_view_id" ref="view_account_move_line_filter"/>
</record>
<menuitem
action="action_account_moves_all"
icon="STOCK_JUSTIFY_FILL"
id="menu_eaction_account_moves_all"
parent="account.menu_finance_entries"
sequence="4"
/>
parent="account_template_taxes" sequence="20"/>
<!-- Cash Statement -->
<record id="view_cash_statement_tree" model="ir.ui.view">
@ -2467,6 +2363,7 @@
<field name="journal_id" on_change="onchange_journal_id(journal_id)" domain="[('type','=','cash')]" select="1" />
<field name="user_id" select="1" readonly="1"/>
<field name="period_id" select="1"/>
<field name="currency" invisible="1"/>
</group>
<notebook colspan="4">
@ -2490,6 +2387,7 @@
<field name="type"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency)"/>
<field domain="[('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id"/>
<field name="analytic_account_id" groups="base.group_extended" />
<field name="amount"/>
<field context="{'partner_id':partner_id,'amount':amount,'account_id':account_id,'currency_id': parent.currency,'journal_id':parent.journal_id, 'date':date}" name="reconcile_id"/>
<field name="ref"/>

View File

@ -1,104 +1,7 @@
<?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 id="wizard_invoice_refund" model="account.invoice" name="account.invoice.refund" string="Credit Note" groups="base.group_user"/> -->
<!-- <wizard id="wizard_invoice_refund" model="account.invoice" name="account.invoice.refund" string="Credit Note" groups="base.group_user"/>-->
<!-- for test only -->
<!-- wizard id="wizard_invoice_pay" model="account.invoice" name="account.invoice.pay" string="Pay invoice" groups="base.group_user"/-->
<!-- close year, period, journal -->
<!-- <wizard id="wizard_fiscalyear_close" menu="False" model="account.fiscalyear" name="account.fiscalyear.close" string="Generate Fiscal Year Opening Entries"/>-->
<!---->
<!-- <menuitem-->
<!-- action="wizard_fiscalyear_close"-->
<!-- id="menu_wizard_fy_close"-->
<!-- parent="menu_account_end_year_treatments"-->
<!-- type="wizard"-->
<!-- sequence="1"/>-->
<!-- <wizard id="wizard_fiscalyear_close_state" menu="False" model="account.fiscalyear" name="account.fiscalyear.close.state" string="Close a Fiscal Year"/>
<menuitem action="wizard_fiscalyear_close_state" id="menu_wizard_fy_close_state" parent="menu_account_end_year_treatments" type="wizard"/>
-->
<!-- automatic reconcile -->
<!-- <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"/>-->
<!-- Import entry in statement -->
<!-- <wizard-->
<!-- string="Import invoices"-->
<!-- model="account.bank.statement"-->
<!-- name="populate_statement_from_inv"-->
<!-- menu="False"-->
<!-- id="wizard_populate_statement_from_inv"/>-->
<!-- manual reconcile -->
<!-- <wizard id="wizard_reconcile" model="account.move.line" name="account.move.line.reconcile" string="Reconcile Entries"/>-->
<!-- <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"/> -->
<!-- unreconcile -->
<!-- <wizard id="wizard_unreconcile" model="account.move.line" name="account.move.line.unreconcile" string="Unreconcile Entries"/>-->
<!-- <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 -->
<!--
<wizard id="wizard_generate_subscription" menu="False" model="account.subscription" name="account.subscription.generate" string="Create subscription entries"/>
<menuitem action="wizard_generate_subscription" id="menu_generate_subscription" parent="account.menu_finance_periodical_processing" type="wizard"/>
-->
<!-- Aged partner balance -->
<!-- <wizard id="wizard_aged_trial_balance" menu="False" model="res.partner" name="account.aged.trial.balance" string="Aged Partner Balance"/>
<menuitem icon="STOCK_PRINT" action="wizard_aged_trial_balance" id="menu_aged_trial_balance" parent="next_id_22" type="wizard"/>-->
<!-- 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"/>
<!-- <wizard id="wizard_invoice_state_confirm" keyword="client_action_multi" model="account.invoice" multi="True" name="account.invoice.state.confirm" string="Confirm draft invoices" groups="base.group_user"/>-->
<!-- <wizard id="wizard_invoice_state_cancel" keyword="client_action_multi" model="account.invoice" multi="True" name="account.invoice.state.cancel" string="Cancel selected invoices" groups="base.group_user"/>-->
<!---->
<!-- account.move validate -->
<!-- <wizard id="wizard_validate_account_moves" menu="False" model="account.move" name="account.move.validate" string="Validate Ledger Postings"/>
<menuitem action="wizard_validate_account_moves" id="menu_validate_account_moves" parent="account.menu_finance_periodical_processing" type="wizard"/>
<wizard id="wizard_validate_account_moves_line" menu="True" model="account.move.line" name="account.move_line.validate" string="Validate Ledger Postings"/>-->
<!-- 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 -->
<!-- <wizard string="Open State" model="account.invoice" name="account.wizard_paid_open" menu="False" id="wizard_paid_open" groups="base.group_user"/> -->
<!-- <wizard id="wizard_invoice_currency_change" model="account.invoice" name="account.invoice.currency_change" string="Change Currency" groups="base.group_user"/>-->
</data>
</openerp>

View File

@ -2,16 +2,9 @@
<openerp>
<data noupdate="1">
<!--
Administrator shortcut
Demo user startup menu
Administrator shortcut
Demo user startup menu
-->
<!-- <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 id="base.user_root" model="res.users">
<field name="action_id" ref="open_board_account"/>
</record>

View File

@ -49,7 +49,8 @@
<field name="view_id" ref="board_account_form"/>
</record>
<menuitem id="menu_dashboard_acc" name="Dashboard" sequence="2" parent="account.menu_finance_reporting"/>
<menuitem id="menu_dashboard_acc" name="Dashboard" sequence="2" parent="account.menu_finance_reporting" groups="group_account_user,group_account_manager,base.group_system"/>
<menuitem action="open_board_account" icon="terp-graph" id="menu_board_account" parent="menu_dashboard_acc" sequence="1"/>
<menuitem icon="terp-account" id="account.menu_finance" name="Accounting" sequence="13" action="open_board_account"/>
</data>
</openerp>

View File

@ -25,6 +25,15 @@ class res_company(osv.osv):
_inherit = "res.company"
_columns = {
'overdue_msg' : fields.text('Overdue Payments Message', translate=True),
'property_reserve_and_surplus_account': fields.property(
'account.account',
type='many2one',
relation='account.account',
string="Reserve and Surplus Account",
method=True,
view_load=True,
domain="[('type', '=', 'payable')]",
help="This Account is used for transferring Profit/Loss(If It is Profit : Amount will be added, Loss : Amount will be deducted.), Which is calculated from Profit & Loss Report"),
}
_defaults = {

View File

@ -7,13 +7,29 @@
<field name="model">res.company</field>
<field name="type">form</field>
<field name="arch" type="xml">
<notebook>
<page string="Overdue Payments" position="inside">
<separator string="Overdue Payments Message" colspan="4"/>
<field name="overdue_msg" nolabel="1" colspan ="4"/>
</page>
</notebook>
<notebook>
<page string="Overdue Payments" position="inside">
<separator string="Overdue Payments Message" colspan="4"/>
<field name="overdue_msg" nolabel="1" colspan ="4"/>
</page>
</notebook>
</field>
</record>
<record model="ir.ui.view" id="view_company_inherit_1_form">
<field name="name">res.company.form.inherit</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="model">res.company</field>
<field name="type">form</field>
<field name="arch" type="xml">
<page string="Configuration" position="inside">
<group col="2" colspan="2">
<separator string="Reserve And Surplus Account" colspan="2"/>
<field name="property_reserve_and_surplus_account" colspan="2"/>
</group>
</page>
</field>
</record>
</data>
</openerp>

View File

@ -1,17 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Types -->
<record model="account.account.type" id="conf_account_type_receivable" >
<!-- Types -->
<record model="account.account.type" id="conf_account_type_receivable" >
<field name="name">Receivable</field>
<field name="code">receivable</field>
<field name="report_type">income</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="report_type">expense</field>
<field name="close_method">unreconciled</field>
</record>
@ -21,65 +22,101 @@
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_income_view1">
<field name="name">Income View</field>
<field name="code">view</field>
<field name="report_type">income</field>
</record>
<record model="account.account.type" id="account_type_expense_view1">
<field name="name">Expense View</field>
<field name="code">expense</field>
<field name="report_type">expense</field>
</record>
<record model="account.account.type" id="account_type_asset_view1">
<field name="name">Asset View</field>
<field name="code">asset</field>
<field name="report_type">asset</field>
</record>
<record model="account.account.type" id="account_type_liability_view1">
<field name="name">Liability View</field>
<field name="code">liability</field>
<field name="report_type">liability</field>
</record>
<record model="account.account.type" id="conf_account_type_income" >
<field name="name">Income</field>
<field name="code">income</field>
<field name="report_type">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="report_type">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="report_type">expense</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="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="conf_account_type_liability">
<field name="name">Liability</field>
<field name="code">liability</field>
<field name="report_type">liability</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="report_type">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="report_type">asset</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="report_type">asset</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="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<!-- Account Templates-->
<record id="conf_chart0" model="account.account.template">
<field name="code">0</field>
<field name="name">Configurable Account Chart</field>
<field eval="0" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_view"/>
</record>
<!-- Account Templates-->
<record id="conf_chart0" model="account.account.template">
<field name="code">0</field>
<field name="name">Configurable Account Chart</field>
<field eval="0" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_view"/>
</record>
<!-- Balance Sheet -->
<!-- Balance Sheet -->
<record id="conf_bal" model="account.account.template">
<field name="code">1</field>
@ -88,113 +125,107 @@
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_view"/>
</record>
<record id="conf_fas" model="account.account.template">
<field name="code">10</field>
<field name="name">Fixed Assets</field>
<field ref="conf_bal" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_view"/>
</record>
<record id="conf_xfa" model="account.account.template">
<field name="code">100</field>
<field name="name">Fixed Asset Account</field>
<field ref="conf_fas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_nca" model="account.account.template">
<field name="code">11</field>
<field name="name">Net Current Assets</field>
<field ref="conf_bal" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_view"/>
</record>
<record id="conf_cas" model="account.account.template">
<field name="code">110</field>
<field name="name">Current Assets</field>
<field ref="conf_nca" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_view"/>
</record>
<record id="conf_stk" model="account.account.template">
<field name="code">1101</field>
<field name="name">Purchased Stocks</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_a_recv" model="account.account.template">
<field name="code">1102</field>
<field name="name">Debtors</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">receivable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_receivable"/>
</record>
<!-- <record id="account.property_account_receivable" model="ir.property">
<field eval="'account.account,'+str(a_recv)" name="value"/>
</record> -->
<record id="conf_ova" model="account.account.template">
<field name="code">1103</field>
<field name="name">Output VAT</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_tax"/>
</record>
<record id="conf_bnk" model="account.account.template">
<field name="code">1104</field>
<field name="name">Bank Current Account</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_cash"/>
</record>
<record id="conf_cash" model="account.account.template">
<field name="code">1105</field>
<field name="name">Cash</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_cash"/>
</record>
<record id="conf_cli" model="account.account.template">
<field name="code">111</field>
<field name="name">Current Liabilities</field>
<field ref="conf_nca" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_view"/>
</record>
<record id="conf_a_pay" model="account.account.template">
<field name="code">1111</field>
<field name="name">Creditors</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">payable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_payable"/>
</record>
<!-- <record id="account.property_account_payable" model="ir.property">
<field eval="'account.account,'+str(a_pay)" name="value"/>
</record>-->
<record id="conf_iva" model="account.account.template">
<field name="code">1112</field>
<field name="name">Input VAT</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_tax"/>
</record>
<record id="conf_fas" model="account.account.template">
<field name="code">10</field>
<field name="name">Fixed Assets</field>
<field ref="conf_bal" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_xfa" model="account.account.template">
<field name="code">100</field>
<field name="name">Fixed Asset Account</field>
<field ref="conf_fas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_nca" model="account.account.template">
<field name="code">11</field>
<field name="name">Net Current Assets</field>
<field ref="conf_bal" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_cas" model="account.account.template">
<field name="code">110</field>
<field name="name">Current Assets</field>
<field ref="conf_nca" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_asset_view1"/>
</record>
<record id="conf_stk" model="account.account.template">
<field name="code">1101</field>
<field name="name">Purchased Stocks</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_a_recv" model="account.account.template">
<field name="code">1102</field>
<field name="name">Debtors</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">receivable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_ova" model="account.account.template">
<field name="code">1103</field>
<field name="name">Output VAT</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_asset"/>
</record>
<record id="conf_bnk" model="account.account.template">
<field name="code">1104</field>
<field name="name">Bank Current Account</field>
<field ref="conf_cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_bnk"/>
</record>
<record id="conf_cli" model="account.account.template">
<field name="code">111</field>
<field name="name">Current Liabilities</field>
<field ref="conf_nca" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_liability_view1"/>
</record>
<record id="conf_a_pay" model="account.account.template">
<field name="code">1111</field>
<field name="name">Creditors</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">payable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_liability"/>
</record>
<record id="conf_iva" model="account.account.template">
<field name="code">1112</field>
<field name="name">Input VAT</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_liability"/>
</record>
<record id="conf_a_reserve_and_surplus" model="account.account.template">
<field name="code">1113</field>
<field name="name">Reserve and Surplus Account</field>
<field ref="conf_cli" name="parent_id"/>
<field name="type">payable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="conf_account_type_liability"/>
</record>
<!-- Profit and Loss -->
<record id="conf_gpf" model="account.account.template">
@ -205,312 +236,366 @@
<field name="user_type" ref="conf_account_type_view"/>
</record>
<record id="conf_rev" model="account.account.template">
<field name="code">20</field>
<field name="name">Revenue</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_view"/>
</record>
<record id="conf_rev" model="account.account.template">
<field name="code">20</field>
<field name="name">Revenue</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_income_view1"/>
</record>
<record id="conf_a_sale" model="account.account.template">
<field name="code">200</field>
<field name="name">Product Sales</field>
<field ref="conf_rev" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_income"/>
</record>
<record id="conf_cos" model="account.account.template">
<field name="code">21</field>
<field name="name">Cost of Sales</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_income_view1"/>
</record>
<record id="conf_cog" model="account.account.template">
<field name="code">210</field>
<field name="name">Cost of Goods Sold</field>
<field ref="conf_cos" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<record id="conf_ovr" model="account.account.template">
<field name="code">22</field>
<field name="name">Overheads</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="account_type_expense_view1"/>
</record>
<record id="conf_a_expense" model="account.account.template">
<field name="code">220</field>
<field name="name">Expenses</field>
<field ref="conf_ovr" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<record id="conf_a_sale" model="account.account.template">
<field name="code">200</field>
<field name="name">Product Sales</field>
<field ref="conf_rev" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_income"/>
</record>
<!-- <record id="account.property_account_income_categ" model="ir.property">
<field eval="'account.account,'+str(a_sale)" name="value"/>
</record> -->
<record id="conf_cos" model="account.account.template">
<field name="code">21</field>
<field name="name">Cost of Sales</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_view"/>
</record>
<record id="conf_cog" model="account.account.template">
<field name="code">210</field>
<field name="name">Cost of Goods Sold</field>
<field ref="conf_cos" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<record id="conf_ovr" model="account.account.template">
<field name="code">22</field>
<field name="name">Overheads</field>
<field ref="conf_gpf" name="parent_id"/>
<field name="type">view</field>
<field name="user_type" ref="conf_account_type_view"/>
</record>
<record id="conf_a_expense" model="account.account.template">
<field name="code">220</field>
<field name="name">Expenses</field>
<field ref="conf_ovr" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<!-- <record id="account.property_account_expense_categ" model="ir.property">
<field eval="'account.account,'+str(a_expense)" name="value"/>
</record> -->
<record id="conf_a_salary_expense" model="account.account.template">
<field name="code">221</field>
<field name="name">Salary Expenses</field>
<field ref="conf_ovr" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="conf_account_type_expense"/>
</record>
<!-- Taxes -->
<!-- VAT Code Definitions -->
<!-- TAX Code Definitions -->
<!-- Invoiced VAT -->
<!-- Invoiced TAX -->
<!-- Input VAT -->
<record id="vat_code_chart_root" model="account.tax.code.template">
<record id="tax_code_chart_root" model="account.tax.code.template">
<field name="name">Plan Fees </field>
</record>
<record id="vat_code_balance_net" model="account.tax.code.template">
<field name="name">VAT Balance to Pay</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
<record id="tax_code_balance_net" model="account.tax.code.template">
<field name="name">Tax Balance to Pay</field>
<field name="parent_id" ref="tax_code_chart_root"/>
</record>
<record id="vat_code_input" model="account.tax.code.template">
<field name="name">Input VAT</field>
<field name="parent_id" ref="vat_code_balance_net"/>
<field eval="-1" name="sign"/>
</record>
<!-- Input TAX -->
<record id="tax_code_input" model="account.tax.code.template">
<field name="name">Input TAX</field>
<field name="parent_id" ref="tax_code_balance_net"/>
<field eval="-1" name="sign"/>
</record>
<record id="vat_code_input_S" model="account.tax.code.template">
<field name="name">Input VAT Rate S (15%)</field>
<field name="parent_id" ref="vat_code_input"/>
</record>
<record id="tax_code_input_S" model="account.tax.code.template">
<field name="name">Input TAX Rate S (15%)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_R" model="account.tax.code.template">
<field name="name">Input TAX Rate R (5%)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="vat_code_input_R" model="account.tax.code.template">
<field name="name">Input VAT Rate R (5%)</field>
<field name="parent_id" ref="vat_code_input"/>
</record>
<record id="tax_code_input_X" model="account.tax.code.template">
<field name="name">Input TAX Rate X (Exempt)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<record id="tax_code_input_O" model="account.tax.code.template">
<field name="name">Input TAX Rate O (Out of scope)</field>
<field name="parent_id" ref="tax_code_input"/>
</record>
<!-- Output VAT -->
<!-- Output TAX -->
<record id="tax_code_output" model="account.tax.code.template">
<field name="name">Output TAX</field>
<field name="parent_id" ref="tax_code_balance_net"/>
</record>
<record id="vat_code_output" model="account.tax.code.template">
<field name="name">Output VAT</field>
<field name="parent_id" ref="vat_code_balance_net"/>
</record>
<record id="tax_code_output_S" model="account.tax.code.template">
<field name="name">Output TAX Rate S (15%)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_R" model="account.tax.code.template">
<field name="name">Output TAX Rate R (5%)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="vat_code_output_S" model="account.tax.code.template">
<field name="name">Output VAT Rate S (15%)</field>
<field name="parent_id" ref="vat_code_output"/>
</record>
<record id="tax_code_output_X" model="account.tax.code.template">
<field name="name">Output TAX Rate X (Exempt)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="tax_code_output_O" model="account.tax.code.template">
<field name="name">Output TAX Rate O (Out of scope)</field>
<field name="parent_id" ref="tax_code_output"/>
</record>
<record id="vat_code_output_R" model="account.tax.code.template">
<field name="name">Output VAT Rate R (5%)</field>
<field name="parent_id" ref="vat_code_output"/>
</record>
<!-- Invoiced Base of VAT -->
<!-- Invoiced Base of TAX -->
<!-- Purchases -->
<record id="tax_code_base_net" model="account.tax.code.template">
<field name="name">Tax Bases</field>
<field name="parent_id" ref="tax_code_chart_root"/>
</record>
<!-- Purchases -->
<record id="tax_code_base_purchases" model="account.tax.code.template">
<field name="name">Taxable Purchases Base</field>
<field name="parent_id" ref="tax_code_base_net"/>
</record>
<record id="vat_code_base_net" model="account.tax.code.template">
<field name="name">Tax Bases</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
<record id="tax_code_purch_S" model="account.tax.code.template">
<field name="name">Taxable Purchases Rated S (15%)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_R" model="account.tax.code.template">
<field name="name">Taxable Purchases Rated R (5%)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="vat_code_base_purchases" model="account.tax.code.template">
<field name="name">Taxable Purchases Base</field>
<field name="parent_id" ref="vat_code_base_net"/>
</record>
<record id="tax_code_purch_X" model="account.tax.code.template">
<field name="name">Taxable Purchases Type X (Exempt)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="tax_code_purch_O" model="account.tax.code.template">
<field name="name">Taxable Purchases Type O (Out of scope)</field>
<field name="parent_id" ref="tax_code_base_purchases"/>
</record>
<record id="vat_code_purch_S" model="account.tax.code.template">
<field name="name">Taxable Purchases Rated S (15%)</field>
<field name="parent_id" ref="vat_code_base_purchases"/>
</record>
<record id="vat_code_purch_R" model="account.tax.code.template">
<field name="name">Taxable Purchases Rated R (5%)</field>
<field name="parent_id" ref="vat_code_base_purchases"/>
</record>
<record id="vat_code_purch_Z" model="account.tax.code.template">
<field name="name">Taxable Purchases Rated Z (0%)</field>
<field name="parent_id" ref="vat_code_base_purchases"/>
</record>
<record id="vat_code_purch_X" model="account.tax.code.template">
<field name="name">Taxable Purchases Type X (Exempt)</field>
<field name="parent_id" ref="vat_code_base_purchases"/>
</record>
<record id="vat_code_purch_O" model="account.tax.code.template">
<field name="name">Taxable Purchases Type O (Out of scope)</field>
<field name="parent_id" ref="vat_code_base_purchases"/>
</record>
<!-- Sales -->
<record id="vat_code_base_sales" model="account.tax.code.template">
<field name="name">Base of Taxable Sales</field>
<field name="parent_id" ref="vat_code_base_net"/>
</record>
<record id="vat_code_sales_S" model="account.tax.code.template">
<field name="name">Taxable Sales Rated S (15%)</field>
<field name="parent_id" ref="vat_code_base_sales"/>
</record>
<record id="vat_code_sales_R" model="account.tax.code.template">
<field name="name">Taxable Sales Rated R (5%)</field>
<field name="parent_id" ref="vat_code_base_sales"/>
</record>
<record id="vat_code_sales_Z" model="account.tax.code.template">
<field name="name">Taxable Sales Rated Z (0%)</field>
<field name="parent_id" ref="vat_code_base_sales"/>
</record>
<record id="vat_code_sales_X" model="account.tax.code.template">
<field name="name">Taxable Sales Type X (Exempt)</field>
<field name="parent_id" ref="vat_code_base_sales"/>
</record>
<record id="vat_code_sales_O" model="account.tax.code.template">
<field name="name">Taxable Sales Type O (Out of scope)</field>
<field name="parent_id" ref="vat_code_base_sales"/>
</record>
<!-- Sales -->
<record id="tax_code_base_sales" model="account.tax.code.template">
<field name="name">Base of Taxable Sales</field>
<field name="parent_id" ref="tax_code_base_net"/>
</record>
<record id="tax_code_sales_S" model="account.tax.code.template">
<field name="name">Taxable Sales Rated S (15%)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_R" model="account.tax.code.template">
<field name="name">Taxable Sales Rated R (5%)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_X" model="account.tax.code.template">
<field name="name">Taxable Sales Type X (Exempt)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="tax_code_sales_O" model="account.tax.code.template">
<field name="name">Taxable Sales Type O (Out of scope)</field>
<field name="parent_id" ref="tax_code_base_sales"/>
</record>
<record id="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="tax_code_root_id" ref="tax_code_chart_root"/>
<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"/>
<field name="property_reserve_and_surplus_account" ref="conf_a_reserve_and_surplus"/>
</record>
<!-- VAT Codes -->
<!-- Purchases + Input VAT -->
<!-- VAT Codes -->
<!-- Purchases + Output VAT -->
<record id="ivats" model="account.tax.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>
<field name="account_collected_id" ref="conf_iva"/>
<field name="account_paid_id" ref="conf_iva"/>
<field name="base_code_id" ref="vat_code_purch_S"/>
<field name="tax_code_id" ref="vat_code_input_S"/>
<field name="ref_base_code_id" ref="vat_code_purch_S"/>
<field name="ref_tax_code_id" ref="vat_code_input_S"/>
<field name="type_tax_use">purchase</field>
</record>
<record id="ivatr" model="account.tax.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>
<field name="account_collected_id" ref="conf_iva"/>
<field name="account_paid_id" ref="conf_iva"/>
<field name="base_code_id" ref="vat_code_purch_R"/>
<field name="tax_code_id" ref="vat_code_input_R"/>
<field name="ref_base_code_id" ref="vat_code_purch_R"/>
<field name="ref_tax_code_id" ref="vat_code_input_R"/>
<field name="type_tax_use">purchase</field>
</record>
<record id="ivatz" model="account.tax.template">
<record id="otaxs" model="account.tax.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>
<field name="base_code_id" ref="vat_code_purch_Z"/>
<field name="ref_base_code_id" ref="vat_code_purch_Z"/>
<field name="type_tax_use">purchase</field>
</record>
<record id="ivatx" model="account.tax.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>
<field name="base_code_id" ref="vat_code_purch_X"/>
<field name="ref_base_code_id" ref="vat_code_purch_X"/>
<field name="type_tax_use">purchase</field>
</record>
<record id="ivato" model="account.tax.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>
<field name="base_code_id" ref="vat_code_purch_O"/>
<field name="ref_base_code_id" ref="vat_code_purch_O"/>
<field name="type_tax_use">purchase</field>
</record>
<!-- Sales + Output VAT -->
<record id="ovats" model="account.tax.template">
<field name="chart_template_id" ref="configurable_chart_template"/>
<field name="name">OVAT S</field>
<field name="name">OTAX S</field>
<field eval="0.15" name="amount"/>
<field name="type">percent</field>
<field name="account_collected_id" ref="conf_ova"/>
<field name="account_paid_id" ref="conf_ova"/>
<field name="base_code_id" ref="vat_code_sales_S"/>
<field name="tax_code_id" ref="vat_code_output_S"/>
<field name="ref_base_code_id" ref="vat_code_sales_S"/>
<field name="ref_tax_code_id" ref="vat_code_output_S"/>
<field name="type_tax_use">sale</field>
<field name="base_code_id" ref="tax_code_purch_S"/>
<field name="tax_code_id" ref="tax_code_output_S"/>
<field name="ref_base_code_id" ref="tax_code_purch_S"/>
<field name="ref_tax_code_id" ref="tax_code_output_S"/>
<field name="type_tax_use">purchase</field>
</record>
<record id="ovatr" model="account.tax.template">
<record id="otaxr" model="account.tax.template">
<field name="chart_template_id" ref="configurable_chart_template"/>
<field name="name">OVAT R</field>
<field eval="0.005" name="amount"/>
<field name="name">OTAX R</field>
<field eval="0.05" name="amount"/>
<field name="type">percent</field>
<field name="account_collected_id" ref="conf_ova"/>
<field name="account_paid_id" ref="conf_ova"/>
<field name="base_code_id" ref="vat_code_sales_R"/>
<field name="tax_code_id" ref="vat_code_output_R"/>
<field name="ref_base_code_id" ref="vat_code_sales_R"/>
<field name="ref_tax_code_id" ref="vat_code_output_R"/>
<field name="base_code_id" ref="tax_code_purch_R"/>
<field name="tax_code_id" ref="tax_code_output_R"/>
<field name="ref_base_code_id" ref="tax_code_purch_R"/>
<field name="ref_tax_code_id" ref="tax_code_output_R"/>
<field name="type_tax_use">purchase</field>
</record>
<record id="otaxx" model="account.tax.template">
<field name="chart_template_id" ref="configurable_chart_template"/>
<field name="name">OTAX X</field>
<field eval="0.0" name="amount"/>
<field name="type">percent</field>
<field name="account_collected_id" ref="conf_ova"/>
<field name="account_paid_id" ref="conf_ova"/>
<field name="base_code_id" ref="tax_code_purch_X"/>
<field name="tax_code_id" ref="tax_code_output_X"/>
<field name="ref_base_code_id" ref="tax_code_purch_X"/>
<field name="ref_tax_code_id" ref="tax_code_output_X"/>
<field name="type_tax_use">purchase</field>
</record>
<record id="otaxo" model="account.tax.template">
<field name="chart_template_id" ref="configurable_chart_template"/>
<field name="name">OTAX O</field>
<field eval="0.0" name="amount"/>
<field name="type">percent</field>
<field name="account_collected_id" ref="conf_ova"/>
<field name="account_paid_id" ref="conf_ova"/>
<field name="base_code_id" ref="tax_code_purch_O"/>
<field name="tax_code_id" ref="tax_code_output_O"/>
<field name="ref_base_code_id" ref="tax_code_purch_O"/>
<field name="ref_tax_code_id" ref="tax_code_output_O"/>
<field name="type_tax_use">purchase</field>
</record>
<!-- Sales + Input VAT -->
<record id="itaxs" model="account.tax.template">
<field name="chart_template_id" ref="configurable_chart_template"/>
<field name="name">ITAX S</field>
<field eval="0.15" name="amount"/>
<field name="type">percent</field>
<field name="account_collected_id" ref="conf_iva"/>
<field name="account_paid_id" ref="conf_iva"/>
<field name="base_code_id" ref="tax_code_sales_S"/>
<field name="tax_code_id" ref="tax_code_input_S"/>
<field name="ref_base_code_id" ref="tax_code_sales_S"/>
<field name="ref_tax_code_id" ref="tax_code_input_S"/>
<field name="type_tax_use">sale</field>
</record>
<record id="ovatz" model="account.tax.template">
<record id="itaxr" model="account.tax.template">
<field name="chart_template_id" ref="configurable_chart_template"/>
<field name="name">OVAT Z</field>
<field eval="0.0" name="amount"/>
<field name="name">ITAX R</field>
<field eval="0.05" name="amount"/>
<field name="type">percent</field>
<field name="base_code_id" ref="vat_code_sales_Z"/>
<field name="ref_base_code_id" ref="vat_code_sales_Z"/>
<field name="account_collected_id" ref="conf_iva"/>
<field name="account_paid_id" ref="conf_iva"/>
<field name="base_code_id" ref="tax_code_sales_R"/>
<field name="tax_code_id" ref="tax_code_input_R"/>
<field name="ref_base_code_id" ref="tax_code_sales_R"/>
<field name="ref_tax_code_id" ref="tax_code_input_R"/>
<field name="type_tax_use">sale</field>
</record>
<record id="ovatx" model="account.tax.template">
<record id="itaxx" model="account.tax.template">
<field name="chart_template_id" ref="configurable_chart_template"/>
<field name="name">OVAT X</field>
<field name="name">ITAX X</field>
<field eval="0.0" name="amount"/>
<field name="type">percent</field>
<field name="base_code_id" ref="vat_code_sales_X"/>
<field name="ref_base_code_id" ref="vat_code_sales_X"/>
<field name="account_collected_id" ref="conf_iva"/>
<field name="account_paid_id" ref="conf_iva"/>
<field name="base_code_id" ref="tax_code_sales_X"/>
<field name="tax_code_id" ref="tax_code_input_X"/>
<field name="ref_base_code_id" ref="tax_code_sales_X"/>
<field name="ref_tax_code_id" ref="tax_code_input_X"/>
<field name="type_tax_use">sale</field>
</record>
<record id="ovato" model="account.tax.template">
<record id="itaxo" model="account.tax.template">
<field name="chart_template_id" ref="configurable_chart_template"/>
<field name="name">OVAT O</field>
<field name="name">ITAX O</field>
<field eval="0.0" name="amount"/>
<field name="type">percent</field>
<field name="base_code_id" ref="vat_code_sales_O"/>
<field name="ref_base_code_id" ref="vat_code_sales_O"/>
<field name="account_collected_id" ref="conf_iva"/>
<field name="account_paid_id" ref="conf_iva"/>
<field name="base_code_id" ref="tax_code_sales_O"/>
<field name="tax_code_id" ref="tax_code_input_O"/>
<field name="ref_base_code_id" ref="tax_code_sales_O"/>
<field name="ref_tax_code_id" ref="tax_code_input_O"/>
<field name="type_tax_use">sale</field>
</record>
<!-- = = = = = = = = = = = = = = = -->
<!-- Fiscal Position Templates -->
<!-- = = = = = = = = = = = = = = = -->
<record id="fiscal_position_normal_taxes_template1" model="account.fiscal.position.template">
<field name="name">Normal Taxes</field>
<field name="chart_template_id" ref="configurable_chart_template"/>
</record>
<record id="fiscal_position_tax_exempt_template2" model="account.fiscal.position.template">
<field name="name">Tax Exempt</field>
<field name="chart_template_id" ref="configurable_chart_template"/>
</record>
<!-- = = = = = = = = = = = = = = = -->
<!-- Fiscal Position Tax Templates -->
<!-- = = = = = = = = = = = = = = = -->
<record id="fiscal_position_normal_taxes" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_normal_taxes_template1" />
<field name="tax_src_id" ref="itaxs" />
<field name="tax_dest_id" ref="otaxs" />
</record>
<record id="fiscal_position_tax_exempt" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_tax_exempt_template2" />
<field name="tax_src_id" ref="itaxx" />
<field name="tax_dest_id" ref="otaxx" />
</record>
<!-- Assigned Default Taxes For Different Account -->
<record id="conf_a_sale" model="account.account.template">
<field name="tax_ids" eval="[(6,0,[ref('itaxs')])]"/>
</record>
<record id="conf_a_expense" model="account.account.template">
<field name="tax_ids" eval="[(6,0,[ref('otaxs')])]"/>
</record>
</data>
</openerp>

View File

@ -86,6 +86,12 @@
<field name="field">state</field>
<field eval="14" name="sequence"/>
</record>
<record id="bank_col20" model="account.journal.column">
<field name="view_id" ref="account_journal_bank_view"/>
<field name="name">Reconcile</field>
<field name="field">reconcile_id</field>
<field eval="20" name="sequence"/>
</record>
<record id="account_journal_bank_view_multi" model="account.journal.view">
<field name="name">Bank/Cash Journal (Multi-Currency) View</field>
@ -166,6 +172,12 @@
<field name="field">state</field>
<field eval="16" name="sequence"/>
</record>
<record id="bank_col20_multi" model="account.journal.column">
<field name="view_id" ref="account_journal_bank_view_multi"/>
<field name="name">Reconcile</field>
<field name="field">reconcile_id</field>
<field eval="20" name="sequence"/>
</record>
<record id="account_journal_view" model="account.journal.view">
@ -235,8 +247,8 @@
<field name="field">state</field>
<field eval="14" name="sequence"/>
</record>
<record id="account_sp_journal_view" model="account.journal.view">
<field name="name">Sale/Purchase Journal View</field>
</record>
@ -328,7 +340,13 @@
<field name="field">state</field>
<field eval="14" name="sequence"/>
</record>
<record id="sp_journal_col20" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">Reconcile</field>
<field name="field">reconcile_id</field>
<field eval="20" name="sequence"/>
</record>
<record id="account_sp_refund_journal_view" model="account.journal.view">
<field name="name">Sale/Purchase Refund Journal View</field>
</record>
@ -420,6 +438,13 @@
<field name="field">state</field>
<field eval="14" name="sequence"/>
</record>
<record id="sp_refund_journal_col20" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">Reconcile</field>
<field name="field">reconcile_id</field>
<field eval="20" name="sequence"/>
</record>
<!--
Account Journal Sequences
-->
@ -436,12 +461,14 @@
<record id="sequence_sale_journal" model="ir.sequence">
<field name="name">Sale Journal</field>
<field name="code">account.journal</field>
<field name="prefix"/>
<field eval="3" name="padding"/>
<field name="prefix">%(year)s/</field>
</record>
<record id="sequence_purchase_journal" model="ir.sequence">
<field name="name">Purchase Journal</field>
<field name="code">account.journal</field>
<field name="prefix"/>
<field eval="3" name="padding"/>
<field name="prefix">%(year)s/</field>
</record>
<!--
@ -468,10 +495,10 @@
<field name="name">Account Bank Statement</field>
<field name="code">account.bank.statement</field>
<field name="prefix">St. %(month)s/%(day)s/</field>
<field eval="0" name="number_next"/>
<field eval="1" name="number_next"/>
<field eval="1" name="number_increment"/>
</record>
<record id="cash_sequence_statement_type" model="ir.sequence.type">
<field name="name">Cash Statement</field>
<field name="code">account.cash.statement</field>

View File

@ -27,8 +27,8 @@
</record>
<!--
Sequences for invoices
-->
Sequences for invoices
-->
<record id="seq_out_invoice" model="ir.sequence">
<field name="name">Account Invoice Out</field>
<field name="code">account.invoice.out_invoice</field>
@ -55,16 +55,16 @@
</record>
<!--
Sequences types for analytic account
-->
Sequences types for analytic account
-->
<record id="seq_type_analytic_account" model="ir.sequence.type">
<field name="name">Analytic account</field>
<field name="code">account.analytic.account</field>
</record>
<!--
Sequence for analytic account
-->
Sequence for analytic account
-->
<record id="seq_analytic_account" model="ir.sequence">
<field name="name">Analytic account sequence</field>
<field name="code">account.analytic.account</field>

View File

@ -4,6 +4,7 @@
<!--
Account Type
-->
<record id="account_type_root" model="account.account.type">
<field name="name">View</field>
<field name="code">view</field>
@ -89,15 +90,6 @@
<field name="parent_id" ref="bal"/>
</record>
<record model="account.account" id="liabilities_view">
<field name="name">Liabilities - (test)</field>
<field name="code">X11</field>
<field name="type">view</field>
<field name="user_type" ref="account_type_liability"/>
<field name="reconcile" eval="False"/>
<field name="parent_id" ref="bal"/>
</record>
<record id="fas" model="account.account">
<field name="code">X100</field>
<field name="name">Fixed Assets - (test)</field>
@ -144,7 +136,7 @@
<field ref="cas" name="parent_id"/>
<field name="type">receivable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="account_type_receivable"/>
<field name="user_type" ref="account_type_asset"/>
</record>
<record id="ova" model="account.account">
@ -152,7 +144,7 @@
<field name="name">Output VAT - (test)</field>
<field ref="cas" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="account_type_receivable"/>
<field name="user_type" ref="account_type_asset"/>
</record>
<record id="bnk" model="account.account">
@ -171,6 +163,15 @@
<field name="user_type" ref="account_type_asset"/>
</record>
<record model="account.account" id="liabilities_view">
<field name="name">Liabilities - (test)</field>
<field name="code">X11</field>
<field name="type">view</field>
<field name="user_type" ref="account_type_liability"/>
<field name="reconcile" eval="False"/>
<field name="parent_id" ref="bal"/>
</record>
<record id="cli" model="account.account">
<field name="code">X110</field>
<field name="name">Current Liabilities - (test)</field>
@ -185,7 +186,7 @@
<field ref="cli" name="parent_id"/>
<field name="type">payable</field>
<field eval="True" name="reconcile"/>
<field name="user_type" ref="account_type_payable"/>
<field name="user_type" ref="account_type_liability"/>
</record>
<record id="iva" model="account.account">
@ -193,7 +194,15 @@
<field name="name">Input VAT - (test)</field>
<field ref="cli" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="account_type_payable"/>
<field name="user_type" ref="account_type_liability"/>
</record>
<record id="rsa" model="account.account">
<field name="code">X1113</field>
<field name="name">Reserve and Surplus - (test)</field>
<field ref="cli" name="parent_id"/>
<field name="type">payable</field>
<field name="user_type" ref="account_type_liability"/>
</record>
<!-- Profit and Loss -->
@ -224,15 +233,6 @@
<field name="parent_id" ref="income_view"/>
</record>
<record model="account.account" id="expense_view">
<field name="name">Expense - (test)</field>
<field name="code">X21</field>
<field name="type">view</field>
<field name="user_type" ref="account_type_expense"/>
<field name="reconcile" eval="False"/>
<field name="parent_id" ref="gpf"/>
</record>
<record id="rev" model="account.account">
<field name="code">X200</field>
<field name="name">Revenue - (test)</field>
@ -249,6 +249,16 @@
<field name="user_type" ref="account_type_income"/>
</record>
<record model="account.account" id="expense_view">
<field name="name">Expense - (test)</field>
<field name="code">X21</field>
<field name="type">view</field>
<field name="user_type" ref="account_type_expense"/>
<field name="reconcile" eval="False"/>
<field name="parent_id" ref="gpf"/>
</record>
<record id="cos" model="account.account">
<field name="code">X210</field>
<field name="name">Cost of Sales - (test)</field>
@ -290,6 +300,14 @@
<field name="parent_id" ref="ovr"/>
</record>
<record id="a_salary_expense" model="account.account">
<field name="code">X2112</field>
<field name="name">Salary Expenses - (test)</field>
<field ref="ovr" name="parent_id"/>
<field name="type">other</field>
<field name="user_type" ref="account_type_expense"/>
</record>
<!-- Properties -->
<record forcecreate="True" id="property_account_receivable" model="ir.property">
<field name="name">property_account_receivable</field>
@ -310,6 +328,13 @@
<field name="company_id" ref="base.main_company"/>
</record>
<record forcecreate="True" id="property_reserve_and_surplus_account" model="ir.property">
<field name="name">property_account_receivable</field>
<field name="fields_id" search="[('model','=','res.company'),('name','=','property_reserve_and_surplus_account')]"/>
<field eval="'account.account,'+str(rsa)" name="value"/>
<field name="company_id" ref="base.main_company"/>
</record>
<!--
Account Journal
@ -321,7 +346,7 @@
<field name="type">sale</field>
<field name="view_id" ref="account_sp_journal_view"/>
<field name="sequence_id" ref="sequence_sale_journal"/>
<field name="invoice_sequence_id" ref="seq_type_out_invoice"/>
<field name="invoice_sequence_id" ref="seq_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"/>
@ -332,6 +357,7 @@
<field name="type">sale_refund</field>
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="sequence_id" ref="sequence_sale_journal"/>
<field name="invoice_sequence_id" ref="seq_out_refund"/>
<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"/>
@ -343,7 +369,7 @@
<field name="type">purchase</field>
<field name="view_id" ref="account_sp_journal_view"/>
<field name="sequence_id" ref="sequence_purchase_journal"/>
<field name="invoice_sequence_id" ref="seq_type_in_invoice"/>
<field name="invoice_sequence_id" ref="seq_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"/>
@ -354,6 +380,7 @@
<field name="type">purchase_refund</field>
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="sequence_id" ref="sequence_purchase_journal"/>
<field name="invoice_sequence_id" ref="seq_in_refund"/>
<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"/>
@ -381,7 +408,7 @@
</record>
<record id="cash_journal" model="account.journal">
<field name="name">Cash Journal - (test)</field>
<field name="code">CHK</field>
<field name="code">CSH</field>
<field name="type">cash</field>
<field name="view_id" ref="account_journal_bank_view"/>
<field name="sequence_id" ref="sequence_journal"/>
@ -394,18 +421,6 @@
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="'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="'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">
<field name="name">property_account_expense_categ</field>
<field name="fields_id" search="[('model','=','product.category'),('name','=','property_account_expense_categ')]"/>

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 05:27+0000\n"
"PO-Revision-Date: 2010-08-29 10:36+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Danish <da@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-08-12 03:51+0000\n"
"X-Launchpad-Export-Date: 2010-08-30 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 04:38+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"PO-Revision-Date: 2010-08-29 10:43+0000\n"
"Last-Translator: Ferdinand-chricar <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-08-12 03:52+0000\n"
"X-Launchpad-Export-Date: 2010-08-30 03:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@ -272,6 +272,9 @@ msgid ""
"in which order. You can create your own view for a faster encoding in each "
"journal."
msgstr ""
"Definiert Felder (sichtbar, zwingend, nur lesen) für die Sicht für dieses "
"Journal. Für jedes Journal können eingene Sichten erzeugt wrden um scheller "
"erfassen zu können"
#. module: account
#: help:account.invoice,date_due:0
@ -1033,7 +1036,7 @@ msgstr "Position"
#: field:account.analytic.line,product_uom_id:0
#: field:account.move.line,product_uom_id:0
msgid "UoM"
msgstr "UoM"
msgstr "ME"
#. module: account
#: wizard_field:account.third_party_ledger.report,init,page_split:0
@ -1144,7 +1147,7 @@ msgstr "Summen- & Saldenliste Vorlagen"
#: rml:account.invoice:0
#: field:account.invoice.line,price_unit:0
msgid "Unit Price"
msgstr "Preis/UoM"
msgstr "Preis/ME"
#. module: account
#: rml:account.analytic.account.journal:0
@ -1504,7 +1507,7 @@ msgstr "Beende Jahr"
#. module: account
#: model:ir.model,name:account.model_wizard_company_setup
msgid "wizard.company.setup"
msgstr ""
msgstr "wizard.company.setup"
#. module: account
#: model:ir.actions.act_window,name:account.action_account_analytic_account_line_extended_form
@ -5386,7 +5389,7 @@ msgstr "Teilbuchung"
#. module: account
#: help:account.move.line,statement_id:0
msgid "The bank statement used for bank reconciliation"
msgstr ""
msgstr "Der Bankauszug für den Bankausgleich"
#. module: account
#: view:account.fiscalyear:0
@ -5477,7 +5480,7 @@ msgstr "Berechne"
#. module: account
#: help:account.invoice.line,account_id:0
msgid "The income or expense account related to the selected product."
msgstr "Aufwand- und Ertragskonto des Produktes"
msgstr "Aufwand- und Erskonto des Produktes"
#. module: account
#: field:account.tax,type_tax_use:0
@ -5795,7 +5798,7 @@ msgstr "5"
#: field:product.category,property_account_income_categ:0
#: field:product.template,property_account_income:0
msgid "Income Account"
msgstr "Ertragskonto"
msgstr "Erskonto"
#. module: account
#: field:account.period,special:0

File diff suppressed because it is too large Load Diff

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-08 05:46+0000\n"
"Last-Translator: lyyser <logard.1961@gmail.com>\n"
"PO-Revision-Date: 2010-08-28 08:23+0000\n"
"Last-Translator: OpenERP Administrators <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-08-12 03:51+0000\n"
"X-Launchpad-Export-Date: 2010-08-29 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@ -637,7 +637,7 @@ msgstr "Kooskõlasta konto kirjet"
#. module: account
#: wizard_button:account.move.bank.reconcile,init,open:0
msgid "Open for bank reconciliation"
msgstr ""
msgstr "Avatud panga võrdlevaks kooskõlastamiseks"
#. module: account
#: field:account.invoice.line,discount:0

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 05:19+0000\n"
"PO-Revision-Date: 2010-08-29 10:40+0000\n"
"Last-Translator: OpenERP Administrators <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-08-12 03:52+0000\n"
"X-Launchpad-Export-Date: 2010-08-30 03:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 04:37+0000\n"
"PO-Revision-Date: 2010-08-29 10:35+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-08-12 03:52+0000\n"
"X-Launchpad-Export-Date: 2010-08-30 03:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@ -389,7 +389,7 @@ msgstr "Descrizione della Fattura"
#. module: account
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr ""
msgstr "Errore! Non puoi creare account analitici ricorsivi"
#. module: account
#: field:account.bank.statement.reconcile,total_entry:0
@ -436,7 +436,7 @@ msgstr "Negativo"
#. module: account
#: rml:account.partner.balance:0
msgid "(Account/Partner) Name"
msgstr ""
msgstr "Nome (Conto/Partner)"
#. module: account
#: selection:account.move,type:0
@ -622,6 +622,8 @@ msgid ""
"The sequence field is used to order the resources from lower sequences to "
"higher ones"
msgstr ""
"Il campo \"sequenza\" è usato per ordinare le risorse dalla sequenza minote "
"alla maggiore"
#. module: account
#: wizard_view:account.analytic.account.chart,init:0
@ -712,7 +714,7 @@ msgstr "Resi da clienti"
#. module: account
#: wizard_view:account.analytic.account.chart,init:0
msgid "Select the Period for Analysis"
msgstr ""
msgstr "Seleziona il periodo per l'analisi"
#. module: account
#: field:account.tax,ref_tax_sign:0
@ -725,7 +727,7 @@ msgstr ""
#. module: account
#: help:res.partner,credit:0
msgid "Total amount this customer owes you."
msgstr ""
msgstr "Importo totale che questo cliente vi deve"
#. module: account
#: view:account.move.line:0
@ -838,6 +840,8 @@ msgid ""
"These types are defined according to your country. The type contain more "
"information about the account and it's specificities."
msgstr ""
"Questi tipi sono definiti a seconda della tua nazione. I tipi contengono più "
"informazioni circa il conto e la sua specificità"
#. module: account
#: selection:account.automatic.reconcile,init,power:0
@ -959,12 +963,12 @@ msgstr "Data finale"
#. module: account
#: field:account.invoice.tax,base_amount:0
msgid "Base Code Amount"
msgstr ""
msgstr "Importo codice base"
#. module: account
#: help:account.journal,user_id:0
msgid "The user responsible for this journal"
msgstr ""
msgstr "L'utente responsabile per questo giornale"
#. module: account
#: field:account.journal,default_debit_account_id:0
@ -1009,7 +1013,7 @@ msgstr "Totale finale"
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_accounting
msgid "Financial Accounting"
msgstr "Contabilità Finanziaria"
msgstr "Contabilità Ordinaria"
#. module: account
#: rml:account.invoice:0
@ -1139,7 +1143,7 @@ msgstr "Nuovo conto analitico"
#: model:ir.actions.act_window,name:account.action_account_fiscal_position_template_form
#: model:ir.ui.menu,name:account.menu_action_account_fiscal_position_form_template
msgid "Fiscal Position Templates"
msgstr ""
msgstr "Modelli di \"posizioni fiscali\""
#. module: account
#: rml:account.invoice:0
@ -1150,7 +1154,7 @@ msgstr "Prezzo unitario"
#. module: account
#: rml:account.analytic.account.journal:0
msgid "Period from :"
msgstr ""
msgstr "Periodo che va da:"
#. module: account
#: model:ir.model,name:account.model_wizard_multi_charts_accounts
@ -1171,7 +1175,7 @@ msgstr "L'importo espresso in un'altra valuta opzionale"
#: view:account.fiscal.position.template:0
#: field:account.fiscal.position.template,name:0
msgid "Fiscal Position Template"
msgstr ""
msgstr "Modelli di \"posizioni fiscali\""
#. module: account
#: field:account.payment.term,line_ids:0
@ -1192,7 +1196,7 @@ msgstr "Apri conti"
#. module: account
#: wizard_view:account.fiscalyear.close.state,init:0
msgid "Are you sure you want to close the fiscal year ?"
msgstr ""
msgstr "Sei sicuro di voler chiudere l'anno fiscale?"
#. module: account
#: selection:account.move,type:0
@ -1207,7 +1211,7 @@ msgstr "Conto bancario"
#. module: account
#: field:account.chart.template,tax_template_ids:0
msgid "Tax Template List"
msgstr ""
msgstr "Lista modelli di tasse"
#. module: account
#: model:process.transition,name:account.process_transition_invoiceimport0
@ -1242,7 +1246,7 @@ msgstr ""
#. module: account
#: field:account.analytic.account,parent_id:0
msgid "Parent Analytic Account"
msgstr ""
msgstr "Conto Analitico Padre"
#. module: account
#: wizard_button:account.move.line.reconcile,init_partial,addendum:0
@ -1282,7 +1286,7 @@ msgstr "Importo fissato"
#. module: account
#: rml:account.analytic.account.analytic.check:0
msgid "Analytic Credit"
msgstr ""
msgstr "Credito analitico"
#. module: account
#: field:account.move.line,reconcile_partial_id:0
@ -1333,12 +1337,12 @@ msgstr "Chiusura Anno Fiscale"
#. module: account
#: field:account.journal,centralisation:0
msgid "Centralised counterpart"
msgstr ""
msgstr "Contropartita centralizzata"
#. module: account
#: view:wizard.company.setup:0
msgid "Message"
msgstr ""
msgstr "Messaggio"
#. module: account
#: model:process.node,note:account.process_node_supplierpaymentorder0
@ -1371,7 +1375,7 @@ msgstr "Voci analitiche"
#. module: account
#: help:account.tax,type:0
msgid "The computation method for the tax amount."
msgstr ""
msgstr "Il metodo di calcolo per l'importo delle tasse"
#. module: account
#: model:process.node,note:account.process_node_accountingentries0
@ -1405,7 +1409,7 @@ msgstr "Voci tassa"
#. module: account
#: field:ir.sequence,fiscal_ids:0
msgid "Sequences"
msgstr ""
msgstr "Sequenze"
#. module: account
#: model:ir.actions.act_window,name:account.action_account_type_form
@ -1439,12 +1443,12 @@ msgstr "Libro Giornale"
#: field:account.account,child_id:0
#: field:account.analytic.account,child_ids:0
msgid "Child Accounts"
msgstr ""
msgstr "Conto figlio"
#. module: account
#: field:account.account,check_history:0
msgid "Display History"
msgstr ""
msgstr "Mostra lo storico"
#. module: account
#: wizard_field:account.third_party_ledger.report,init,date1:0
@ -1455,7 +1459,7 @@ msgstr " Data d'inizio"
#: wizard_field:account.account.balance.report,checktype,display_account:0
#: wizard_field:account.general.ledger.report,checktype,display_account:0
msgid "Display accounts "
msgstr ""
msgstr "Mostra conti "
#. module: account
#: model:ir.model,name:account.model_account_bank_statement_reconcile_line
@ -1482,6 +1486,8 @@ msgid ""
"The partner bank account to pay\n"
"Keep empty to use the default"
msgstr ""
"Il conto della banca del partner da pagare\n"
"Lasciare vuoto per usare il default"
#. module: account
#: field:res.partner,debit:0
@ -1506,7 +1512,7 @@ msgstr "account.analytic.line.extended"
#. module: account
#: field:account.journal,refund_journal:0
msgid "Refund Journal"
msgstr ""
msgstr "Giornale dei Fondi"
#. module: account
#: model:account.account.type,name:account.account_type_income
@ -1577,7 +1583,7 @@ msgstr "Apri per la riconciliazione"
#. module: account
#: model:account.journal,name:account.bilan_journal
msgid "Journal d'ouverture"
msgstr ""
msgstr "Giornale d'apertura"
#. module: account
#: selection:account.tax,tax_group:0
@ -1599,7 +1605,7 @@ msgstr "Lasciare il campo vuoto per usare il conto Spesa"
#. module: account
#: wizard_field:account.automatic.reconcile,init,account_ids:0
msgid "Account to reconcile"
msgstr ""
msgstr "Conto da riconciliare"
#. module: account
#: rml:account.invoice:0
@ -1618,7 +1624,7 @@ msgstr "Conti di incasso e pagamento"
#: view:account.subscription:0
#: field:account.subscription,lines_id:0
msgid "Subscription Lines"
msgstr ""
msgstr "Linee sottoscritte"
#. module: account
#: selection:account.analytic.journal,type:0
@ -1647,7 +1653,7 @@ msgstr "Chiudi periodo"
#. module: account
#: rml:account.overdue:0
msgid "Due"
msgstr ""
msgstr "Dovuto"
#. module: account
#: rml:account.journal.period.print:0
@ -1675,7 +1681,7 @@ msgstr "Libro Giornale"
#. module: account
#: rml:account.analytic.account.quantity_cost_ledger:0
msgid "Max Qty:"
msgstr ""
msgstr "Quant. massima:"
#. module: account
#: wizard_button:account.invoice.refund,init,refund:0
@ -1687,7 +1693,7 @@ msgstr "Fattura di resi"
#: model:ir.actions.wizard,name:account.wizard_period_close
#: model:ir.ui.menu,name:account.menu_action_account_period_close_tree
msgid "Close a Period"
msgstr ""
msgstr "Chiudi un periodo"
#. module: account
#: model:ir.actions.act_window,name:account.act_acc_analytic_acc_2_report_hr_timesheet_invoice_journal
@ -1697,7 +1703,7 @@ msgstr "Costi e ricavi"
#. module: account
#: constraint:account.account:0
msgid "Error ! You can not create recursive accounts."
msgstr ""
msgstr "Errore! Non puoi creare conti ricorsivi"
#. module: account
#: rml:account.tax.code.entries:0
@ -1707,7 +1713,7 @@ msgstr "Numero conto"
#. module: account
#: view:account.config.wizard:0
msgid "Skip"
msgstr ""
msgstr "Salta"
#. module: account
#: field:account.invoice,period_id:0
@ -1727,7 +1733,7 @@ msgstr "Riapri"
#. module: account
#: wizard_view:account.fiscalyear.close,init:0
msgid "Are you sure you want to create entries?"
msgstr ""
msgstr "Sei sicuro di voler creare la voce?"
#. module: account
#: field:account.tax,include_base_amount:0
@ -1743,7 +1749,7 @@ msgstr "Delta di Credito"
#: model:ir.actions.wizard,name:account.wizard_reconcile_unreconcile
#: model:ir.actions.wizard,name:account.wizard_unreconcile
msgid "Unreconcile Entries"
msgstr ""
msgstr "Voci non riconciliate"
#. module: account
#: model:process.node,note:account.process_node_supplierdraftinvoices0
@ -1753,13 +1759,13 @@ msgstr ""
#. module: account
#: wizard_view:account.analytic.account.quantity_cost_ledger.report,init:0
msgid "Cost Legder for period"
msgstr ""
msgstr "Libro mastro dei costi per il periodo"
#. module: account
#: model:ir.actions.act_window,name:account.action_bank_statement_tree2
#: model:ir.ui.menu,name:account.menu_bank_statement_tree2
msgid "New Statement"
msgstr ""
msgstr "Nuova dichiarazione"
#. module: account
#: wizard_field:account.analytic.account.chart,init,from_date:0
@ -1822,7 +1828,7 @@ msgstr ""
#. module: account
#: rml:account.analytic.account.cost_ledger:0
msgid "Date or Code"
msgstr ""
msgstr "Data o codice"
#. module: account
#: field:account.analytic.account,user_id:0
@ -1832,7 +1838,7 @@ msgstr "Gestione conti"
#. module: account
#: rml:account.analytic.account.journal:0
msgid "to :"
msgstr ""
msgstr "a:"
#. module: account
#: wizard_field:account.move.line.reconcile,init_full,debit:0
@ -1870,7 +1876,7 @@ msgstr "Data inizio"
#. module: account
#: model:account.journal,name:account.refund_expenses_journal
msgid "x Expenses Credit Notes Journal"
msgstr ""
msgstr "x Giornale note di accredito su Acquisti"
#. module: account
#: field:account.analytic.journal,type:0
@ -1942,7 +1948,7 @@ msgstr "Numero di Giorni"
#. module: account
#: help:account.invoice,reference:0
msgid "The partner reference of this invoice."
msgstr ""
msgstr "Il partner di riferimento per questa fattura."
#. module: account
#: wizard_field:account.general.ledger.report,checktype,sortbydate:0
@ -1957,7 +1963,7 @@ msgstr "Da verificare"
#. module: account
#: help:res.partner,debit:0
msgid "Total amount you have to pay to this supplier."
msgstr ""
msgstr "Totale da pagare a questo fornitore"
#. module: account
#: selection:account.automatic.reconcile,init,power:0
@ -1982,7 +1988,7 @@ msgstr "Piano dei conti"
#. module: account
#: help:account.tax,name:0
msgid "This name will be displayed on reports"
msgstr ""
msgstr "Questo nome sarà visualizzato sulle stampe"
#. module: account
#: rml:account.analytic.account.cost_ledger:0
@ -2014,7 +2020,7 @@ msgstr "Resi da clienti"
#. module: account
#: rml:account.vat.declaration:0
msgid "Tax Amount"
msgstr ""
msgstr "Importo Imposta"
#. module: account
#: rml:account.analytic.account.quantity_cost_ledger:0
@ -2024,7 +2030,7 @@ msgstr ""
#. module: account
#: field:account.journal.period,name:0
msgid "Journal-Period Name"
msgstr ""
msgstr "Nome periodo del giornale"
#. module: account
#: field:account.tax.code,name:0
@ -2039,6 +2045,9 @@ msgid ""
"'draft' state and instead goes directly to the 'posted state' without any "
"manual validation."
msgstr ""
"Selezionare questa casella se non vuoi che le nuove movimentazioni contabili "
"saltino lo stato 'bozza' e diventino invece direttamente 'confermate' senza "
"alcuna validazione manuale."
#. module: account
#: field:account.bank.statement.line,partner_id:0
@ -2062,7 +2071,7 @@ msgstr ""
#. module: account
#: rml:account.invoice:0
msgid "Draft Invoice"
msgstr ""
msgstr "Fattura in bozza"
#. module: account
#: model:account.account.type,name:account.account_type_expense
@ -2072,7 +2081,7 @@ msgstr "Uscita"
#. module: account
#: field:account.journal,invoice_sequence_id:0
msgid "Invoice Sequence"
msgstr ""
msgstr "Sequenza di fatturazione"
#. module: account
#: wizard_view:account.automatic.reconcile,init:0
@ -2082,7 +2091,7 @@ msgstr "Opzioni"
#. module: account
#: model:process.process,name:account.process_process_invoiceprocess0
msgid "Customer Invoice Process"
msgstr ""
msgstr "Processo di fatturazione cliente"
#. module: account
#: rml:account.invoice:0
@ -2092,7 +2101,7 @@ msgstr ""
#. module: account
#: wizard_field:account.fiscalyear.close,init,period_id:0
msgid "Opening Entries Period"
msgstr ""
msgstr "Periodo di Voci aperte"
#. module: account
#: model:ir.actions.wizard,name:account.wizard_validate_account_moves
@ -2109,7 +2118,7 @@ msgstr "giorni"
#. module: account
#: selection:account.aged.trial.balance,init,direction_selection:0
msgid "Past"
msgstr ""
msgstr "Passato"
#. module: account
#: field:account.analytic.account,company_currency_id:0
@ -2133,7 +2142,7 @@ msgstr "Fattura non pagate"
#. module: account
#: model:process.transition,name:account.process_transition_paymentreconcile0
msgid "Payment Reconcile"
msgstr ""
msgstr "Pagamento riconciliato"
#. module: account
#: model:ir.actions.act_window,name:account.action_bank_statement_reconciliation_form
@ -2145,7 +2154,7 @@ msgstr ""
#: model:ir.actions.act_window,name:account.action_subscription_form_new
#: model:ir.ui.menu,name:account.menu_action_subscription_form_new
msgid "New Subscription"
msgstr ""
msgstr "Nuova sottoscrizione"
#. module: account
#: view:account.payment.term:0
@ -2161,7 +2170,7 @@ msgstr "Registrazione analitica"
#: view:res.company:0
#: field:res.company,overdue_msg:0
msgid "Overdue Payments Message"
msgstr ""
msgstr "Messaggio in caso di pagamenti in ritardo"
#. module: account
#: model:ir.actions.act_window,name:account.action_tax_code_tree
@ -2203,7 +2212,7 @@ msgstr "Bozze"
#. module: account
#: wizard_field:account.invoice.refund,init,period:0
msgid "Force period"
msgstr ""
msgstr "Forza il periodo"
#. module: account
#: selection:account.account.type,close_method:0
@ -2214,7 +2223,7 @@ msgstr "Dettaglio"
#: selection:account.account,type:0
#: selection:account.account.template,type:0
msgid "Consolidation"
msgstr ""
msgstr "Consolidamento"
#. module: account
#: field:account.chart.template,account_root_id:0
@ -2246,7 +2255,7 @@ msgstr "Piano dei conti"
#. module: account
#: model:account.journal,name:account.check_journal
msgid "x Checks Journal"
msgstr ""
msgstr "x Controllo giornale"
#. module: account
#: model:ir.actions.wizard,name:account.wizard_generate_subscription
@ -2257,7 +2266,7 @@ msgstr "Creare voci relative a canoni"
#. module: account
#: wizard_field:account.fiscalyear.close,init,journal_id:0
msgid "Opening Entries Journal"
msgstr ""
msgstr "Giornale delle Voci aperte"
#. module: account
#: view:account.config.wizard:0
@ -2286,12 +2295,12 @@ msgstr "Tutti i periodi sono vuoti"
#. module: account
#: model:account.account.type,name:account.account_type_liability
msgid "Liability"
msgstr ""
msgstr "Debiti"
#. module: account
#: selection:account.automatic.reconcile,init,power:0
msgid "2"
msgstr ""
msgstr "2"
#. module: account
#: wizard_view:account.chart,init:0
@ -2303,7 +2312,7 @@ msgstr ""
#. module: account
#: help:account.invoice.tax,base_code_id:0
msgid "The account basis of the tax declaration."
msgstr ""
msgstr "Il conto si basa sulla denuncia della tassa"
#. module: account
#: rml:account.analytic.account.journal:0
@ -2328,7 +2337,7 @@ msgstr "Data"
#. module: account
#: field:account.invoice,reference_type:0
msgid "Reference Type"
msgstr ""
msgstr "Tipo riferimento"
#. module: account
#: wizard_button:account.move.line.unreconcile,init,unrec:0
@ -2351,7 +2360,7 @@ msgstr "Voci di documento"
#: field:account.analytic.line,user_id:0
#: field:account.journal,user_id:0
msgid "User"
msgstr ""
msgstr "Utente Open ERP"
#. module: account
#: model:ir.actions.act_window,name:account.action_account_template_form
@ -2372,7 +2381,7 @@ msgstr ""
#. module: account
#: rml:account.journal.period.print:0
msgid "Voucher No"
msgstr ""
msgstr "Buono Numero"
#. module: account
#: model:ir.actions.wizard,name:account.wizard_automatic_reconcile
@ -2388,7 +2397,7 @@ msgstr "Importa fattura"
#. module: account
#: wizard_view:account.analytic.account.quantity_cost_ledger.report,init:0
msgid "and Journals"
msgstr ""
msgstr "e Giornali"
#. module: account
#: view:account.tax:0
@ -2411,11 +2420,13 @@ msgid ""
"Set if the tax computation is based on the computation of child taxes rather "
"than on the total amount."
msgstr ""
"Indica se il calcolo della tassa è basato sul conteggio delle tasse "
"\"figlio\" invece che sul totale importo."
#. module: account
#: rml:account.central.journal:0
msgid "Journal Code"
msgstr ""
msgstr "Codifica Giornale"
#. module: account
#: help:account.tax,applicable_type:0
@ -2423,11 +2434,13 @@ msgid ""
"If not applicable (computed through a Python code), the tax won't appear on "
"the invoice."
msgstr ""
"Se non applicabile (calcolato attraverso una procedura Python), la tassa non "
"appare sulla fattura"
#. module: account
#: field:account.model,lines_id:0
msgid "Model Entries"
msgstr ""
msgstr "Voce Modello"
#. module: account
#: field:account.analytic.account,date:0
@ -2470,7 +2483,7 @@ msgstr "Codifica di registrazioni per linea"
#. module: account
#: help:account.chart.template,tax_template_ids:0
msgid "List of all the taxes that have to be installed by the wizard"
msgstr ""
msgstr "Elenco di tutte le imposte che devono essere installate dal wizard"
#. module: account
#: rml:account.analytic.account.cost_ledger:0
@ -2483,7 +2496,7 @@ msgstr "Periodo da"
#: model:process.node,name:account.process_node_bankstatement0
#: model:process.node,name:account.process_node_supplierbankstatement0
msgid "Bank Statement"
msgstr ""
msgstr "Estratto conto"
#. module: account
#: wizard_view:account.invoice.pay,addendum:0
@ -2505,13 +2518,13 @@ msgstr "L'importo in valuta del Libro Giornale"
#. module: account
#: wizard_field:account.general.ledger.report,checktype,landscape:0
msgid "Landscape Mode"
msgstr ""
msgstr "Modalità Orizzontale"
#. module: account
#: model:process.transition,note:account.process_transition_analyticinvoice0
#: model:process.transition,note:account.process_transition_supplieranalyticcost0
msgid "From analytic accounts, Create invoice."
msgstr ""
msgstr "Dai conti analitici, Crea fattura."
#. module: account
#: wizard_button:account.account.balance.report,account_selection,end:0
@ -2582,7 +2595,7 @@ msgstr "Usa questo codice per la Dichiarazione IVA"
#. module: account
#: field:account.move.line,blocked:0
msgid "Litigation"
msgstr ""
msgstr "Causa"
#. module: account
#: view:account.move.line:0
@ -2594,7 +2607,7 @@ msgstr "Informazione"
#. module: account
#: model:ir.ui.menu,name:account.menu_tax_report
msgid "Taxes Reports"
msgstr ""
msgstr "Stampa Tasse"
#. module: account
#: field:res.partner,property_account_payable:0
@ -2619,13 +2632,15 @@ msgstr "Conto Crediti predefinito"
#. module: account
#: model:process.node,name:account.process_node_supplierpaymentorder0
msgid "Payment Order"
msgstr ""
msgstr "Ordine di Pagamento"
#. module: account
#: help:account.account.template,reconcile:0
msgid ""
"Check this option if you want the user to reconcile entries in this account."
msgstr ""
"Spunta questa opzione se vuoi che sia l'utente a riconciliare le voci di "
"questo conto"
#. module: account
#: rml:account.analytic.account.journal:0
@ -2648,12 +2663,12 @@ msgstr "Capitale"
#. module: account
#: field:wizard.company.setup,overdue_msg:0
msgid "Overdue Payment Message"
msgstr ""
msgstr "Messaggio per pagamento in ritardo"
#. module: account
#: model:ir.model,name:account.model_account_tax_code_template
msgid "Tax Code Template"
msgstr ""
msgstr "Modelli di Codice Tassa"
#. module: account
#: rml:account.partner.balance:0
@ -2678,7 +2693,7 @@ msgstr "Movimenti di fine anno"
#. module: account
#: model:ir.ui.menu,name:account.menu_generic_report
msgid "Generic Reports"
msgstr ""
msgstr "Stampe generiche"
#. module: account
#: wizard_field:account.automatic.reconcile,init,power:0
@ -2734,7 +2749,7 @@ msgstr "Numero fattura"
#. module: account
#: field:account.period,date_stop:0
msgid "End of Period"
msgstr ""
msgstr "Concludi il periodo"
#. module: account
#: wizard_button:populate_statement_from_inv,go,finish:0
@ -2750,7 +2765,7 @@ msgstr "Imponibile"
#: model:ir.actions.report.xml,name:account.account_analytic_account_inverted_balance
#: model:ir.actions.wizard,name:account.account_analytic_account_inverted_balance_report
msgid "Inverted Analytic Balance"
msgstr ""
msgstr "Bilancio Conti Analitici inverso"
#. module: account
#: field:account.tax,applicable_type:0
@ -2788,7 +2803,7 @@ msgstr ""
#. module: account
#: wizard_field:account.aged.trial.balance,init,direction_selection:0
msgid "Analysis Direction"
msgstr ""
msgstr "Analisi della direzione"
#. module: account
#: wizard_button:populate_statement_from_inv,init,go:0
@ -2812,6 +2827,10 @@ 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 ""
"Il campo sequenza è usato per ordinare le linee delle tasse dalla più "
"piccola alla più grande. Questo ordinamento è importante se hai delle tasse "
"che hanno tasse \"figlio\". In questo caso, l'ordine con cui vendono "
"valutate è importante."
#. module: account
#: field:account.journal.column,view_id:0
@ -2819,12 +2838,12 @@ msgstr ""
#: field:account.journal.view,name:0
#: model:ir.model,name:account.model_account_journal_view
msgid "Journal View"
msgstr ""
msgstr "Vista Giornale"
#. module: account
#: selection:account.move.line,centralisation:0
msgid "Credit Centralisation"
msgstr ""
msgstr "Centralizzazione del credito"
#. module: account
#: rml:account.overdue:0
@ -2942,7 +2961,7 @@ msgstr ""
#: view:product.template:0
#: view:res.partner:0
msgid "Accounting"
msgstr "Informazioni contabili"
msgstr "Contabilità"
#. module: account
#: view:account.fiscal.position.template:0
@ -3283,7 +3302,7 @@ msgstr "Riconcilia registrazioni"
#. module: account
#: wizard_view:account.wizard_paid_open,init:0
msgid "(Invoice should be unreconciled if you want to open it)"
msgstr ""
msgstr "(Bisogna annullare la riconciliazione per aprire la fattura)"
#. module: account
#: view:account.invoice:0
@ -3776,7 +3795,7 @@ msgstr ""
#. module: account
#: selection:account.account.type,close_method:0
msgid "Unreconciled"
msgstr ""
msgstr "Non riconciliate"
#. module: account
#: field:account.account,note:0
@ -5976,7 +5995,7 @@ msgstr ""
#: model:ir.actions.act_window,name:account.open_board_account
#: model:ir.ui.menu,name:account.menu_board_account
msgid "Accounting Dashboard"
msgstr ""
msgstr "Cruscotto Contabilità"
#. module: account
#: view:board.board:0
@ -6195,6 +6214,8 @@ msgid ""
"2. You have not selected 'Percentage' option, but you have selected more "
"than 2 years."
msgstr ""
"2. Non hai selezionato l'opzione 'Percentuale', ma hai selezionato più di 2 "
"anni."
#. module: account
#: wizard_view:account.balance.account.balance.report,zero_years:0
@ -6203,46 +6224,49 @@ msgid ""
"credit/debit columns and % option.This can lead contents to be printed out "
"of the paper.Please try again."
msgstr ""
"Potresti aver selezionato le opzioni confronto per più di 1 anno con le "
"colonne credito/debito e % come opzione. Questo potrebbe far uscire i "
"contenuti dai margini di stampa. Controlla."
#. 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 ""
msgstr "Devi selezionare almeno 1 anno Fiscale. Riprova."
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Customize Report"
msgstr ""
msgstr "Rapporto Personalizzato"
#. module: account
#: field:report.aged.receivable,name:0
msgid "Month Range"
msgstr ""
msgstr "Intervallo del mese"
#. module: account
#: model:ir.actions.act_window,name:report_account.action_view_created_invoice_dashboard
msgid "Invoices Created Within Past 15 Days"
msgstr ""
msgstr "Fatture create negli ultimi 15 giorni"
#. module: account
#: model:ir.model,name:report_account.model_report_invoice_created
msgid "Report of Invoices Created within Last 15 days"
msgstr ""
msgstr "Rapporto delle fatture create negli ultimi 15 giorni"
#. module: account
#: view:report.invoice.created:0
msgid "Total Amount"
msgstr ""
msgstr "Importo Totale"
#. module: account
#: view:report.account.receivable:0
msgid "Accounts by type"
msgstr ""
msgstr "Conti per Tipo"
#. module: account
#: model:ir.model,name:report_account.model_report_aged_receivable
msgid "Aged Receivable Till Today"
msgstr ""
msgstr "Crediti passati fino ad oggi"
#. module: account
#: model:ir.model,name:report_account.model_report_account_receivable
@ -6252,44 +6276,44 @@ msgstr ""
#. module: account
#: field:temp.range,name:0
msgid "Range"
msgstr ""
msgstr "Intervallo"
#. 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 ""
msgstr "Modulo che aggiunge nuovi report basati sul modulo Conti (Account)"
#. module: account
#: model:ir.module.module,shortdesc:report_account.module_meta_information
msgid "Account Reporting - Reporting"
msgstr ""
msgstr "Resoconto - Rapporto"
#. 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 ""
msgstr "Saldo per Tipo Conto"
#. module: account
#: field:report.account.receivable,name:0
msgid "Week of Year"
msgstr ""
msgstr "Settimana dell'anno"
#. module: account
#: field:report.invoice.created,create_date:0
msgid "Create Date"
msgstr ""
msgstr "Data di Creazione"
#. module: account
#: model:ir.actions.act_window,name:report_account.action_aged_receivable_graph
#: view:report.aged.receivable:0
msgid "Aged Receivable"
msgstr ""
msgstr "Crediti in sospeso"
#. module: account
#: view:report.invoice.created:0
msgid "Untaxed Amount"
msgstr ""
msgstr "Importo non tassato"
#~ msgid "account.config.wizard"
#~ msgstr "account.config.wizard"

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 05:34+0000\n"
"PO-Revision-Date: 2010-08-29 10:26+0000\n"
"Last-Translator: Giedrius Slavinskas <giedrius.slavinskas@gmail.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-08-12 03:52+0000\n"
"X-Launchpad-Export-Date: 2010-08-30 03:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 05:34+0000\n"
"PO-Revision-Date: 2010-08-29 10:26+0000\n"
"Last-Translator: OpenERP Administrators <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-08-12 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-08-30 03:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: ASTRIT BOKSHI <astritbokshi@gmail.com>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 04:52+0000\n"
"PO-Revision-Date: 2010-08-29 09:31+0000\n"
"Last-Translator: bokshas <astritbokshi@gmail.com>\n"
"Language-Team: Albanian <sq@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-08-12 03:51+0000\n"
"X-Launchpad-Export-Date: 2010-08-30 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 05:19+0000\n"
"PO-Revision-Date: 2010-08-29 10:39+0000\n"
"Last-Translator: OpenERP Administrators <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-08-12 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-08-30 03:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@ -124,7 +124,7 @@ msgstr "Kvarvarande"
#: field:account.tax.template,base_sign:0
#: field:account.tax.template,ref_base_sign:0
msgid "Base Code Sign"
msgstr "Baskodsbelopp"
msgstr "Baskodstecken"
#. module: account
#: model:ir.actions.wizard,name:account.wizard_unreconcile_select
@ -1505,7 +1505,7 @@ msgstr ""
#. module: account
#: model:account.account.type,name:account.account_type_income
msgid "Income"
msgstr "Intäkt"
msgstr "Intäkter"
#. module: account
#: selection:account.bank.statement.line,type:0
@ -2636,7 +2636,7 @@ msgstr "Skapa faktura"
#. module: account
#: model:account.account.type,name:account.account_type_cash_equity
msgid "Equity"
msgstr "Värdeökning"
msgstr "Eget kapital"
#. module: account
#: field:wizard.company.setup,overdue_msg:0

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-11 04:39+0000\n"
"PO-Revision-Date: 2010-08-29 10:25+0000\n"
"Last-Translator: Omer Barlas <omer@barlas.com.tr>\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-08-12 03:54+0000\n"
"X-Launchpad-Export-Date: 2010-08-30 03:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account

File diff suppressed because it is too large Load Diff

View File

@ -18,11 +18,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
import datetime
from dateutil.relativedelta import relativedelta
from os.path import join as opj
from operator import itemgetter
from tools.translate import _
from osv import fields, osv
import netsvc
@ -51,44 +53,33 @@ class account_installer(osv.osv_memory):
_columns = {
# Accounting
'charts':fields.selection(_get_charts, 'Chart of Accounts',
required=True,
required=False,
help="Installs localized accounting charts to match as closely as "
"possible the accounting needs of your company based on your "
"country."),
'account_analytic_plans':fields.boolean('Multiple Analytic Plans',
help="Allows invoice lines to impact multiple analytic accounts "
"simultaneously."),
'account_payment':fields.boolean('Suppliers Payment Management',
help="Streamlines invoice payment and creates hooks to plug "
"automated payment systems in."),
'account_followup':fields.boolean('Followups Management',
help="Helps you generate reminder letters for unpaid invoices, "
"including multiple levels of reminding and customized "
"per-partner policies."),
'account_asset':fields.boolean('Assets Management',
help="Enables asset management in the accounting application, "
"including asset categories and usage periods."),
'account_voucher':fields.boolean('Voucher Management',
help="Account Voucher module includes all the basic requirements of "
"Voucher Entries for Bank, Cash, Sales, Purchase, Expanse, Contra, etc... "),
'account_voucher_payment':fields.boolean('Voucher and Reconcile Management',
help="Extension Account Voucher module includes allows to link payment / receipt "
"entries with voucher, also automatically reconcile during the payment and receipt entries."),
'date_start': fields.date('Start Date', required=True),
'date_stop': fields.date('End Date', required=True),
'period':fields.selection([('month','Monthly'), ('3months','3 Monthly')],
'Periods', required=True),
'bank_accounts_id': fields.one2many('account.bank.accounts.wizard', 'bank_account_id', 'Bank Accounts',required=True),
'sale_tax':fields.float('Sale Tax(%)'),
'purchase_tax':fields.float('Purchase Tax(%)')
'purchase_tax':fields.float('Purchase Tax(%)'),
'company_id': fields.many2one('res.company', 'Company'),
}
def _default_company(self, cr, uid, context={}):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
return False
_defaults = {
'date_start': lambda *a: time.strftime('%Y-01-01'),
'date_stop': lambda *a: time.strftime('%Y-12-31'),
'period':lambda *a:'month',
'sale_tax':lambda *a:0.0,
'purchase_tax':lambda *a:0.0,
#'charts':'configurable',
'company_id': _default_company,
'bank_accounts_id':_get_default_accounts
}
@ -103,11 +94,6 @@ class account_installer(osv.osv_memory):
return {}
def generate_configurable_chart(self, cr, uid, ids, context=None):
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_acc = self.pool.get('account.account')
obj_acc_tax = self.pool.get('account.tax')
obj_journal = self.pool.get('account.journal')
@ -116,6 +102,14 @@ class account_installer(osv.osv_memory):
obj_fiscal_position_template = self.pool.get('account.fiscal.position.template')
obj_fiscal_position = self.pool.get('account.fiscal.position')
data_pool = self.pool.get('ir.model.data')
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)
if context is None:
context = {}
company_id = self.pool.get('res.users').browse(cr, uid, [uid], context)[0].company_id
seq_journal = True
@ -233,10 +227,12 @@ class account_installer(osv.osv_memory):
vals_seq = {
'name': _('Bank Journal '),
'code': 'account.journal',
'prefix': 'BAN/',
'padding': 5
}
seq_id = obj_sequence.create(cr,uid,vals_seq)
#create the bank journal
#create the bank journals
vals_journal = {}
vals_journal['name']= _('Bank Journal ')
vals_journal['code']= _('BNK')
@ -252,9 +248,21 @@ class account_installer(osv.osv_memory):
obj_journal.create(cr,uid,vals_journal)
for val in record.bank_accounts_id:
if val.account_type == 'cash':type = cash_type_id
elif val.account_type == 'bank':type = bank_type_id
else:type = check_type_id
seq_prefix = None
seq_padding = 5
if val.account_type == 'cash':
type = cash_type_id
seq_prefix = "CSH/"
elif val.account_type == 'bank':
type = bank_type_id
seq_prefix = "BAN/"
elif val.account_type == 'check':
type = check_type_id
seq_prefix = "CHK/"
else:
type = check_type_id
seq_padding = None
vals_bnk = {'name': val.acc_name or '',
'currency_id': val.currency_id.id or False,
'code': str(110400 + code_cnt),
@ -266,6 +274,8 @@ class account_installer(osv.osv_memory):
vals_seq_child = {
'name': _(vals_bnk['name']),
'code': 'account.journal',
'prefix': seq_prefix,
'padding': seq_padding
}
seq_id = obj_sequence.create(cr, uid, vals_seq_child)
@ -286,7 +296,7 @@ class account_installer(osv.osv_memory):
code_cnt += 1
#reactivate the parent_store functionnality on account_account
#reactivate the parent_store functionality on account_account
self.pool._init = False
self.pool.get('account.account')._parent_store_compute(cr)
@ -302,12 +312,24 @@ class account_installer(osv.osv_memory):
data_id = mod_obj.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_sp_journal_view')])
data = mod_obj.browse(cr, uid, data_id[0])
view_id = data.res_id
seq_id = obj_sequence.search(cr,uid,[('name','=','Account Journal')])[0]
if 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_sale = {
'name': 'Sale Journal',
'code': 'account.journal',
'prefix': '%(year)s/',
'padding': 3
}
seq_id_sale = obj_sequence.create(cr, uid, seq_sale)
seq_purchase = {
'name': 'Purchase Journal',
'code': 'account.journal',
'prefix': '%(year)s/',
'padding': 3
}
seq_id_purchase = obj_sequence.create(cr, uid, seq_purchase)
else:
seq_id_sale = seq_id
seq_id_purchase = seq_id
@ -338,6 +360,41 @@ class account_installer(osv.osv_memory):
obj_journal.create(cr,uid,vals_journal)
# Creating Journals Sales Refund and Purchase Refund
vals_journal={}
data_id = mod_obj.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_sp_refund_journal_view')])
data = mod_obj.browse(cr, uid, data_id[0])
view_id = data.res_id
seq_id_sale_refund = seq_id_sale
seq_id_purchase_refund = seq_id_purchase
vals_journal['view_id'] = view_id
#Sales Refund Journal
vals_journal['name'] = _('Sales Refund Journal')
vals_journal['type'] = 'sale_refund'
vals_journal['code'] = _('SCNJ')
vals_journal['sequence_id'] = seq_id_sale_refund
if obj_multi.property_account_receivable:
vals_journal['default_credit_account_id'] = acc_template_ref[obj_multi.property_account_income_categ.id]
vals_journal['default_debit_account_id'] = acc_template_ref[obj_multi.property_account_income_categ.id]
obj_journal.create(cr,uid,vals_journal)
# Purchase Refund Journal
vals_journal['name'] = _('Purchase Refund Journal')
vals_journal['type'] = 'purchase_refund'
vals_journal['code'] = _('ECNJ')
vals_journal['sequence_id'] = seq_id_purchase_refund
if obj_multi.property_account_payable:
vals_journal['default_credit_account_id'] = acc_template_ref[obj_multi.property_account_expense_categ.id]
vals_journal['default_debit_account_id'] = acc_template_ref[obj_multi.property_account_expense_categ.id]
obj_journal.create(cr,uid,vals_journal)
# Bank Journals
view_id_cash = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Bank/Cash Journal View')])[0] #TOFIX: Why put fixed name ?
view_id_cur = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Bank/Cash Journal (Multi-Currency) View')])[0] #TOFIX: why put fixed name?
@ -354,8 +411,10 @@ class account_installer(osv.osv_memory):
('property_account_expense_categ','product.category','account.account'),
('property_account_income_categ','product.category','account.account'),
('property_account_expense','product.template','account.account'),
('property_account_income','product.template','account.account')
('property_account_income','product.template','account.account'),
('property_reserve_and_surplus_account','res.company','account.account'),
]
for record in todo_list:
r = []
r = property_obj.search(cr, uid, [('name','=', record[0] ),('company_id','=',company_id.id)])
@ -367,6 +426,7 @@ class account_installer(osv.osv_memory):
'fields_id': field[0],
'value': account and 'account.account,'+str(acc_template_ref[account.id]) or False,
}
if r:
#the property exist: modify it
property_obj.write(cr, uid, r, vals)
@ -405,10 +465,15 @@ class account_installer(osv.osv_memory):
obj_ac_fp.create(cr, uid, vals_acc)
def execute(self, cr, uid, ids, context=None):
if context is None:
context = {}
res_obj = self.pool.get('account.fiscalyear')
data_pool = self.pool.get('ir.model.data')
obj_acc = self.pool.get('account.account')
super(account_installer, self).execute(cr, uid, ids, context=context)
record = self.browse(cr, uid, ids, context=context)[0]
company_id = self.pool.get('res.users').browse(cr,uid,[uid],context)[0].company_id
for res in self.read(cr,uid,ids):
company_id = self.pool.get('res.users').browse(cr, uid, [uid], context)[0].company_id
for res in self.read(cr, uid, ids):
if record.charts == 'configurable':
mod_obj = self.pool.get('ir.model.data')
fp = tools.file_open(opj('account','configurable_account_chart.xml'))
@ -423,24 +488,24 @@ class account_installer(osv.osv_memory):
tax_val = {}
default_tax = []
pur_tax_parent = mod_obj._get_id(cr, uid, 'account', 'vat_code_base_purchases')
pur_tax_parent = mod_obj._get_id(cr, uid, 'account', 'tax_code_base_purchases')
pur_tax_parent_id = mod_obj.read(cr, uid, [pur_tax_parent], ['res_id'])[0]['res_id']
sal_tax_parent = mod_obj._get_id(cr, uid, 'account', 'vat_code_base_sales')
sal_tax_parent = mod_obj._get_id(cr, uid, 'account', 'tax_code_base_sales')
sal_tax_parent_id = mod_obj.read(cr, uid, [sal_tax_parent], ['res_id'])[0]['res_id']
if s_tax*100 > 0.0:
vals_tax_code = {
'name': 'VAT%s%%'%(s_tax*100),
'code': 'VAT%s%%'%(s_tax*100),
'name': 'TAX%s%%'%(s_tax*100),
'code': 'TAX%s%%'%(s_tax*100),
'company_id': company_id.id,
'sign': 1,
'parent_id':sal_tax_parent_id
}
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),
{'name':'TAX%s%%'%(s_tax*100),
'description':'TAX%s%%'%(s_tax*100),
'amount':s_tax,
'base_code_id':new_tax_code,
'tax_code_id':new_tax_code,
@ -450,16 +515,16 @@ class account_installer(osv.osv_memory):
default_tax.append(('taxes_id',sales_tax))
if p_tax*100 > 0.0:
vals_tax_code = {
'name': 'VAT%s%%'%(p_tax*100),
'code': 'VAT%s%%'%(p_tax*100),
'name': 'TAX%s%%'%(p_tax*100),
'code': 'TAX%s%%'%(p_tax*100),
'company_id': company_id.id,
'sign': 1,
'parent_id':pur_tax_parent_id
}
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),
{'name':'TAX%s%%'%(p_tax*100),
'description':'TAX%s%%'%(p_tax*100),
'amount':p_tax,
'base_code_id':new_tax_code,
'tax_code_id':new_tax_code,
@ -479,11 +544,11 @@ class account_installer(osv.osv_memory):
if int(name) != int(res['date_stop'][:4]):
name = res['date_start'][:4] +'-'+ res['date_stop'][:4]
code = res['date_start'][2:4] +'-'+ res['date_stop'][2:4]
res_obj = self.pool.get('account.fiscalyear')
vals = {'name':name,
'code':code,
'date_start':res['date_start'],
'date_stop':res['date_stop'],
vals = {'name': name,
'code': code,
'date_start': res['date_start'],
'date_stop': res['date_stop'],
'company_id': res['company_id']
}
period_id = res_obj.create(cr, uid, vals, context=context)
if res['period'] == 'month':
@ -491,6 +556,15 @@ class account_installer(osv.osv_memory):
elif res['period'] == '3months':
res_obj.create_period3(cr, uid, [period_id])
# #fially inactive the demo chart of accounts
# data_id = data_pool.search(cr, uid, [('model','=','account.account'), ('name','=','chart0')])
# if data_id:
# data = data_pool.browse(cr, uid, data_id[0])
# account_id = data.res_id
# acc_ids = obj_acc._get_children_and_consol(cr, uid, [account_id])
# if acc_ids:
# cr.execute("update account_account set active='f' where id in " + str(tuple(acc_ids)))
def modules_to_install(self, cr, uid, ids, context=None):
modules = super(account_installer, self).modules_to_install(
cr, uid, ids, context=context)
@ -501,20 +575,46 @@ class account_installer(osv.osv_memory):
'Installing chart of accounts %s'%chart)
return modules | set([chart])
account_installer()
class account_bank_accounts_wizard(osv.osv_memory):
_name='account.bank.accounts.wizard'
_columns = {
'acc_name':fields.char('Account Name.', size=64, required=True),
'bank_account_id':fields.many2one('wizard.multi.charts.accounts', 'Bank Account', required=True),
'currency_id':fields.many2one('res.currency', 'Currency'),
'account_type':fields.selection([('cash','Cash'),('check','Check'),('bank','Bank')], 'Type', size=32),
'acc_name': fields.char('Account Name.', size=64, required=True),
'bank_account_id': fields.many2one('wizard.multi.charts.accounts', 'Bank Account', required=True),
'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."),
'account_type': fields.selection([('cash','Cash'),('check','Check'),('bank','Bank')], 'Account Type', size=32),
}
_defaults = {
'currency_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.currency_id.id,
}
account_bank_accounts_wizard()
class account_installer_modules(osv.osv_memory):
_name = 'account.installer.modules'
_inherit = 'res.config.installer'
_columns = {
# Accounting
'account_analytic_plans':fields.boolean('Multiple Analytic Plans',
help="Allows invoice lines to impact multiple analytic accounts "
"simultaneously."),
'account_payment':fields.boolean('Suppliers Payment Management',
help="Streamlines invoice payment and creates hooks to plug "
"automated payment systems in."),
'account_followup':fields.boolean('Followups Management',
help="Helps you generate reminder letters for unpaid invoices, "
"including multiple levels of reminding and customized "
"per-partner policies."),
'account_voucher':fields.boolean('Voucher Management',
help="Account Voucher module includes all the basic requirements of "
"Voucher Entries for Bank, Cash, Sales, Purchase, Expanse, Contra, etc... "),
# 'account_voucher_payment':fields.boolean('Voucher and Reconcile Management',
# help="Extension Account Voucher module includes allows to link payment / receipt "
# "entries with voucher, also automatically reconcile during the payment and receipt entries."),
}
account_installer_modules()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -219,7 +219,7 @@ class account_invoice(osv.osv):
_name = "account.invoice"
_description = 'Invoice'
_order = "id"
_order = "id desc"
_columns = {
'name': fields.char('Description', size=64, select=True, readonly=True, states={'draft':[('readonly',False)]}),
@ -231,8 +231,8 @@ class account_invoice(osv.osv):
('in_refund','Supplier Refund'),
],'Type', readonly=True, select=True, change_default=True),
# 'number': fields.related('move_id','name', type='char', readonly=True, size=64, relation='account.move', store=True, string='Number'),
'number': fields.char('Invoice Number', size=32, readonly=True, help="Unique number of the invoice, computed automatically when the invoice is created."),
'number': fields.related('move_id','name', type='char', readonly=True, size=64, relation='account.move', store=True, string='Number'),
'internal_number': fields.char('Invoice Number', size=32, readonly=True, help="Unique number of the invoice, computed automatically when the invoice is created."),
'reference': fields.char('Invoice Reference', size=64, help="The partner reference of this invoice."),
'reference_type': fields.selection(_get_reference_type, 'Reference Type',
required=True, readonly=True, states={'draft':[('readonly',False)]}),
@ -268,7 +268,7 @@ class account_invoice(osv.osv):
'invoice_line': fields.one2many('account.invoice.line', 'invoice_id', 'Invoice Lines', readonly=True, states={'draft':[('readonly',False)]}),
'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."),
'move_id': fields.many2one('account.move', 'Journal Entry', readonly=True, help="Link to the automatically generated Journal Items."),
'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),
@ -299,9 +299,9 @@ class account_invoice(osv.osv):
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, None, 50), # Check if we can remove ?
'account.move.line': (_get_invoice_from_line, None, 50),
'account.move.reconcile': (_get_invoice_from_reconcile, None, 50),
}, help="The Ledger Postings of the invoice have been reconciled with Ledger Postings of the payment(s)."),
}, help="The Journal Entry of the invoice have been totally reconciled with one or several Journal Entries of payment."),
'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',
help='Bank Account Number, Company bank account if Invoice is customer or supplier refund, otherwise Parner bank account number.', readonly=True, states={'draft':[('readonly',False)]}),
help='Bank Account Number, Company bank account if Invoice is customer or supplier refund, otherwise Partner bank account number.', readonly=True, states={'draft':[('readonly',False)]}),
'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={
@ -313,19 +313,19 @@ class account_invoice(osv.osv):
},
help="Remaining amount due."),
'payment_ids': fields.function(_compute_lines, method=True, relation='account.move.line', type="many2many", string='Payments'),
'move_name': fields.char('Ledger Posting', size=64, readonly=True, states={'draft':[('readonly',False)]}),
'move_name': fields.char('Journal Entry', size=64, readonly=True, states={'draft':[('readonly',False)]}),
'user_id': fields.many2one('res.users', 'Salesman', readonly=True, states={'draft':[('readonly',False)]}),
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position', readonly=True, states={'draft':[('readonly',False)]})
}
_defaults = {
'type': _get_type,
#'date_invoice': lambda *a: time.strftime('%Y-%m-%d'),
'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': 'none',
'check_total': 0.0,
'internal_number': False,
'user_id': lambda s, cr, u, c: u,
}
@ -371,9 +371,6 @@ class account_invoice(osv.osv):
osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
return True
# def get_invoice_address(self, cr, uid, ids):
# res = self.pool.get('res.partner').address_get(cr, uid, [part], ['invoice'])
# return [{}]
def onchange_partner_id(self, cr, uid, ids, type, partner_id,\
date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False):
invoice_addr_id = False
@ -393,21 +390,23 @@ class account_invoice(osv.osv):
p = self.pool.get('res.partner').browse(cr, uid, partner_id)
if company_id:
if p.property_account_receivable.company_id.id != company_id and p.property_account_payable.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(partner_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(partner_id)+''),('company_id','=',company_id)])
property_obj = self.pool.get('ir.property')
rec_pro_id = property_obj.search(cr,uid,[('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(partner_id)+''),('company_id','=',company_id)])
pay_pro_id = property_obj.search(cr,uid,[('name','=','property_account_payable'),('res_id','=','res.partner,'+str(partner_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 = property_obj.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 = property_obj.search(cr,uid,[('name','=','property_account_payable'),('company_id','=',company_id)])
rec_line_data = property_obj.read(cr,uid,rec_pro_id,['name','value','res_id'])
pay_line_data = property_obj.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 pay_res_id:
raise osv.except_osv(_('Configration Error !'),
raise osv.except_osv(_('Configuration 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])
account_obj = self.pool.get('account.account')
rec_obj_acc = account_obj.browse(cr, uid, [rec_res_id])
pay_obj_acc = account_obj.browse(cr, uid, [pay_res_id])
p.property_account_receivable = rec_obj_acc[0]
p.property_account_payable = pay_obj_acc[0]
@ -449,7 +448,7 @@ class account_invoice(osv.osv):
if curr_id and company_id:
currency = self.pool.get('res.currency').browse(cr, uid, curr_id)
if currency.company_id.id != company_id:
raise osv.except_osv(_('Configration Error !'),
raise osv.except_osv(_('Configuration Error !'),
_('Can not select currency that is not related to current company.\nPlease select accordingly !.'))
return {}
@ -462,7 +461,7 @@ class account_invoice(osv.osv):
date_invoice = time.strftime('%Y-%m-%d')
pterm_list = pt_obj.compute(cr, uid, payment_term_id, value=1, date_ref=date_invoice)
if pterm_list:
pterm_list = [line[0] for line in pterm_list]
pterm_list.sort()
@ -487,41 +486,43 @@ 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)])
property_obj = self.pool.get('ir.property')
rec_pro_id = property_obj.search(cr, uid, [('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
pay_pro_id = property_obj.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 = property_obj.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 = property_obj.search(cr, uid, [('name','=','property_account_payable'),('company_id','=',company_id)])
rec_line_data = property_obj.read(cr, uid, rec_pro_id, ['name','value','res_id'])
pay_line_data = property_obj.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:
raise osv.except_osv(_('Configration Error !'),
if not rec_res_id and not pay_res_id:
raise osv.except_osv(_('Configuration Error !'),
_('Can not find account chart for this company, Please Create account.'))
if type in ('out_invoice', 'out_refund'):
acc_id = rec_res_id
else:
acc_id = pay_res_id
val= {'account_id': acc_id}
account_obj = self.pool.get('account.account')
if ids:
if company_id:
inv_obj = self.browse(cr,uid,ids)
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 = account_obj.search(cr, uid, [('name','=',line.account_id.name),('company_id','=',company_id)])
if not result_id:
raise osv.except_osv(_('Configration Error !'),
raise osv.except_osv(_('Configuration 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]})
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 = account_obj.browse(cr, uid, inv_line[2]['account_id'])
if obj_l.company_id.id != company_id:
raise osv.except_osv(_('Configration Error !'),
raise osv.except_osv(_('Configuration Error !'),
_('invoice line account company is not match with invoice company.'))
else:
continue
@ -534,22 +535,21 @@ class account_invoice(osv.osv):
if journal_ids:
val['journal_id'] = journal_ids[0]
else:
raise osv.except_osv(_('Configration Error !'),
_('Can not find account journal for this company in invoice, Please Create journal.'))
raise osv.except_osv(_('Configuration Error !'), _('Can\'t find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration\Financial Accounting\Accounts\Journals.' % (journal_type)))
dom = {'journal_id': [('id', 'in', journal_ids)]}
else:
journal_ids = obj_journal.search(cr, uid, [])
if currency_id and company_id:
currency = self.pool.get('res.currency').browse(cr, uid, currency_id)
if currency.company_id.id != company_id:
if currency.company_id and currency.company_id.id != company_id:
val['currency_id'] = False
else:
val['currency_id'] = currency.id
if company_id:
company = self.pool.get('res.company').browse(cr, uid, company_id)
if company.currency_id.company_id.id != company_id:
if company.currency_id.company_id and company.currency_id.company_id.id != company_id:
val['currency_id'] = False
else:
val['currency_id'] = company.currency_id.id
@ -591,15 +591,22 @@ class account_invoice(osv.osv):
res = map(itemgetter(0), cr.fetchall())
return res
def copy(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
default = default.copy()
default.update({'state':'draft', 'number':False, 'move_id':False, 'move_name':False,})
def copy(self, cr, uid, id, default={}, context=None):
default.update({
'state':'draft',
'number':False,
'move_id':False,
'move_name':False,
'internal_number': False,
})
if 'date_invoice' not in default:
default['date_invoice'] = False
default.update({
'date_invoice':False
})
if 'date_due' not in default:
default['date_due'] = False
default.update({
'date_due':False
})
return super(account_invoice, self).copy(cr, uid, id, default, context)
def test_paid(self, cr, uid, ids, *args):
@ -625,7 +632,6 @@ class account_invoice(osv.osv):
ait_obj.create(cr, uid, taxe)
# Update the stored value (fields.function), so we write to trigger recompute
self.pool.get('account.invoice').write(cr, uid, ids, {'invoice_line':[]}, context=context)
# self.pool.get('account.invoice').write(cr, uid, ids, {}, context=context)
return True
def button_compute(self, cr, uid, ids, context=None, set_total=False):
@ -769,7 +775,7 @@ 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:
if not inv.journal_id.sequence_id:
raise osv.except_osv(_('Error !'), _('Please define sequence on invoice journal'))
if not inv.invoice_line:
raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.'))
@ -868,7 +874,7 @@ class account_invoice(osv.osv):
line = self.group_lines(cr, uid, iml, line, inv)
journal_id = inv.journal_id.id #self._get_journal(cr, uid, {'type': inv['type']})
journal_id = inv.journal_id.id
journal = self.pool.get('account.journal').browse(cr, uid, journal_id)
if journal.centralisation:
raise osv.except_osv(_('UserError'),
@ -877,10 +883,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,
'ref': inv.reference and inv.reference or inv.name,
'line_id': line,
'journal_id': journal_id,
'date': date,
'type': entry_type,
'narration':inv.comment
}
@ -927,48 +933,39 @@ class account_invoice(osv.osv):
}
def action_number(self, cr, uid, ids, *args):
# #TODO: not correct fix but required a frech values before reading it.
# self.write(cr, uid, ids, {})
#
cr.execute('SELECT id, type, number, move_id, reference ' \
'FROM account_invoice ' \
'WHERE id IN ('+','.join(map(str,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', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id})
else:
number = self.pool.get('ir.sequence').get(cr, uid, 'account.invoice.' + invtype)
#TODO: not correct fix but required a frech values before reading it.
self.write(cr, uid, ids, {})
if not number:
raise osv.except_osv(_('Warning !'), _('There is no active invoice sequence defined for the journal !'))
if invtype in ('in_invoice', 'in_refund'):
ref = reference
else:
ref = self._convert_ref(cr, uid, number)
cr.execute('UPDATE account_invoice SET number=%s ' \
'WHERE id=%s', (number, id))
cr.execute('UPDATE account_move SET ref=%s ' \
'WHERE id=%s AND (ref is null OR ref = \'\')',
for obj_inv in self.browse(cr, uid, ids):
id = obj_inv.id
invtype = obj_inv.type
number = obj_inv.number
move_id = obj_inv.move_id and obj_inv.move_id.id or False
reference = obj_inv.reference or ''
self.write(cr, uid, ids, {'internal_number':number})
if invtype in ('in_invoice', 'in_refund'):
ref = reference
else:
ref = self._convert_ref(cr, uid, number)
cr.execute('UPDATE account_move SET ref=%s ' \
'WHERE id=%s AND (ref is null OR ref = \'\')',
(ref, move_id))
cr.execute('UPDATE account_move_line SET ref=%s ' \
'WHERE move_id=%s AND (ref is null OR ref = \'\')',
(ref, move_id))
cr.execute('UPDATE account_analytic_line SET ref=%s ' \
'FROM account_move_line ' \
'WHERE account_move_line.move_id = %s ' \
'AND account_analytic_line.move_id = account_move_line.id',
(ref, move_id))
cr.execute('UPDATE account_move_line SET ref=%s ' \
'WHERE move_id=%s AND (ref is null OR ref = \'\')',
(ref, move_id))
cr.execute('UPDATE account_analytic_line SET ref=%s ' \
'FROM account_move_line ' \
'WHERE account_move_line.move_id = %s ' \
'AND account_analytic_line.move_id = account_move_line.id',
(ref, move_id))
for inv_id, name in self.name_get(cr, uid, [id]):
message = _('Invoice ') + " '" + name + "' "+ _("is validated.")
self.log(cr, uid, inv_id, message)
return True
def action_cancel(self, cr, uid, ids, *args):
@ -1034,25 +1031,14 @@ class account_invoice(osv.osv):
for line in lines:
del line['id']
del line['invoice_id']
if 'account_id' in line:
line['account_id'] = line.get('account_id', False) and line['account_id'][0]
if 'product_id' in line:
line['product_id'] = line.get('product_id', False) and line['product_id'][0]
if 'uos_id' in line:
line['uos_id'] = line.get('uos_id', False) and line['uos_id'][0]
for field in ('company_id', 'partner_id', 'account_id', 'product_id',
'uos_id', 'account_analytic_id', 'tax_code_id', 'base_code_id'):
line[field] = line.get(field, False) and line[field][0]
if 'invoice_line_tax_id' in line:
line['invoice_line_tax_id'] = [(6,0, line.get('invoice_line_tax_id', [])) ]
if 'account_analytic_id' in line:
line['account_analytic_id'] = line.get('account_analytic_id', False) and line['account_analytic_id'][0]
if 'tax_code_id' in line :
if isinstance(line['tax_code_id'],tuple) and len(line['tax_code_id']) >0 :
line['tax_code_id'] = line['tax_code_id'][0]
if 'base_code_id' in line :
if isinstance(line['base_code_id'],tuple) and len(line['base_code_id']) >0 :
line['base_code_id'] = line['base_code_id'][0]
return map(lambda x: (0,0,x), lines)
def refund(self, cr, uid, ids, date=None, period_id=None, description=None):
def refund(self, cr, uid, ids, date=None, period_id=None, description=None, journal_id=None):
invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'address_contact_id', 'address_invoice_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line', 'journal_id'])
new_ids = []
@ -1066,17 +1052,19 @@ class account_invoice(osv.osv):
'in_refund': 'in_invoice', # Supplier Refund
}
invoice_lines = self.pool.get('account.invoice.line').read(cr, uid, invoice['invoice_line'])
invoice_lines = self._refund_cleanup_lines(cr, uid, invoice_lines)
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':
if journal_id:
refund_journal_ids = [journal_id]
elif 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({
@ -1250,7 +1238,7 @@ class account_invoice_line(osv.osv):
'quantity': fields.float('Quantity', required=True),
'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Account')),
'invoice_line_tax_id': fields.many2many('account.tax', 'account_invoice_line_tax', 'invoice_line_id', 'tax_id', 'Taxes', domain=[('parent_id','=',False)]),
'note': fields.text('Notes', translate=True),
'note': fields.text('Notes'),
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company',store=True),
'partner_id': fields.related('invoice_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True)
@ -1281,7 +1269,8 @@ class account_invoice_line(osv.osv):
else:
return {'value': {'price_unit': 0.0, 'categ_id': False}, 'domain':{'product_uom':[]}}
part = self.pool.get('res.partner').browse(cr, uid, partner_id)
fpos = fposition_id and self.pool.get('account.fiscal.position').browse(cr, uid, fposition_id) or False
fpos_obj = self.pool.get('account.fiscal.position')
fpos = fposition_id and fpos_obj.browse(cr, uid, fposition_id) or False
if part.lang:
context.update({'lang': part.lang})
@ -1289,12 +1278,14 @@ 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)])
property_obj = self.pool.get('ir.property')
account_obj = self.pool.get('account.account')
in_pro_id = property_obj.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 = property_obj.search(cr, uid, [('name','=','property_account_income_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
exp_pro_id = property_obj.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 = property_obj.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
@ -1304,7 +1295,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 = account_obj.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
@ -1313,7 +1304,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 = account_obj.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
@ -1325,17 +1316,14 @@ class account_invoice_line(osv.osv):
else:
app_acc_in = in_acc_cate
app_acc_exp = ex_acc_cate
# else:
# 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 = account_obj.search(cr, uid, [('name','=',app_acc_in.name),('company_id','=',company_id)])
exp_res_id = account_obj.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 !'),
raise osv.except_osv(_('Configuration 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 = account_obj.browse(cr, uid, in_res_id)
exp_obj_acc = account_obj.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]
@ -1344,34 +1332,34 @@ class account_invoice_line(osv.osv):
res.categ_id.property_account_expense_categ = exp_obj_acc[0]
if type in ('out_invoice','out_refund'):
a = res.product_tmpl_id.property_account_income.id
a = res.product_tmpl_id.property_account_income.id
if not a:
a = res.categ_id.property_account_income_categ.id
else:
a = res.product_tmpl_id.property_account_expense.id
a = res.product_tmpl_id.property_account_expense.id
if not a:
a = res.categ_id.property_account_expense_categ.id
a = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, a)
a = fpos_obj.map_account(cr, uid, fpos, a)
if a:
result['account_id'] = a
taxep=None
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)
tax_id = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
tax_id = fpos_obj.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)
tax_id = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
tax_id = fpos_obj.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)
result.update(to_update)
else:
result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id})
if not name:
result['name'] = res.partner_ref
# if not name:
result['name'] = res.partner_ref
domain = {}
result['uos_id'] = res.uom_id.id or uom or False
@ -1380,20 +1368,15 @@ class account_invoice_line(osv.osv):
if res2 :
domain = {'uos_id':[('category_id','=',res2 )]}
prod_pool=self.pool.get('product.product')
result['categ_id'] = res.categ_id.id
res_final = {'value':result, 'domain':domain}
if not company_id and not currency_id:
if not company_id or not currency_id:
return res_final
company = self.pool.get('res.company').browse(cr, uid, company_id)
currency = self.pool.get('res.currency').browse(cr, uid, currency_id)
if not currency.company_id.id == company.id:
raise osv.except_osv(_('Configration Error !'),
_('Can not select currency that is not related to any company.\nPlease select accordingly !.'))
if company.currency_id.id != currency.id:
new_price = res_final['value']['price_unit'] * currency.rate
res_final['value']['price_unit'] = new_price
@ -1513,12 +1496,18 @@ class account_invoice_tax(osv.osv):
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
company_currency = False
tax_amount = self.read(cr, uid, ids[0], ['tax_amount'])['tax_amount']
tax_sign=1
if tax_amount < 0:
tax_sign = -1
elif tax_amount == 0:
tax_sign = 0
if company_id:
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}}
amount = cur_obj.compute(cr, uid, currency_id, company_currency, amount*tax_sign, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False)
return {'value': {'tax_amount': amount}}
_order = 'sequence'
_defaults = {

View File

@ -187,8 +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')
'last_reconciliation_date': fields.datetime('Last Reconciliation Date', help='Date on which the partner accounting entries were reconciled last time')
}
res_partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -63,7 +63,7 @@
<!--
Partners Extension
-->
-->
<record id="view_partner_property_form" model="ir.ui.view">
<field name="name">res.partner.property.form.inherit</field>
@ -130,8 +130,8 @@
<act_window
id="action_analytic_open"
name="Analytic Accounts"
res_model="account.analytic.account"
domain="[('partner_id','=',active_id)]"
res_model="account.analytic.account"
context="{'search_default_partner_id':[active_id]}"
src_model="res.partner"
view_type="form"
view_mode="tree,form,graph,calendar"/>

View File

@ -1,21 +1,21 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!--
Process
<!--
Process
-->
<record id="process_process_invoiceprocess0" model="process.process">
<field eval="1" name="active"/>
<field name="model_id" ref="account.model_account_invoice"/>
<field eval="&quot;&quot;&quot;Customer Invoice&quot;&quot;&quot;" name="name"/>
</record>
<!--
<!--
Process Node
-->
<record id="process_node_analytic0" model="process.node">
<field name="menu_id" ref="account.account_analytic_def_account"/>
<field name="model_id" ref="analytic.model_account_analytic_account"/>
@ -26,7 +26,7 @@
<field eval="&quot;&quot;&quot;object.state in ('draft', 'open', 'pending', 'close')&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_draftinvoices0" model="process.node">
<field name="menu_id" ref="account.menu_action_invoice_tree1"/>
<field name="model_id" ref="account.model_account_invoice"/>
@ -37,7 +37,7 @@
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_invoiceinvoice0" model="process.node">
<field name="menu_id" ref="account.menu_finance_receivables"/>
<field name="model_id" ref="account.model_account_invoice"/>
@ -48,7 +48,7 @@
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_accountingentries0" model="process.node">
<field name="menu_id" ref="account.menu_action_move_journal_line_form"/>
<field name="model_id" ref="account.model_account_move"/>
@ -58,7 +58,7 @@
<field name="process_id" ref="process_process_invoiceprocess0"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_bankstatement0" model="process.node">
<field name="menu_id" ref="account.menu_bank_statement_tree"/>
<field name="model_id" ref="account.model_account_bank_statement"/>
@ -70,7 +70,7 @@
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_paymententries0" model="process.node">
<field name="menu_id" ref="account.menu_action_move_journal_line_form"/>
<field name="model_id" ref="account.model_account_move_line"/>
@ -81,7 +81,7 @@
<field eval="&quot;&quot;&quot;object.state in ('draft', 'valid')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_reconciliation0" model="process.node">
<field name="menu_id" ref="account.menu_eaction_account_moves_all"/>
<field name="model_id" ref="account.model_account_move_reconcile"/>
@ -92,7 +92,7 @@
<field eval="&quot;&quot;&quot;object.state=='valid'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_paidinvoice0" model="process.node">
<field name="menu_id" ref="account.menu_action_invoice_tree1"/>
<field name="model_id" ref="account.model_account_invoice"/>
@ -103,7 +103,7 @@
<field eval="&quot;&quot;&quot;object.state=='paid'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_accountingstatemententries0" model="process.node">
<field name="menu_id" ref="account.menu_eaction_account_moves_all"/>
<field name="model_id" ref="account.model_account_move_line"/>
@ -115,20 +115,16 @@
<field eval="&quot;&quot;&quot;object.state in ('draft', 'valid')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<!--
<!--
Process Transition
-->
<record id="res_roles_invoice0" model="res.roles">
<field eval="&quot;&quot;&quot;Invoice&quot;&quot;&quot;" name="name"/>
</record>
<!-- <record id="account.t5" model="workflow.transition">-->
<!-- <field name="role_id" ref="res_roles_invoice0"/>-->
<!-- </record>-->
<record id="process_transition_confirmstatementfromdraft0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
@ -137,7 +133,7 @@
<field model="process.node" name="target_node_id" ref="process_node_accountingstatemententries0"/>
<field model="process.node" name="source_node_id" ref="account.process_node_draftstatement0"/>
</record>
<record id="process_transition_analyticinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
@ -146,7 +142,7 @@
<field model="process.node" name="target_node_id" ref="process_node_draftinvoices0"/>
<field model="process.node" name="source_node_id" ref="process_node_analytic0"/>
</record>
<record id="process_transition_customerinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
@ -156,7 +152,7 @@
<field model="process.node" name="source_node_id" ref="process_node_draftinvoices0"/>
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
</record>
<record id="process_transition_validentries0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
@ -165,7 +161,7 @@
<field model="process.node" name="target_node_id" ref="process_node_accountingentries0"/>
<field model="process.node" name="source_node_id" ref="process_node_invoiceinvoice0"/>
</record>
<record id="process_transition_entriesreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
@ -174,7 +170,7 @@
<field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
<field model="process.node" name="source_node_id" ref="process_node_accountingentries0"/>
</record>
<record id="process_transition_statemententries0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
@ -183,7 +179,7 @@
<field model="process.node" name="target_node_id" ref="process_node_paymententries0"/>
<field model="process.node" name="source_node_id" ref="process_node_bankstatement0"/>
</record>
<record id="process_transition_paymentreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
@ -192,7 +188,7 @@
<field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
<field model="process.node" name="source_node_id" ref="process_node_paymententries0"/>
</record>
<record id="process_transition_reconcilepaid0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
@ -201,17 +197,17 @@
<field model="process.node" name="target_node_id" ref="process_node_paidinvoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_reconciliation0"/>
</record>
<!--
<!--
Process Action
-->
<record id="process_transition_action_createentries0" model="process.transition.action">
<field eval="&quot;&quot;&quot;action_move_create&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Create entry&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_customerinvoice0"/>
</record>
</data>
</openerp>

View File

@ -3,32 +3,15 @@
<data>
<report auto="False" id="analytic_journal_print" menu="False" model="account.analytic.journal" name="account.analytic.account.journal" rml="account/project/report/analytic_journal.rml" string="Analytic Journal"/>
<!-- <wizard id="account_analytic_account_journal_report" keyword="client_print_multi" model="account.analytic.journal" name="account.analytic.account.journal.report" string="Analytic Journal"/>-->
<report auto="False" id="account_analytic_account_balance" menu="False" model="account.analytic.account" name="account.analytic.account.balance" rml="account/project/report/analytic_balance.rml" string="Analytic Balance"/>
<!--<wizard id="account_analytic_account_balance_report" keyword="client_print_multi" model="account.analytic.account" name="account.analytic.account.balance.report" string="Analytic Balance"/> -->
<report auto="False" id="account_analytic_account_inverted_balance" menu="False" model="account.analytic.account" name="account.analytic.account.inverted.balance" rml="account/project/report/inverted_analytic_balance.rml" string="Inverted Analytic Balance"/>
<!-- <wizard id="account_analytic_account_inverted_balance_report" keyword="client_print_multi" model="account.analytic.account" name="account.analytic.account.inverted.balance.report" string="Inverted Analytic Balance"/>-->
<report auto="False" id="account_analytic_account_cost_ledger" menu="False" model="account.analytic.account" name="account.analytic.account.cost_ledger" rml="account/project/report/cost_ledger.rml" string="Cost Ledger"/>
<!-- <wizard id="account_analytic_account_cost_ledger_report" keyword="client_print_multi" model="account.analytic.account" name="account.analytic.account.cost_ledger.report" string="Cost Ledger"/>-->
<report auto="False" id="account_analytic_account_quantity_cost_ledger" menu="False" model="account.analytic.account" name="account.analytic.account.quantity_cost_ledger" rml="account/project/report/quantity_cost_ledger.rml" string="Cost Ledger (Only quantities)"/>
<!-- <wizard id="account_analytic_account_quantity_cost_ledger_report" keyword="client_print_multi" model="account.analytic.account" name="account.analytic.account.quantity_cost_ledger.report" string="Cost Ledger (Only quantities)"/>-->
<report auto="False" id="account_analytic_account_analytic_check" menu="False" model="account.account" name="account.analytic.account.analytic.check" rml="account/project/report/analytic_check.rml" string="Analytic Check"/>
<!-- <wizard id="account_analytic_account_analytic_check_report" keyword="client_print_multi" model="account.account" name="account.analytic.account.analytic.check.report" string="Analytic Check"/>-->
</data>
</openerp>

View File

@ -51,7 +51,7 @@
<field name="type">tree</field>
<field name="field_parent">child_ids</field>
<field name="arch" type="xml">
<tree toolbar="True" colors="red:(date&lt;=current_date);black:(date&gt;current_date)" string="Analytic account">
<tree toolbar="True" colors="red:(date&lt;current_date);black:(date&gt;=current_date);black:(date==False)" string="Analytic account">
<field name="name"/>
<field name="code"/>
<field name="quantity"/>
@ -60,11 +60,7 @@
<field name="credit"/>
<field name="balance"/>
<field name="company_currency_id"/>
<!-- <field name="date"/>-->
<!-- <field name="parent_id" invisible="1"/>-->
<!-- <field name="type" invisible="1"/>-->
<!-- <field name="partner_id" invisible="1"/>-->
<!-- <field name="user_id" invisible="1"/>-->
<field name="date" invisible="1"/>
</tree>
</field>
</record>
@ -78,7 +74,7 @@
<group colspan="4" col="6">
<field name="name" select="1" colspan="4"/>
<field name="code" select="1"/>
<field name="parent_id" on_change="on_change_parent(parent_id)"/>
<field name="parent_id" on_change="on_change_parent(parent_id)" groups="base.group_extended"/>
<field name="company_id" select="2" widget="selection" groups="base.group_multi_company"/>
<field name="type" select="2"/>
<field name="company_currency_id" select="2"/>
@ -112,8 +108,7 @@
<field name="context">{"search_default_user_id":uid}</field>
<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="menu_analytic_accounting"/>
<menuitem action="action_account_analytic_account_form" id="account_analytic_def_account" parent="menu_analytic_accounting" groups="base.group_extended"/>
<record id="act_account_renew_view" model="ir.actions.act_window">
<field name="name">Accounts to Renew</field>
@ -135,17 +130,8 @@
<field name="view_id" ref="view_account_analytic_account_tree"/>
<field name="help">Analytic Charts of Accounts allows you to access to reports by analytic accounts (or cost accounts) . From this menu you can access to analytic balance, a report that relates the analytic accounts to the general accounts. It is useful for analyzing the profitability of projects, giving you the profitability of a project for the different operations that you used to carry out the project.</field>
</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_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"/>
<menuitem icon="STOCK_INDENT" action="wizard_analytic_account_chart" id="menu_action_analytic_account_tree2" parent="account.menu_finance_charts" type="wizard"/>-->
<menuitem id="next_id_40" name="Analytic" parent="account.menu_finance_generic_reporting" sequence="4"/>
<menuitem action="action_account_analytic_account_tree2" id="account_analytic_chart_balance" parent="next_id_40"/>
<menuitem id="next_id_40" name="Analytic" parent="account.menu_finance_generic_reporting" sequence="4" groups="base.group_extended"/>
<record id="view_account_analytic_line_form" model="ir.ui.view">
<field name="name">account.analytic.line.form</field>
@ -157,7 +143,7 @@
<field colspan="4" name="name" select="1"/>
<field name="amount" select="2"/>
<field name="date" select="1"/>
<field name="account_id" select="1"/>
<field name="account_id" select="1" groups="base.group_extended"/>
<field name="journal_id" select="2"/>
<field name="general_account_id" select="2"/>
<field name="move_id" select="2"/>
@ -183,7 +169,7 @@
<field name="name"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total quantity"/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
<field domain="[('type','=','normal')]" name="account_id"/>
<field domain="[('type','=','normal')]" name="account_id" groups="base.group_extended"/>
<field invisible="True" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
<field name="amount" sum="Total amount"/>
<field name="general_account_id"/>
@ -203,7 +189,7 @@
<search string="Search Analytic Lines">
<group col='6' colspan='4'>
<field name="name" select="1"/>
<field name="account_id" select="1"/>
<field name="account_id" select="1" groups="base.group_extended"/>
<field name="amount" select="1"/>
<field name="date" select="1"/>
<field name="user_id" widget="selection"/>
@ -215,7 +201,7 @@
<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 Account" context="{'group_by':'account_id'}" groups="base.group_extended"/>
<filter string="Analytic Journal" context="{'group_by':'journal_id'}"/>
<filter string="Product" context="{'group_by':'product_id'}"/>
</group>
@ -230,14 +216,8 @@
<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"/>-->
<!-- Entries by Line -->
<!-- <menuitem icon="STOCK_JUSTIFY_FILL"-->
<!-- action="action_project_account_analytic_line_form"-->
<!-- id="account_entries_analytic_entries"-->
<!-- parent="next_id_41"/>-->
<!-- Entries by Line -->
<record id="action_account_tree1" model="ir.actions.act_window">
<field name="name">Analytic Entries</field>
@ -263,7 +243,7 @@
<field name="arch" type="xml">
<form string="Project line">
<field name="name"/>
<field name="account_id"/>
<field name="account_id" groups="base.group_extended"/>
<field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
<field name="journal_id"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
@ -308,12 +288,12 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Analytic Journals">
<group>
<field name="name"/>
<field name="code"/>
<field name="type"/>
</group>
<newline/>
<group>
<field name="name"/>
<field name="code"/>
<field name="type"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
</group>
@ -342,7 +322,7 @@
<field name="view_mode">tree,form,search</field>
<field name="search_view_id" ref="view_analytic_journal_search" />
</record>
<menuitem action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting"/>
<menuitem action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting" groups="base.group_extended"/>
#
# Open journal entries
@ -354,31 +334,7 @@
<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> -->
<!-- <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>-->
<menuitem action="action_account_analytic_journal_open_form" id="account_analytic_journal_entries" parent="menu_finance_entries" groups="base.group_extended"/>
#
# Reporting
@ -390,16 +346,7 @@
<field name="view_type">tree</field>
<field name="help">To print an analytics (or costs) journal for a given period. The report give code, move name, account number, general amount and analytic amount.</field>
</record>
<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"/>-->
<menuitem action="action_account_analytic_journal_tree" id="account_analytic_journal_print" parent="account.next_id_40" groups="base.group_extended"/>
#
# Statistics
@ -476,7 +423,6 @@
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="report_hr_timesheet_invoice_journal_search"/>
</record>
<!-- <menuitem action="report_account_analytic_journal_tree" id="report_account_analytic_journal_print" parent="account.next_id_40"/>-->
<act_window domain="[('account_id', '=', active_id)]" id="act_acc_analytic_acc_5_report_hr_timesheet_invoice_journal" name="All Analytic Entries" res_model="account.analytic.line" src_model="account.analytic.account" view_mode="tree,form" view_type="form"/>

View File

@ -154,7 +154,7 @@ class account_analytic_balance(report_sxw.rml_parse):
report_sxw.report_sxw('report.account.analytic.account.balance',
'account.analytic.account', 'addons/account/project/report/analytic_balance.rml',
parser=account_analytic_balance, header=False)
parser=account_analytic_balance, header="internal")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -95,6 +95,6 @@ class account_analytic_analytic_check(report_sxw.rml_parse):
def _delta_cred(self, date1, date2):
return (self._gen_cred(date1,date2)-self._ana_cred(date1,date2))
report_sxw.report_sxw('report.account.analytic.account.analytic.check', 'account.analytic.account', 'addons/account/project/report/analytic_check.rml',parser=account_analytic_analytic_check, header=False)
report_sxw.report_sxw('report.account.analytic.account.analytic.check', 'account.analytic.account', 'addons/account/project/report/analytic_check.rml',parser=account_analytic_analytic_check, header="internal")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -57,7 +57,7 @@ class account_analytic_journal(report_sxw.rml_parse):
res = self.cr.dictfetchone()
return res['sum'] or 0
report_sxw.report_sxw('report.account.analytic.journal', 'account.analytic.journal', 'addons/account/project/report/analytic_journal.rml',parser=account_analytic_journal,header=False)
report_sxw.report_sxw('report.account.analytic.journal', 'account.analytic.journal', 'addons/account/project/report/analytic_journal.rml',parser=account_analytic_journal,header="internal")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -108,7 +108,7 @@ class account_analytic_cost_ledger(report_sxw.rml_parse):
credit = self._sum_credit(accounts, date1, date2) or 0.0
return (debit-credit)
report_sxw.report_sxw('report.account.analytic.account.cost_ledger', 'account.analytic.account', 'addons/account/project/report/cost_ledger.rml',parser=account_analytic_cost_ledger, header=False)
report_sxw.report_sxw('report.account.analytic.account.cost_ledger', 'account.analytic.account', 'addons/account/project/report/cost_ledger.rml',parser=account_analytic_cost_ledger, header="internal")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -120,7 +120,7 @@ class account_inverted_analytic_balance(report_sxw.rml_parse):
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)
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="internal")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -120,6 +120,6 @@ class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
report_sxw.report_sxw('report.account.analytic.account.quantity_cost_ledger',
'account.analytic.account',
'addons/account/project/report/quantity_cost_ledger.rml',
parser=account_analytic_quantity_cost_ledger, header=False)
parser=account_analytic_quantity_cost_ledger, header="internal")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -30,12 +30,12 @@ class account_analytic_balance(osv.osv_memory):
'date1': fields.date('Start of period', required=True),
'date2': fields.date('End of period', required=True),
'empty_acc': fields.boolean('Empty Accounts ? ', help='Check if you want to display Accounts with 0 balance too.'),
}
}
_defaults = {
'date1':time.strftime('%Y-01-01'),
'date2':time.strftime('%Y-%m-%d')
}
}
def check_report(self, cr, uid, ids, context=None):
datas = {}

View File

@ -27,7 +27,7 @@ class account_analytic_chart(osv.osv_memory):
_columns = {
'from_date': fields.date('From'),
'to_date': fields.date('To'),
}
}
def analytic_account_chart_open_window(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')

View File

@ -38,7 +38,8 @@
parent="account.menu_finance_charts"
action="action_account_analytic_chart"
id="menu_action_analytic_account_tree2"
icon="STOCK_INDENT"/>
icon="STOCK_INDENT"
groups="base.group_extended"/>
</data>
</openerp>

View File

@ -29,12 +29,12 @@ class account_analytic_check(osv.osv_memory):
_columns = {
'date1': fields.date('Start of period', required=True),
'date2': fields.date('End of period', required=True),
}
}
_defaults = {
'date1':time.strftime('%Y-01-01'),
'date2':time.strftime('%Y-%m-%d')
}
}
def check_report(self, cr, uid, ids, context=None):
datas = {}

View File

@ -30,12 +30,12 @@ class account_analytic_cost_ledger_journal_report(osv.osv_memory):
'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'),
}
}
_defaults = {
'date1':time.strftime('%Y-01-01'),
'date2':time.strftime('%Y-%m-%d')
}
}
def check_report(self, cr, uid, ids, context=None):
datas = {}

View File

@ -9,7 +9,7 @@
<field name="arch" type="xml">
<form string="Select period">
<group width="450">
<separator string="Cost Legder for period" colspan="4"/>
<separator string="Cost Ledger for period" colspan="4"/>
<field name="date1"/>
<field name="date2"/>
<separator string="and Journals" colspan="4"/>

View File

@ -29,12 +29,12 @@ class account_analytic_cost_ledger(osv.osv_memory):
_columns = {
'date1': fields.date('Start of period', required=True),
'date2': fields.date('End of period', required=True),
}
}
_defaults = {
'date1':time.strftime('%Y-01-01'),
'date2':time.strftime('%Y-%m-%d')
}
}
def check_report(self, cr, uid, ids, context=None):
datas = {}

View File

@ -29,12 +29,12 @@ class account_analytic_inverted_balance(osv.osv_memory):
_columns = {
'date1': fields.date('Start of period', required=True),
'date2': fields.date('End of period', required=True),
}
}
_defaults = {
'date1':time.strftime('%Y-01-01'),
'date2':time.strftime('%Y-%m-%d')
}
}
def check_report(self, cr, uid, ids, context=None):
datas = {}

View File

@ -29,12 +29,12 @@ class account_analytic_Journal_report(osv.osv_memory):
_columns = {
'date1': fields.date('Start of period', required=True),
'date2': fields.date('End of period', required=True),
}
}
_defaults = {
'date1':time.strftime('%Y-01-01'),
'date2':time.strftime('%Y-%m-%d')
}
}
def check_report(self, cr, uid, ids, context=None):
datas = {}

View File

@ -27,7 +27,7 @@ class project_account_analytic_line(osv.osv_memory):
_columns = {
'from_date': fields.date('From'),
'to_date': fields.date('To'),
}
}
def action_open_window(self, cr, uid, ids, context={}):
mod_obj =self.pool.get('ir.model.data')

View File

@ -28,8 +28,8 @@
<field name="res_model">project.account.analytic.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_project_account_analytic_line_form"/>
<field name="target">new</field>
<field name="view_id" ref="view_project_account_analytic_line_form"/>
<field name="target">new</field>
</record>
</data>

View File

@ -35,12 +35,11 @@ import account_balance_landscape
import compare_account_balance
import account_invoice_report
import account_report
import account_analytic_report
import account_account_report
import account_entries_report
import account_analytic_entries_report
import voucher_print
import account_balance_sheet
import account_profit_loss
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,86 +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 account_account_report(osv.osv):
_name = "account.account.report"
_description = "Account Report"
_auto = False
_columns = {
'name': fields.char('Name', size=128, readonly=True),
'code': fields.char('Code', size=64, readonly=True),
'type': fields.selection([
('receivable', 'Receivable'),
('payable', 'Payable'),
('view', 'View'),
('consolidation', 'Consolidation'),
('other', 'Others'),
('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),
'quantity': fields.float('Quantity', readonly=True),
'amount_total': fields.float('Total Amount', readonly=True),
'credit': fields.float('Credit', readonly=True),
'debit': fields.float('Debit', readonly=True),
'balance': fields.float('Balance', readonly=True),
'nbr': fields.integer('#Accounts', readonly=True),
'parent_account_id': fields.many2one('account.account', 'Parent Account', required=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'account_account_report')
cr.execute("""
create or replace view account_account_report as (
select
min(a.id) as id,
count(distinct a.id) as nbr,
a.name,
a.code,
a.type as type,
a.company_id as company_id,
a.currency_mode as currency_mode,
a.user_type as user_type,
a.parent_id as parent_account_id,
sum(ail.quantity) as quantity,
sum(ail.price_subtotal) as amount_total,
sum(m.credit) as credit,
sum(m.debit) as debit,
(sum(m.credit)-sum(m.debit)) as balance
from
account_account as a
left join account_move_line as m on m.account_id=a.id
left join account_invoice_line as ail on ail.account_id=a.id
left join account_invoice as ai on ai.account_id=a.id
group by
a.name,
a.code,
a.type,
a.company_id,
a.currency_mode,
a.user_type,
m.account_id,
a.parent_id
)
""")
account_account_report()

View File

@ -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>

View File

@ -181,10 +181,6 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
## Add for total
self.total_account[(i+1)] = self.total_account[(i+1)] + (total and total[0] or 0.0)
values['name'] = partner['name']
#t = 0.0
#for i in range(5)+['direction']:
# t+= float(values.get(str(i), 0.0) or 0.0)
#values['total'] = t
if values['total']:
res.append(values)
@ -217,10 +213,10 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
return 'Payable Accounts'
elif data['form']['result_selection'] == 'customer_supplier':
return 'Receivable and Payable Accounts'
return ''
return ''
report_sxw.report_sxw('report.account.aged_trial_balance', 'res.partner',
'addons/account/report/account_aged_partner_balance.rml',parser=aged_trial_report, header=False)
'addons/account/report/account_aged_partner_balance.rml',parser=aged_trial_report, header="internal landscape")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -107,7 +107,7 @@
<field name="help">A tool search lets you know statistics on your analytics records that match your needs.</field>
</record>
<menuitem action="action_analytic_entries_report" id="menu_action_analytic_entries_report" parent="account.menu_finance_statistic_report_statement" sequence="4"/>
<menuitem action="action_analytic_entries_report" id="menu_action_analytic_entries_report" parent="account.menu_finance_statistic_report_statement" sequence="4" groups="base.group_extended"/>
</data>
</openerp>

View File

@ -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()

View File

@ -1,128 +0,0 @@
<?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','&lt;=', time.strftime('%%Y-%%m-%%d')),('day','&gt;',(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','&lt;=', time.strftime('%%Y-%%m-%%d')), ('day','&gt;',(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','&lt;=', time.strftime('%%Y-%%m-%%d')), ('day','&gt;',(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>

View File

@ -57,10 +57,10 @@ class account_balance(report_sxw.rml_parse, common_report_header):
self.query_get_clause = data['form'].get('query_line', False) or ''
return super(account_balance, self).set_context(objects, data, new_ids, report_type=report_type)
def _add_header(self, node, header=1):
if header == 0:
self.rml_header = ""
return True
#def _add_header(self, node, header=1):
# if header == 0:
# self.rml_header = ""
# return True
def _get_account(self, data):
if data['model']=='account.account':
@ -86,10 +86,6 @@ class account_balance(report_sxw.rml_parse, common_report_header):
elif form['filter'] == 'filter_date':
ctx['date_from'] = form['date_from']
ctx['date_to'] = form['date_to']
# accounts = obj_account.browse(self.cr, self.uid, ids, ctx)
# def cmp_code(x, y):
# return cmp(x.code, y.code)
# accounts.sort(cmp_code)
child_ids = obj_account._get_children_and_consol(self.cr, self.uid, ids, ctx)
if child_ids:
@ -108,28 +104,11 @@ class account_balance(report_sxw.rml_parse, common_report_header):
'debit': account['debit'],
'credit': account['credit'],
'balance': account['balance'],
# 'leef': not bool(account['child_id']),
'parent_id':account['parent_id'],
'bal_type':'',
}
self.sum_debit += account['debit']
self.sum_credit += account['credit']
# if account.child_id:
# def _check_rec(account):
# if not account.child_id:
# return bool(account.credit or account.debit)
# for c in account.child_id:
# if not _check_rec(c) or _check_rec(c):
# return True
# return False
# if not _check_rec(account) :
# continue
# if account['parent_id']:
# acc = obj_account.read(self.cr, self.uid, [ account['parent_id'][0] ] ,['name'], ctx)
# for r in result_acc:
# if r['id'] == account['parent_id'][0]:
# res['level'] = r['level'] + 1
# break
if form['display_account'] == 'bal_movement':
if res['credit'] > 0 or res['debit'] > 0 or res['balance'] > 0 :
result_acc.append(res)
@ -138,18 +117,8 @@ class account_balance(report_sxw.rml_parse, common_report_header):
result_acc.append(res)
else:
result_acc.append(res)
# if account.child_id:
# acc_id = [acc.id for acc in account.child_id]
# lst_string = ''
# lst_string = '\'' + '\',\''.join(map(str,acc_id)) + '\''
# self.cr.execute("select code,id from account_account where id IN (%s)"%(lst_string))
# a_id = self.cr.fetchall()
# a_id.sort()
# ids2 = [x[1] for x in a_id]
#
# result_acc += self.lines(form, ids2, done, level+1)
return result_acc
report_sxw.report_sxw('report.account.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header="internal")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -24,8 +24,6 @@ import locale
from report import report_sxw
import rml_parse
#from addons.account.wizard import wizard_account_balance_report
parents = {
'tr':1,
'li':1,
@ -59,267 +57,6 @@ class account_balance_landscape(rml_parse.rml_parse):
})
self.context = context
# def repeatIn(self, lst, name, nodes_parent=False,td=False,width=[],value=[],type=[]):
# self._node.data = ''
# node = self._find_parent(self._node, nodes_parent or parents)
# ns = node.nextSibling
##start
# if value==['Cash','%']:
# if show==1:
# if perc==1:
# if pattern=='none':
# value=['','Cash','%']
# type=['lable','lable','lable']
# width=[130,65,65]
# else:
# value=[' ','','Cash','%']
# type=['string','lable','lable','lable']
# width=[65,130,65,65]
# else:
# if pattern=='none':
# value=['']
# type=['lable']
# width=[195]
# else:
# value=[' ','']
# type=['string','lable']
# width=[65,195]
# else:
# if perc==1:
# if pattern=='none':
# value=['Cash','%']
# type=['lable','lable']
# width=[65,65]
# else:
# value=[' ','Cash','%']
# type=['string','lable','lable']
# width=[65,65,65]
# else:
# if pattern=='none':
# value=['']
# type=['lable']
# width=[65]
# else:
# value=[' ','']
# type=['string','lable']
# width=[65,65]
#
#
# if value==['year']:
# if show==1:
# if perc==1:
# if pattern=='none':
# width=[260]
# else:
# value=[' ','year']
# type=['string','string']
# width=[65,260]
# else:
# if pattern=='none':
# width=[195]
# else:
# value=[' ','year']
# type=['string','string']
# width=[65,195]
# else:
# if perc==1:
# if pattern=='none':
# width=[130]
# else:
# value=[' ','year']
# type=['string','string']
# width=[65,130]
#
# else:
# if pattern=='none':
# width=[65]
# else:
# value=[' ','year']
# type=['string','string']
# width=[65,65]
#
# if value==['Debit','Credit','Balance']:
# if show==1:
# if perc==1:
# if pattern=='none':
# width=[65,65,130]
# else:
# value=[' ','Debit','Credit','Balance']
# type=['string','lable','lable','lable']
# width=[65,65,65,130]
# else:
# if pattern=='none':
# width=[65,65,65]
# else:
# value=[' ','Debit','Credit','Balance']
# type=['string','lable','lable','lable']
# width=[65,65,65,65]
#
# else:
# if perc==1:
# if pattern=='none':
# value=['Balance']
# type=['lable']
# width=[130]
# else:
# value=[' ','Balance']
# type=['string','lable']
# width=[65,130]
# else:
# if pattern=='none':
# value=['Balance']
# type=['lable']
# width=[65]
# else:
# value=[' ','Balance']
# type=['string','lable']
# width=[65,65]
#
# if value==['debit','credit','balance']:
# if show==1:
# if perc==1:
# if pattern=='none':
# value=['debit','credit','balance','balance_perc']
# type=['string','string','string','string']
# width=[65,65,65,65]
# else:
# value=[pattern,'debit','credit','balance','balance_perc']
# type=['string','string','string','string','string']
# width=[65,65,65,65,65]
# else:
# if pattern=='none':
# value=['debit','credit','balance']
# type=['string','string','string']
# width=[65,65,65]
# else:
# value=[pattern,'debit','credit','balance']
# type=['string','string','string','string']
# width=[65,65,65,65]
#
# else:
# if perc==1:
# if pattern=='none':
# value=['balance','balance_perc']
# type=['string','string']
# width=[65,65]
# else:
# value=[pattern,'balance','balance_perc']
# type=['string','string','string']
# width=[65,65,65]
# else:
# if pattern=='none':
# value=['balance']
# type=['string']
# width=[65]
# else:
# value=[pattern,'balance']
# type=['string','string']
# width=[65,65]
#
# if value==['sum_debit','sum_credit','']:
# if show==1:
# if perc==1:
# if pattern=='none':
# width=[65,65,130]
# else:
# value=[' ','sum_debit','sum_credit','']
# type=['string','string','string','lable']
# width=[65,65,65,130]
# else:
# if pattern=='none':
# width=[65,65,65]
# else:
# value=[' ','sum_debit','sum_credit','']
# type=['string','string','string','lable']
# width=[65,65,65,65]
# else:
# if perc==1:
# if pattern=='none':
# value=['']
# type=['lable']
# width=[130]
# else:
# value=[' ','']
# type=['string','lable']
# width=[65,130]
# else:
# if pattern=='none':
# value=['']
# type=['lable']
# width=[65]
# else:
# value=[' ','']
# type=['string','lable']
# width=[65,65]
#
# if not lst:
# lst.append(1)
# for ns in node.childNodes :
# if ns and ns.nodeName!='#text' and ns.tagName=='blockTable' and td :
# width_str = ns._attrs['colWidths'].nodeValue
# ns.removeAttribute('colWidths')
# total_td = td * len(value)
#
# if not width:
# for v in value:
# width.append(30)
# check1=0
# for t in range(td):
# for v in range(len(value)):
# if type[v] in ('String','STRING','string'):
# if (value[v]==" " or value[0]==pattern):
# if check1==0:
# check1=1
# width_str +=',0.0'
# else:
# width_str +=',%d'%width[v]
# else:
# width_str +=',%d'%width[v]
# else:
# width_str +=',%d'%width[v]
# ns.setAttribute('colWidths',width_str)
#
# child_list = ns.childNodes
#
# check=0
# for child in child_list:
# if child.nodeName=='tr':
# lc = child.childNodes[1]
# for t in range(td):
# i=0
# for v in value:
#
# newnode = lc.cloneNode(1)
# temp2="%s['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]]"%(name)
##
# if type[i] in ('String','STRING','string'):
# if (v==" " or v==pattern) and i==0 and check==0:
# check=1
# if newnode.childNodes[1].lastChild:
# newnode.childNodes[1].lastChild.data=""
# else:
# if v==" ":
# if newnode.childNodes[1].lastChild:
# newnode.childNodes[1].lastChild.data=""
# else:
# t1= "[[ %s['%s%d'] ]]"%(name,v,t)
# if v=="year" or v=="sum_debit" or v=="sum_credit":
# if newnode.childNodes[1].lastChild:
# newnode.childNodes[1].lastChild.data = t1
# else:
# if newnode.childNodes[1].lastChild:
# newnode.childNodes[1].lastChild.data = t1+"[["+temp2
## newnode.childNodes[1].lastChild.data=[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]]
# elif type[i] in ('Lable','LABLE','lable'):
# if newnode.childNodes[1].lastChild:
# newnode.childNodes[1].lastChild.data= v
#
# child.appendChild(newnode)
#
# newnode=False
# i+=1
# return super(account_balance_landscape,self).repeatIn(lst, name, nodes_parent=False)
#end
def linesForYear(self,form):
temp=0
years={}
@ -363,7 +100,6 @@ 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.done_total=0
@ -372,8 +108,6 @@ class account_balance_landscape(rml_parse.rml_parse):
locale.setlocale(locale.LC_ALL, '')
self.result_total["sum_credit" + str(t1)]=locale.format("%.2f", self.result_total["sum_credit" + str(t1)], grouping=True)
self.result_total["sum_debit" + str(t1)]=locale.format("%.2f", self.result_total["sum_debit" + str(t1)], grouping=True)
# self.flag=1
# 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])
@ -661,6 +395,6 @@ class account_balance_landscape(rml_parse.rml_parse):
def total_cr(self):
return self.cr_total
report_sxw.report_sxw('report.account.account.balance.landscape', 'account.account', 'addons/account/report/account_balance_landscape.rml', parser=account_balance_landscape, header=False)
report_sxw.report_sxw('report.account.account.balance.landscape', 'account.account', 'addons/account/report/account_balance_landscape.rml', parser=account_balance_landscape, header="internal landscape")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -91,7 +91,6 @@ class report_balancesheet_horizontal(rml_parse.rml_parse, common_report_header):
]
ctx = self.context.copy()
# ctx['state'] = form['context'].get('state','filter_no')
ctx['fiscalyear'] = data['form'].get('fiscalyear_id', False)
if data['form']['filter'] == 'filter_period' :
@ -197,10 +196,10 @@ class report_balancesheet_horizontal(rml_parse.rml_parse, common_report_header):
report_sxw.report_sxw('report.account.balancesheet.horizontal', 'account.account',
'addons/account/report/account_balance_sheet_horizontal.rml',parser=report_balancesheet_horizontal,
header='internal')
header='internal landscape')
report_sxw.report_sxw('report.account.balancesheet', 'account.account',
'addons/account/report/account_balance_sheet.rml',parser=report_balancesheet_horizontal,
header='internal')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -51,6 +51,7 @@ class account_entries_report(osv.osv):
help='When new account move is created the state will be \'Draft\'. When all the payments are done it will be in \'Posted\' state.'),
'state_2': fields.selection([('draft','Draft'), ('valid','Valid')], 'State of Move Line', readonly=True,
help='When new move line is created the state will be \'Draft\'.\n* When all the payments are done it will be in \'Valid\' state.'),
'reconcile_id': fields.many2one('account.move.reconcile', readonly=True),
'partner_id': fields.many2one('res.partner','Partner', readonly=True),
'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
'quantity': fields.float('Products Quantity', digits=(16,2), readonly=True),
@ -69,6 +70,42 @@ class account_entries_report(osv.osv):
'company_id': fields.many2one('res.company', 'Company', readonly=True),
}
_order = 'date desc'
def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
for arg in args:
if arg[0] == 'period_id' and arg[2] == 'current_period':
current_period = self.pool.get('account.period').find(cr, uid)[0]
args.append(['period_id','in',[current_period]])
break
elif arg[0] == 'period_id' and arg[2] == 'current_year':
current_year = self.pool.get('account.fiscalyear').find(cr, uid)
ids = self.pool.get('account.fiscalyear').read(cr, uid, [current_year], ['period_ids'])[0]['period_ids']
args.append(['period_id','in',ids])
for a in [['period_id','in','current_year'], ['period_id','in','current_period']]:
if a in args:
args.remove(a)
return super(account_entries_report, self).search(cr, uid, args=args, offset=offset, limit=limit, order=order,
context=context, count=count)
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None):
todel=[]
for arg in domain:
if arg[0] == 'period_id' and arg[2] == 'current_period':
current_period = self.pool.get('account.period').find(cr, uid)[0]
domain.append(['period_id','in',[current_period]])
todel.append(arg)
break
elif arg[0] == 'period_id' and arg[2] == 'current_year':
current_year = self.pool.get('account.fiscalyear').find(cr, uid)
ids = self.pool.get('account.fiscalyear').read(cr, uid, [current_year], ['period_ids'])[0]['period_ids']
domain.append(['period_id','in',ids])
todel.append(arg)
for a in [['period_id','in','current_year'], ['period_id','in','current_period']]:
if a in domain:
domain.remove(a)
return super(account_entries_report, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context)
def init(self, cr):
tools.drop_view_if_exists(cr, 'account_entries_report')
cr.execute("""
@ -81,6 +118,7 @@ class account_entries_report(osv.osv):
am.ref as ref,
am.state as state,
l.state as state_2,
l.reconcile_id as reconcile_id,
to_char(am.date, 'YYYY') as year,
to_char(am.date, 'MM') as month,
to_char(am.date, 'YYYY-MM-DD') as day,
@ -104,6 +142,7 @@ class account_entries_report(osv.osv):
left join account_account a on (l.account_id = a.id)
left join account_move am on (am.id=l.move_id)
left join account_period p on (am.period_id=p.id)
where l.state != 'draft'
)
""")
account_entries_report()

View File

@ -17,7 +17,6 @@
<field name="credit"/>
<field name="balance"/>
<field name="state" invisible="1"/>
<field name="state_2" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="year" invisible="1"/>
@ -26,7 +25,6 @@
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
<field name="journal_id" invisible="1"/>
<field name="account_id" invisible="1"/>
<field name="analytic_account_id" invisible="1"/>
<field name="fiscalyear_id" invisible="1"/>
<field name="period_id" invisible="1"/>
<field name="user_type" invisible="1"/>
@ -54,23 +52,24 @@
<field name="arch" type="xml">
<search string="Entries Analysis">
<group colspan="10" col="12">
<filter icon="terp-go-year" string="This Year"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Tasks performed in this year"/>
<filter icon="terp-go-month" string="This Month"
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Tasks performed in this month"/>
<filter icon="terp-go-week"
string="7 Days"
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Tasks during last 7 days"/>
<filter icon="terp-go-year" string="This Year"
name="year"
domain="[('period_id','in','current_year')]"
help="Entries created in current year"/>
<filter icon="terp-go-month" string="This Month"
name="period"
domain="[('period_id','in','current_period')]"
help="Entries created in current period"/>
<separator orientation="vertical"/>
<filter string="Draft" icon="terp-document-new" domain="[('state','=','draft')]" help = "Draft entries"/>
<filter string="Posted" icon="terp-camera_test" domain="[('state','=','posted')]" help = "Posted entries"/>
<separator orientation="vertical"/>
<filter string="Reconciled" icon="terp-document-new" domain="[('reconcile_id','!=',False)]" help = "Reconciled entries"/>
<filter string="Unreconciled" icon="terp-stock_symbol-selection" domain="[('reconcile_id','=',False)]" help = "Unreconciled entries"/>
<separator orientation="vertical"/>
<field name="account_id"/>
<field name="journal_id"/>
<field name="period_id"/>
</group>
<newline/>
<group expand="1" string="Group By...">
@ -89,9 +88,6 @@
<filter string="Fiscal Year" icon="terp-go-month" context="{'group_by':'fiscalyear_id'}"/>
<separator orientation="vertical"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Analytic Account" name="Analytic Account" icon="terp-folder-green" context="{'group_by':'analytic_account_id'}"/>
<filter string="State of Move Line" icon="terp-stock_effects-object-colorize" context="{'group_by':'state_2'}"/>
<newline/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
@ -103,7 +99,6 @@
<field name="period_id"/>
<field name="fiscalyear_id"/>
<separator orientation="vertical"/>
<field name="analytic_account_id"/>
<separator orientation="vertical"/>
<field name="product_id"/>
<field name="partner_id"/>
@ -122,7 +117,7 @@
<field name="res_model">account.entries.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_profit': 1,'search_default_group_account':1,'search_default_group_month': 1, 'group_by_no_leaf':1,'group_by':[]}</field>
<field name="context">{'search_default_profit': 1,'search_default_group_account':1,'search_default_group_journal':1,'search_default_group_month': 1, 'group_by_no_leaf':1,'group_by':[], 'search_default_year':1, 'search_default_period':1}</field>
<field name="help">A tool search lets you know statistics on your different financial accounts that match your needs.</field>
</record>
<menuitem action="action_account_entries_report_all" id="menu_action_account_entries_report_all" parent="account.menu_finance_statistic_report_statement" sequence="2"/>

View File

@ -5,10 +5,10 @@
# Copyright (c) 2006-2010 OpenERP S.A
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# guarantees and support are strongly advised to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
@ -240,6 +240,6 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
return 'Date'
report_sxw.report_sxw('report.account.general.ledger', 'account.account', 'addons/account/report/account_general_ledger.rml', parser=general_ledger, header='internal')
report_sxw.report_sxw('report.account.general.ledger_landscape', 'account.account', 'addons/account/report/account_general_ledger_landscape.rml', parser=general_ledger, header='internal')
report_sxw.report_sxw('report.account.general.ledger_landscape', 'account.account', 'addons/account/report/account_general_ledger_landscape.rml', parser=general_ledger, header='internal landscape')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -31,10 +31,10 @@ class account_invoice_report(osv.osv):
'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
'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),
'product_id':fields.many2one('product.product', 'Product', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'product_qty':fields.float('Qty', readonly=True),
'uom_name': fields.char('Default UoM', size=128, readonly=True),
'payment_term': fields.many2one('account.payment.term', 'Payment Term', readonly=True),
@ -43,13 +43,13 @@ class account_invoice_report(osv.osv):
'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
'categ_id': fields.many2one('product.category','Category of Product', readonly=True),
'journal_id': fields.many2one('account.journal', 'Journal', readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'user_id':fields.many2one('res.users', 'Salesman', readonly=True),
'price_total':fields.float('Total Price', readonly=True),
'price_average':fields.float('Average Price', readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'user_id': fields.many2one('res.users', 'Salesman', readonly=True),
'price_total': fields.float('Total Without Tax', readonly=True),
'price_total_tax': fields.float('Total With Tax', readonly=True),
'price_average': fields.float('Average Price', readonly=True),
'nbr':fields.integer('# of Lines', readonly=True),
'reconciled':fields.integer('# reconciled lines', readonly=True),
'type': fields.selection([
('out_invoice','Customer Invoice'),
('in_invoice','Supplier Invoice'),
@ -69,8 +69,8 @@ class account_invoice_report(osv.osv):
'address_invoice_id': fields.many2one('res.partner.address', 'Invoice Address Name', readonly=True),
'account_id': fields.many2one('account.account', 'Account',readonly=True),
'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
'residual':fields.float('Total Residual', readonly=True),
'delay_to_pay':fields.float('Avg. Delay To Pay', readonly=True, group_operator="avg"),
'residual': fields.float('Total Residual', readonly=True),
'delay_to_pay': fields.float('Avg. Delay To Pay', readonly=True, group_operator="avg"),
}
_order = 'date desc'
def init(self, cr):
@ -84,7 +84,6 @@ class account_invoice_report(osv.osv):
to_char(ai.date_invoice, 'YYYY-MM-DD') as day,
ail.product_id,
ai.partner_id as partner_id,
ai.reconciled::integer,
ai.payment_term as payment_term,
ai.period_id as period_id,
u.name as uom_name,
@ -112,6 +111,11 @@ class account_invoice_report(osv.osv):
else
ail.quantity*ail.price_unit
end) as price_total,
sum(case when ai.type in ('out_refund','in_invoice') then
ai.amount_total * -1
else
ai.amount_total
end) as price_total_tax,
sum(ail.quantity*ail.price_unit)/sum(ail.quantity*u.factor)*count(ail.product_id)::decimal(16,2) as price_average,
sum((select extract(epoch from avg(date_trunc('day',aml.date_created)-date_trunc('day',l.create_date)))/(24*60*60)::decimal(16,2)
from account_move_line as aml
@ -136,7 +140,6 @@ class account_invoice_report(osv.osv):
to_char(ai.date_invoice, 'MM'),
to_char(ai.date_invoice, 'YYYY-MM-DD'),
ai.partner_id,
ai.reconciled,
ai.payment_term,
ai.period_id,
u.name,
@ -153,7 +156,11 @@ class account_invoice_report(osv.osv):
ai.address_invoice_id,
ai.account_id,
ai.partner_bank_id,
ai.residual
ai.residual,
ai.amount_total
)
""")
account_invoice_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -28,9 +28,10 @@
<field name="account_id" invisible="1"/>
<field name="nbr" sum="# of Lines"/>
<field name="product_qty" sum="Qty"/>
<field name="reconciled" sum="# Reconciled"/>
<!-- <field name="reconciled" sum="# Reconciled"/> -->
<field name="price_average" sum="Average Price"/>
<field name="price_total" sum="Total Price"/>
<field name="price_total" sum="Total Without Tax"/>
<field name="price_total_tax" sum="Total With Tax"/>
<field name="residual" sum="Total Residual" invisible="context.get('residual_invisible',False)"/>
<field name="delay_to_pay" sum="Avg. Delay To Pay" invisible="context.get('residual_invisible',False)"/>
</tree>
@ -69,21 +70,36 @@
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Invoices during last 7 days"/>
<separator orientation="vertical"/>
<filter string="Current"
icon="terp-check"
domain="[('state','in',('draft','open'))]"
help = "Draft and Open Invoices"/>
<filter string="Draft"
icon="terp-check"
domain="[('state','=','draft')]"
help = "Draft Invoices"/>
<filter string="Pro-forma"
icon="terp-check"
domain="[('state','=','proforma'),('state','=','proforma2')]"
domain="['|', ('state','=','proforma'),('state','=','proforma2')]"
help = "Pro-forma Invoices"/>
<filter string="Done"
icon="terp-dialog-close"
domain="[('state','=','paid')]"
help = "Done Invoices"/>
<separator orientation="vertical"/>
<filter icon="terp-check" string="Customer"
domain="['|', ('type','=','out_invoice'),('type','=','out_refund')]"
help="Customer Invoices And Refunds"/>
<filter icon="terp-check"
string="Supplier"
separator="1"
domain="['|', ('type','=','in_invoice'),('type','=','in_refund')]"
help="Supplier Invoices And Refunds"/>
<separator orientation="vertical"/>
<filter icon="terp-check" string="Invoice"
domain="['|', ('type','=','out_invoice'),('type','=','in_invoice')]"
help="Customer And Supplier Invoices"/>
<filter icon="terp-check"
string="Refund"
separator="1"
domain="['|', ('type','=','out_refund'),('type','=','in_refund')]"
help="Customer And Supplier Refunds"/>
<separator orientation="vertical"/>
<field name="partner_id"/>
<field name="user_id" />
<field name="user_id" />
<field name="categ_id" />
</group>
<newline/>
<group expand="1" string="Group By...">
@ -140,10 +156,9 @@
<menuitem action="action_account_invoice_report_all" id="menu_action_account_invoice_report_all" parent="account.menu_finance_statistic_report_statement" sequence="0"/>
<act_window
domain="[('partner_id', '=', active_id)]"
id="act_account_invoice_partner_relation"
name="Monthly Turnover"
context="{'search_default_month':1,'search_default_user':1,'group_by_no_leaf':1,'group_by':[]}"
context="{'search_default_partner_id':[active_id], 'search_default_month':1,'search_default_user':1,'group_by_no_leaf':1,'group_by':[]}"
res_model="account.invoice.report"
src_model="res.partner"/>

View File

@ -170,9 +170,9 @@ class report_pl_account_horizontal(rml_parse.rml_parse, common_report_header):
return self.result.get(group, [])
report_sxw.report_sxw('report.pl.account.horizontal', 'account.account',
'addons/account/report/account_profit_horizontal.rml',parser=report_pl_account_horizontal, header='internal')
'addons/account/report/account_profit_horizontal.rml',parser=report_pl_account_horizontal, header='internal landscape')
report_sxw.report_sxw('report.pl.account', 'account.account',
'addons/account/report/account_profit_loss.rml',parser=report_pl_account_horizontal, header='internal')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -122,7 +122,6 @@ class report_aged_receivable(osv.osv):
""" This view will be used in dashboard
The reason writing this code here is, we need to check date range from today to first date of fiscal year.
"""
# ranges = _get_ranges(cr) # Gets the ranges for the x axis of the graph (name column values)
pool_obj_fy = pooler.get_pool(cr.dbname).get('account.fiscalyear')
today = time.strftime('%Y-%m-%d')
fy_id = pool_obj_fy.find(cr, uid, exception=False)

View File

@ -47,7 +47,6 @@
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
</record>
<!-- <menuitem action="action_account_receivable_graph" id="menu_account_receivable_graph" parent="account.menu_finance_reporting"/> -->
<!-- Report for Aged Receivable -->
@ -115,9 +114,6 @@
<field name="view_id" ref="board_view_created_invoice"/>
</record>
<!-- <menuitem id="menu_report_this_month" name="This Month" parent="account.menu_finance_reporting"/>-->
<!-- <menuitem id="menu_report_all_months" name="Sales by Account" parent="account.menu_finance_reporting"/> -->
<!-- Report of the sales by product and account -->
<record id="view_report_account_sales_tree" model="ir.ui.view">
<field name="name">report.account.sales.tree</field>
<field name="model">report.account.sales</field>
@ -169,9 +165,7 @@
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_report_account_sales_search"/>
</record>
<!-- <menuitem action="action_report_account_sales_tree_all" id="menu_report_account_sales_all" parent="menu_report_all_months"/> -->
<!-- Report of the sales by product and account type -->
<record id="view_report_account_type_sales_tree" model="ir.ui.view">
<field name="name">report.account_type.sales.tree</field>
<field name="model">report.account_type.sales</field>
@ -237,7 +231,6 @@
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_report_account_type_sales_search"/>
</record>
<!-- <menuitem action="action_report_account_type_sales_tree_all" id="menu_report_account_type_sales_all" parent="menu_report_all_months"/> -->
</data>
</openerp>

View File

@ -63,6 +63,6 @@ class account_tax_code_report(rml_parse.rml_parse):
.browse(self.cr, self.uid, line_ids))
report_sxw.report_sxw('report.account.tax.code.entries', 'account.tax.code',
'addons/account/report/account_tax_code.rml', parser=account_tax_code_report, header=False)
'addons/account/report/account_tax_code.rml', parser=account_tax_code_report, header="internal")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -58,268 +58,6 @@ class account_balance(report_sxw.rml_parse):
})
self.context = context
# def repeatIn(self, lst, name, nodes_parent=False,td=False,width=[],value=[],type=[]):
# self._node.data = ''
# node = self._find_parent(self._node, nodes_parent or parents)
# ns = node.nextSibling
##start
# if value==['Cash','%']:
# if show==1:
# if perc==1:
# if pattern=='none':
# value=['','Cash','%']
# type=['lable','lable','lable']
# width=[130,65,65]
# else:
# value=[' ','','Cash','%']
# type=['string','lable','lable','lable']
# width=[65,130,65,65]
# else:
# if pattern=='none':
# value=['']
# type=['lable']
# width=[195]
# else:
# value=[' ','']
# type=['string','lable']
# width=[65,195]
# else:
# if perc==1:
# if pattern=='none':
# value=['Cash','%']
# type=['lable','lable']
# width=[65,65]
# else:
# value=[' ','Cash','%']
# type=['string','lable','lable']
# width=[65,65,65]
# else:
# if pattern=='none':
# value=['']
# type=['lable']
# width=[65]
# else:
# value=[' ','']
# type=['string','lable']
# width=[65,65]
#
#
# if value==['year']:
# if show==1:
# if perc==1:
# if pattern=='none':
# width=[260]
# else:
# value=[' ','year']
# type=['string','string']
# width=[65,260]
# else:
# if pattern=='none':
# width=[195]
# else:
# value=[' ','year']
# type=['string','string']
# width=[65,195]
# else:
# if perc==1:
# if pattern=='none':
# width=[130]
# else:
# value=[' ','year']
# type=['string','string']
# width=[65,130]
#
# else:
# if pattern=='none':
# width=[65]
# else:
# value=[' ','year']
# type=['string','string']
# width=[65,65]
#
# if value==['Debit','Credit','Balance']:
# if show==1:
# if perc==1:
# if pattern=='none':
# width=[65,65,130]
# else:
# value=[' ','Debit','Credit','Balance']
# type=['string','lable','lable','lable']
# width=[65,65,65,130]
# else:
# if pattern=='none':
# width=[65,65,65]
# else:
# value=[' ','Debit','Credit','Balance']
# type=['string','lable','lable','lable']
# width=[65,65,65,65]
#
# else:
# if perc==1:
# if pattern=='none':
# value=['Balance']
# type=['lable']
# width=[130]
# else:
# value=[' ','Balance']
# type=['string','lable']
# width=[65,130]
# else:
# if pattern=='none':
# value=['Balance']
# type=['lable']
# width=[65]
# else:
# value=[' ','Balance']
# type=['string','lable']
# width=[65,65]
#
# if value==['debit','credit','balance']:
# if show==1:
# if perc==1:
# if pattern=='none':
# value=['debit','credit','balance','balance_perc']
# type=['string','string','string','string']
# width=[65,65,65,65]
# else:
# value=[pattern,'debit','credit','balance','balance_perc']
# type=['string','string','string','string','string']
# width=[65,65,65,65,65]
# else:
# if pattern=='none':
# value=['debit','credit','balance']
# type=['string','string','string']
# width=[65,65,65]
# else:
# value=[pattern,'debit','credit','balance']
# type=['string','string','string','string']
# width=[65,65,65,65]
#
# else:
# if perc==1:
# if pattern=='none':
# value=['balance','balance_perc']
# type=['string','string']
# width=[65,65]
# else:
# value=[pattern,'balance','balance_perc']
# type=['string','string','string']
# width=[65,65,65]
# else:
# if pattern=='none':
# value=['balance']
# type=['string']
# width=[65]
# else:
# value=[pattern,'balance']
# type=['string','string']
# width=[65,65]
#
# if value==['sum_debit','sum_credit','']:
# if show==1:
# if perc==1:
# if pattern=='none':
# width=[65,65,130]
# else:
# value=[' ','sum_debit','sum_credit','']
# type=['string','string','string','lable']
# width=[65,65,65,130]
# else:
# if pattern=='none':
# width=[65,65,65]
# else:
# value=[' ','sum_debit','sum_credit','']
# type=['string','string','string','lable']
# width=[65,65,65,65]
# else:
# if perc==1:
# if pattern=='none':
# value=['']
# type=['lable']
# width=[130]
# else:
# value=[' ','']
# type=['string','lable']
# width=[65,130]
# else:
# if pattern=='none':
# value=['']
# type=['lable']
# width=[65]
# else:
# value=[' ','']
# type=['string','lable']
# width=[65,65]
#
# if not lst:
# lst.append(1)
# for ns in node.childNodes :
# if ns and ns.nodeName!='#text' and ns.tagName=='blockTable' and td :
# width_str = ns._attrs['colWidths'].nodeValue
# ns.removeAttribute('colWidths')
# total_td = td * len(value)
#
# if not width:
# for v in value:
# width.append(30)
# check1=0
# for t in range(td):
# for v in range(len(value)):
# if type[v] in ('String','STRING','string'):
# if (value[v]==" " or value[0]==pattern):
# if check1==0:
# check1=1
# width_str +=',0.0'
# else:
# width_str +=',%d'%width[v]
# else:
# width_str +=',%d'%width[v]
# else:
# width_str +=',%d'%width[v]
# ns.setAttribute('colWidths',width_str)
#
# child_list = ns.childNodes
#
# check=0
# for child in child_list:
# if child.nodeName=='tr':
# lc = child.childNodes[1]
# for t in range(td):
# i=0
# for v in value:
#
# newnode = lc.cloneNode(1)
# temp2="%s['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]]"%(name)
##
# if type[i] in ('String','STRING','string'):
# if (v==" " or v==pattern) and i==0 and check==0:
# check=1
# if newnode.childNodes[1].lastChild:
# newnode.childNodes[1].lastChild.data=""
# else:
# if v==" ":
# if newnode.childNodes[1].lastChild:
# newnode.childNodes[1].lastChild.data=""
# else:
# t1= "[[ %s['%s%d'] ]]"%(name,v,t)
# if v=="year" or v=="sum_debit" or v=="sum_credit":
# if newnode.childNodes[1].lastChild:
# newnode.childNodes[1].lastChild.data = t1
# else:
# if newnode.childNodes[1].lastChild:
# newnode.childNodes[1].lastChild.data = t1+"[["+temp2
## newnode.childNodes[1].lastChild.data=[[ a['status']==1 and ( setTag('para','para',{'fontName':'Times-bold'})) ]]
# elif type[i] in ('Lable','LABLE','lable'):
# if newnode.childNodes[1].lastChild:
# newnode.childNodes[1].lastChild.data= v
#
# child.appendChild(newnode)
#
# newnode=False
# i+=1
# return super(account_balance,self).repeatIn(lst, name, nodes_parent=False)
#end
def linesForYear(self, form):
temp=0
years={}
@ -363,7 +101,6 @@ class account_balance(report_sxw.rml_parse):
total_for_perc=[]
# if perc==1:
self.done_total=1
self.total_for_perc=self.linesForTotal(form, ids={}, doneAccount={}, level=1)
self.done_total=0
@ -372,8 +109,6 @@ class account_balance(report_sxw.rml_parse):
locale.setlocale(locale.LC_ALL, '')
self.result_total["sum_credit" + str(t1)]=locale.format("%.2f", self.result_total["sum_credit" + str(t1)], grouping=True)
self.result_total["sum_debit" + str(t1)]=locale.format("%.2f", self.result_total["sum_debit" + str(t1)], grouping=True)
# self.flag=1
# 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])
@ -657,6 +392,6 @@ class account_balance(report_sxw.rml_parse):
def total_cr(self):
return self.cr_total
report_sxw.report_sxw('report.account.balance.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header=False)
report_sxw.report_sxw('report.account.balance.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header="internal")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -106,7 +106,6 @@ class rml_parse(report_sxw.rml_parse):
return Stringer
return Stringer
def explode_this(self,chaine,length):
#chaine = self.repair_string(chaine)
chaine = rstrip(chaine)
ast = list(chaine)
i = length
@ -120,7 +119,6 @@ class rml_parse(report_sxw.rml_parse):
UnicodeAst = []
_previouslyfound = False
i = 0
#print str(ast)
while i < len(ast):
elem = ast[i]
try:
@ -152,33 +150,3 @@ class rml_parse(report_sxw.rml_parse):
else:
return Stringer
def _add_header(self, node, header=1):
if header==2:
rml_head = self.rml_header2
else:
rml_head = self.rml_header
rml_head = rml_head.replace('<pageGraphics>','''<pageGraphics> <image x="10" y="26cm" height="770.0" width="1120.0" >[[company.logo]] </image> ''')
return True
# def _add_header(self, node):
# rml_head = tools.file_open('specific_param/report/header/corporate_rml_header_ch.rml').read()
# head_dom = xml.dom.minidom.parseString(rml_head)
# #for frame in head_dom.getElementsByTagName('frame'):
# # frame.parentNode.removeChild(frame)
# node2 = head_dom.documentElement
# for tag in node2.childNodes:
# if tag.nodeType==tag.ELEMENT_NODE:
# found = self._find_node(node, tag.localName)
# # rml_frames = found.getElementsByTagName('frame')
# if found:
# if tag.hasAttribute('position') and (tag.getAttribute('position')=='inside'):
# found.appendChild(tag)
# else:
# found.parentNode.replaceChild(tag, found)
# # for frame in rml_frames:
# # tag.appendChild(frame)
# return True
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -78,7 +78,6 @@ class tax_report(rml_parse.rml_parse):
top_result.append(res_general[ind_general])
ind_general+=1
i+=1
#array_result = self.sort_result(top_result)
return top_result
#return array_result
@ -133,8 +132,6 @@ class tax_report(rml_parse.rml_parse):
company_id, periods_ids,))
res = self.cr.dictfetchall()
#AND line.period_id IN ('+ period_sql_list +') \
i = 0
while i<len(res):
res[i]['account'] = obj_account.browse(self.cr, self.uid, res[i]['account_id'], context=context)
@ -220,6 +217,6 @@ class tax_report(rml_parse.rml_parse):
report_sxw.report_sxw('report.account.vat.declaration', 'account.tax.code',
'addons/account/report/tax_report.rml', parser=tax_report, header=True)
'addons/account/report/tax_report.rml', parser=tax_report, header="internal")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -125,10 +125,10 @@
<td><para style="P12a">Tax Amount</para></td>
</tr>
<tr>
<td><para style="P5"><font>[[ repeatIn(get_lines(data['form']['based_on'],data['form']['periods'],data['form']['company_id']), 'o') ]]</font><font color="white">[[ '...'*len(o['level']) ]]</font> <font>[[o['type']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))]]</font><font>[[ o['code'] ]] [[ o['name'] ]]</font></para></td>
<td><para style="P6"><font>[[ len(o['level'])&lt;3 and setTag('para','para',{'fontName':"Helvetica-Bold"}) ]]</font><font>[[ formatLang(o['debit']) ]]</font></para></td>
<td><para style="P6"><font>[[ len(o['level'])&lt;3 and setTag('para','para',{'fontName':"Helvetica-Bold"}) ]]</font><font>[[ formatLang(o['credit'])]]</font></para></td>
<td><para style="P6"><font>[[ len(o['level'])&lt;3 and setTag('para','para',{'fontName':"Helvetica-Bold"}) ]]</font><font>[[ formatLang(o['tax_amount']) ]]</font></para></td>
<td><para style="P5"><font>[[ repeatIn(get_lines(data['form']['based_on'],data['form']['periods'],data['form']['company_id']), 'o') ]]</font><font color="white">[[ (o['level']) ]]</font> <font>[[o['type']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))]]</font><font>[[ o['code'] ]] [[ o['name'] ]]</font></para></td>
<td><para style="P6"><font>[[ (o['level'])&gt;2 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]]</font><font>[[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]]</font><font>[[ o['type']&lt;&gt;'view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]]</font></para></td>
<td><para style="P6"><font>[[ (o['level'])&gt;2 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]]</font><font>[[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['credit']) ]]</font><font>[[ o['type']&lt;&gt;'view' and removeParentNode('font') ]][[ formatLang(o['credit'])]]</font></para></td>
<td><para style="P6"><font>[[ (o['level'])&gt;2 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]]</font><font>[[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]]</font><font>[[ o['type']&lt;&gt;'view' and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]]</font></para></td>
</tr>
</blockTable>
</story>

View File

@ -58,5 +58,5 @@ report_sxw.report_sxw(
'report.account.move.voucher',
'account.move',
'addons/account/report/voucher_print.rml',
parser=report_voucher_move,header=False
parser=report_voucher_move,header="external"
)

View File

@ -13,34 +13,131 @@
<field name="name">Accounting / Manager</field>
</record>
<!-- <record id="menu_finance_configuration" model="ir.ui.menu">-->
<!-- <field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>-->
<!-- </record>-->
<record model="res.groups" context="{'noadmin':True}" id="group_accounting_accountant">
<field name="name">Accounting / Accountant and Manager</field>
</record>
<record id="menu_finance_reporting" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
</record>
<record id="menu_finance_legal_statement" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_finance_receivables" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_invoice')])]" name="groups_id"/>
<field eval="[(6,0,[ref('group_account_invoice'),ref('group_account_manager'),ref('group_account_user')])]" name="groups_id"/>
</record>
<record id="menu_finance_payables" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_invoice')])]" name="groups_id"/>
</record>
<record id="menu_automatic_reconcile" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user')])]" name="groups_id"/>
<field eval="[(6,0,[ref('group_account_invoice'), ref('group_account_user'),ref('group_account_manager')])]" name="groups_id"/>
</record>
<record id="menu_finance_charts" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user'), ref('group_account_manager')])]" name="groups_id"/>
</record>
<record id="menu_eaction_account_moves_sale" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice')])]" name="groups_id"/>
</record>
<record id="menu_eaction_account_moves_purchase" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice')])]" name="groups_id"/>
</record>
<record id="menu_action_invoice_tree1" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_action_invoice_tree2" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_action_invoice_tree3" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_action_invoice_tree4" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_invoice'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_finance_bank_and_cash" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_action_account_tree2" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_finance_entries" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user')])]" name="groups_id"/>
</record>
<record id="menu_action_move_journal_line_form" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_eaction_account_moves_all" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user')])]" name="groups_id"/>
</record>
<record id="menu_dashboard_acc" model="ir.ui.menu">
<field eval="[(6, 0, [ref('group_account_user')])]" name="groups_id"/>
</record>
<record id="final_accounting_reports" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_journals_report" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_action_tax_code_tree" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user'),ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_finance_periodical_processing" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user')])]" name="groups_id"/>
</record>
<record id="menu_general_ledger" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_general_Balance_report" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_account_bs_report" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_account_pl_report" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_tax_report" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="next_id_22" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_manager'),ref('base.group_system')])]" name="groups_id"/>
</record>
<record id="menu_action_account_invoice_report_all" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
</record>
<record id="menu_action_account_entries_report_all" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
</record>
<record id="menu_finance_statistic_report_statement" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
</record>
<record id="account_move_comp_rule" model="ir.rule">
<field name="name">Account Entry</field>
<field ref="model_account_move" name="model_id"/>
@ -125,4 +222,18 @@
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="account_fiscal_position_comp_rule" model="ir.rule">
<field name="name">Account fiscal position company rule</field>
<field model="ir.model" name="model_id" ref="model_account_fiscal_position"/>
<field eval="True" name="global"/>
<field name="domain_force">[('company_id','=',user.company_id.id)]</field>
</record>
<record id="account_model_comp_rule" model="ir.rule">
<field name="name">Account model company rule</field>
<field model="ir.model" name="model_id" ref="model_account_model"/>
<field eval="True" name="global"/>
<field name="domain_force">[('company_id','=',user.company_id.id)]</field>
</record>
</data></openerp>

View File

@ -11,7 +11,7 @@
"access_account_journal_column","account.journal.column","model_account_journal_column","account.group_account_user",1,0,0,0
"access_account_journal","account.journal","model_account_journal","account.group_account_user",1,0,0,0
"access_account_period","account.period","model_account_period","account.group_account_user",1,0,0,0
"access_account_journal_period_manager","account.journal.period manager","model_account_journal_period","account.group_account_manager",1,1,1,1
"access_account_journal_period_manager","account.journal.period manager","model_account_journal_period","account.group_account_manager",1,0,0,0
"access_account_journal_period","account.journal.period","model_account_journal_period","account.group_account_user",1,1,1,1
"access_account_move","account.move","model_account_move","account.group_account_user",1,1,1,1
"access_account_move_line","account.move.line","model_account_move_line","account.group_account_user",1,1,1,1
@ -22,44 +22,44 @@
"access_account_model_line","account.model.line","model_account_model_line","account.group_account_user",1,1,1,1
"access_account_subscription","account.subscription","model_account_subscription","account.group_account_user",1,1,1,1
"access_account_subscription_line","account.subscription.line","model_account_subscription_line","account.group_account_user",1,1,1,1
"access_account_tax_template","account.tax.template","model_account_tax_template","account.group_account_manager",1,1,1,1
"access_account_account_template","account.account.template","model_account_account_template","account.group_account_manager",1,1,1,1
"access_account_subscription_manager","account.subscription manager","model_account_subscription","account.group_account_manager",1,0,0,0
"access_account_subscription_line_manager","account.subscription.line manager","model_account_subscription_line","account.group_account_manager",1,0,0,0
"access_account_account_template","account.account.template","model_account_account_template","account.group_account_manager",1,0,0,0
"access_account_tax_code_template","account.tax.code.template","model_account_tax_code_template","account.group_account_manager",1,0,0,0
"access_account_chart_template","account.chart.template","model_account_chart_template","account.group_account_manager",1,1,1,1
"access_account_tax_template","account.tax.template","model_account_tax_template","account.group_account_manager",1,1,1,1
"access_account_tax_template","account.tax.template","model_account_tax_template","account.group_account_manager",1,0,0,0
"access_account_bank_statement","account.bank.statement","model_account_bank_statement","account.group_account_user",1,0,0,0
"access_account_bank_statement_reconcile","account.bank.statement.reconcile","model_account_bank_statement_reconcile","account.group_account_user",1,1,1,1
"access_account_bank_statement_reconcile_line","account.bank.statement.reconcile.line","model_account_bank_statement_reconcile_line","account.group_account_user",1,1,1,1
"access_account_bank_statement_line","account.bank.statement.line","model_account_bank_statement_line","account.group_account_user",1,0,0,0
"access_account_analytic_line","account.analytic.line","model_account_analytic_line","account.group_account_user",1,1,1,1
"access_account_analytic_line_manager","account.analytic.line manager","model_account_analytic_line","account.group_account_manager",1,0,0,0
"access_report_hr_timesheet_invoice_journal","report.hr.timesheet.invoice.journal","model_report_hr_timesheet_invoice_journal","account.group_account_manager",1,0,0,0
"access_account_analytic_account","account.analytic.account","analytic.model_account_analytic_account","base.group_user",1,0,0,0
"access_account_analytic_journal","account.analytic.journal","model_account_analytic_journal","account.group_account_user",1,0,0,0
"access_account_invoice_uinvoice","account.invoice","model_account_invoice","account.group_account_invoice",1,1,1,1
"access_account_invoice_line_uinvoice","account.invoice.line","model_account_invoice_line","account.group_account_invoice",1,1,1,1
"access_account_invoice_tax_uinvoice","account.invoice.tax","model_account_invoice_tax","account.group_account_invoice",1,1,1,1
"access_account_analytic_line_uinvoice","account.analytic.line","model_account_analytic_line","account.group_account_manager",1,0,0,0
"access_account_move_uinvoice","account.move","model_account_move","account.group_account_invoice",1,0,0,0
"access_account_move_line_uinvoice","account.move.line invoice","model_account_move_line","account.group_account_invoice",1,1,1,1
"access_account_move_reconcile_uinvoice","account.move.reconcile","model_account_move_reconcile","account.group_account_invoice",1,1,1,1
"access_account_journal_period_uinvoice","account.journal.period","model_account_journal_period","account.group_account_invoice",1,1,1,1
"access_account_payment_term_manager","account.payment.term","model_account_payment_term","account.group_account_manager",1,1,1,1
"access_account_payment_term_line_manager","account.payment.term.line","model_account_payment_term_line","account.group_account_manager",1,1,1,1
"access_account_account_type_manager","account.account.type","model_account_account_type","account.group_account_manager",1,1,1,1
"access_account_tax_manager","account.tax","model_account_tax","account.group_account_manager",1,1,1,1
"access_account_account_manager","account.account","model_account_account","account.group_account_manager",1,1,1,1
"access_account_journal_view_manager","account.journal.view","model_account_journal_view","account.group_account_manager",1,1,1,1
"access_account_journal_column_manager","account.journal.column","model_account_journal_column","account.group_account_manager",1,1,1,1
"access_account_journal_manager","account.journal","model_account_journal","account.group_account_manager",1,1,1,1
"access_account_payment_term_manager","account.payment.term","model_account_payment_term","account.group_account_manager",1,0,0,0
"access_account_payment_term_line_manager","account.payment.term.line","model_account_payment_term_line","account.group_account_manager",1,0,0,0
"access_account_account_type_manager","account.account.type","model_account_account_type","account.group_account_manager",1,0,0,0
"access_account_tax_manager","account.tax","model_account_tax","account.group_account_manager",1,0,0,0
"access_account_account_manager","account.account","model_account_account","account.group_account_manager",1,0,0,0
"access_account_journal_view_manager","account.journal.view","model_account_journal_view","account.group_account_manager",1,0,0,0
"access_account_journal_column_manager","account.journal.column","model_account_journal_column","account.group_account_manager",1,0,0,0
"access_account_journal_manager","account.journal","model_account_journal","account.group_account_manager",1,0,0,0
"access_account_journal_invoice","account.journal invoice","model_account_journal","account.group_account_invoice",1,0,0,0
"access_account_period_manager","account.period","model_account_period","account.group_account_manager",1,0,0,0
"access_account_period_invoice","account.period invoice","model_account_period","account.group_account_invoice",1,0,0,0
"access_account_tax_code_manager","account.tax.code","model_account_tax_code","account.group_account_manager",1,0,0,0
"access_account_tax_manager","account.tax","model_account_tax","account.group_account_manager",1,1,1,1
"access_account_invoice_group_invoice","account.invoice group invoice","model_account_invoice","account.group_account_invoice",1,1,1,1
"access_account_analytic_account_manager","account.analytic.account","analytic.model_account_analytic_account","account.group_account_manager",1,1,1,1
"access_account_analytic_journal_manager","account.analytic.journal","model_account_analytic_journal","account.group_account_manager",1,1,1,1
"access_account_fiscalyear","account.fiscalyear","model_account_fiscalyear","account.group_account_manager",1,1,1,1
"access_account_analytic_account_manager","account.analytic.account","analytic.model_account_analytic_account","account.group_account_manager",1,0,0,0
"access_account_analytic_journal_manager","account.analytic.journal","model_account_analytic_journal","account.group_account_manager",1,0,0,0
"access_account_fiscalyear","account.fiscalyear","model_account_fiscalyear","account.group_account_manager",1,0,0,0
"access_account_fiscalyear_user","account.fiscalyear.user","model_account_fiscalyear","account.group_account_user",1,0,0,0
"access_account_fiscalyear_invoice","account.fiscalyear.invoice","model_account_fiscalyear","account.group_account_invoice",1,0,0,0
"access_account_fiscalyear_partner_manager","account.fiscalyear.partnermanager","model_account_fiscalyear","base.group_partner_manager",1,0,0,0
@ -71,49 +71,43 @@
"access_account_payment_term_line_partner_manager","account.payment.term.line partner manager","model_account_payment_term_line","base.group_user",1,0,0,0
"access_account_account_product_manager","account.account product manager","model_account_account","product.group_product_manager",1,0,0,0
"access_account_journal_product_manager","account.journal product manager","model_account_journal","product.group_product_manager",1,0,0,0
"access_account_fiscal_position_product_manager","account.fiscal.position account.manager","model_account_fiscal_position","account.group_account_manager",1,1,1,1
"access_account_fiscal_position_tax_product_manager","account.fiscal.position.tax account.manager","model_account_fiscal_position_tax","account.group_account_manager",1,1,1,1
"access_account_fiscal_position_account_product_manager","account.fiscal.position account.manager","model_account_fiscal_position_account","account.group_account_manager",1,1,1,1
"access_account_fiscal_position_product_manager","account.fiscal.position account.manager","model_account_fiscal_position","account.group_account_manager",1,0,0,0
"access_account_fiscal_position_tax_product_manager","account.fiscal.position.tax account.manager","model_account_fiscal_position_tax","account.group_account_manager",1,0,0,0
"access_account_fiscal_position_account_product_manager","account.fiscal.position account.manager","model_account_fiscal_position_account","account.group_account_manager",1,0,0,0
"access_account_fiscal_position","account.fiscal.position all","model_account_fiscal_position","base.group_user",1,0,0,0
"access_account_fiscal_position_tax","account.fiscal.position.tax all","model_account_fiscal_position_tax","base.group_user",1,0,0,0
"access_account_fiscal_position_account","account.fiscal.position all","model_account_fiscal_position_account","base.group_user",1,0,0,0
"access_account_fiscal_position_template","account.fiscal.position.template","model_account_fiscal_position_template","account.group_account_manager",1,1,1,1
"access_account_fiscal_position_tax_template","account.fiscal.position.tax.template","model_account_fiscal_position_tax_template","account.group_account_manager",1,1,1,1
"access_account_fiscal_position_account_template","account.fiscal.position.account.template","model_account_fiscal_position_account_template","account.group_account_manager",1,1,1,1
"access_account_fiscal_position_template","account.fiscal.position.template","model_account_fiscal_position_template","account.group_account_manager",1,0,0,0
"access_account_fiscal_position_tax_template","account.fiscal.position.tax.template","model_account_fiscal_position_tax_template","account.group_account_manager",1,0,0,0
"access_account_fiscal_position_account_template","account.fiscal.position.account.template","model_account_fiscal_position_account_template","account.group_account_manager",1,0,0,0
"access_account_sequence_fiscal_year","account.sequence.fiscalyear","model_account_sequence_fiscalyear","account.group_account_user",1,1,1,1
"access_account_sequence_fiscal_year_user","account.sequence.fiscalyear user","model_account_sequence_fiscalyear","base.group_user",1,0,0,0
"access_report_account_receivable","report.account.receivable","model_report_account_receivable","account.group_account_manager",1,1,1,1
"access_temp_range","temp.range","model_temp_range","account.group_account_manager",1,0,0,0
"access_report_aged_receivable","report.aged.receivable","model_report_aged_receivable","account.group_account_manager",1,0,0,0
"access_report_invoice_created","report.invoice.created","model_report_invoice_created","account.group_account_manager",1,0,0,0
"access_report_account_type_sales","report.account_type.sales","model_report_account_type_sales","account.group_account_manager",1,0,0,0
"access_report_account_sales","report.account.sales","model_report_account_sales","account.group_account_manager",1,0,0,0
"access_report_aged_receivable","report.aged.receivable","model_report_aged_receivable","account.group_account_manager",1,1,1,1
"access_report_invoice_created","report.invoice.created","model_report_invoice_created","account.group_account_manager",1,1,1,1
"access_report_account_type_sales","report.account_type.sales","model_report_account_type_sales","account.group_account_manager",1,1,1,1
"access_report_account_sales","report.account.sales","model_report_account_sales","account.group_account_manager",1,1,1,1
"access_account_invoice_report","account.invoice.report","model_account_invoice_report","account.group_account_manager",1,1,1,1
"access_account_account_report_manager","account.account.report","model_account_account_report","account.group_account_manager",1,0,0,0
"access_res_partner_group_account_manager","res_partner group_account_manager","model_res_partner","account.group_account_manager",1,1,1,1
"access_res_partner_group_account_manager","res_partner group_account_manager","model_res_partner","account.group_account_manager",1,0,0,0
"access_account_invoice_accountant","account.invoice accountant","model_account_invoice","account.group_account_user",1,0,0,0
"access_account_tax_code_accountant","account.tax.code accountant","model_account_tax_code","account.group_account_user",1,1,1,1
"access_account_analytic_chart","account.analytic.chart","model_account_analytic_chart","account.group_account_user",1,1,1,1
"access_account_move_line_manager","account.move.line manager","model_account_move_line","account.group_account_manager",1,1,1,1
"access_account_move_line_manager","account.move.line manager","model_account_move_line","account.group_account_manager",1,0,0,0
"access_account_move_manager","account.move manager","model_account_move","account.group_account_manager",1,0,0,0
"access_account_invoice_manager","account.invoice manager","model_account_invoice","account.group_account_manager",1,0,0,0
"access_account_bank_statement_manager","account.bank.statement manager","model_account_bank_statement","account.group_account_manager",1,0,0,0
"access_account_analytic_chart_manager","account.analytic.chart manager","model_account_analytic_chart","account.group_account_manager",1,0,0,0
"access_account_entries_report_manager","account.entries.report","model_account_entries_report","account.group_account_manager",1,1,1,1
"access_analytic_entries_report_manager","analytic.entries.report","model_analytic_entries_report","account.group_account_manager",1,0,0,0
"access_account_cashbox_line","account.cashbox.line","model_account_cashbox_line","account.group_account_manager",1,1,1,1
"access_account_cashbox_line","account.cashbox.line","model_account_cashbox_line","account.group_account_manager",1,0,0,0
"access_account_cashbox_line","account.cashbox.line","model_account_cashbox_line","account.group_account_user",1,0,0,0
"access_account_move_line_system","account.move.line system","model_account_move_line","base.group_system",1,0,0,0
"access_account_invoice_system","account.invoice system","model_account_invoice","base.group_system",1,0,0,0
"access_account_bank_statement_system","account.bank.statement system","model_account_bank_statement","base.group_system",1,0,0,0
"access_account_move_system","account.move system","model_account_move","base.group_system",1,0,0,0
"access_account_analytic_line_system","account.analytic.line system","model_account_analytic_line","base.group_system",1,0,0,0
"access_account_analytic_system","account.analytic.chart system","model_account_analytic_chart","base.group_system",1,0,0,0
"access_account_tax_code_system","account.tax.code system","model_account_tax_code","base.group_system",1,1,1,1
"access_account_journal_system","account.journal system","model_account_journal","base.group_system",1,1,1,1
"access_account_chart_system","account.chart system","model_account_chart","base.group_system",1,0,0,0
"access_account_period_system","account.period system","model_account_period","base.group_system",1,1,1,1
"access_account_chart_accountant","account.chart accountant","model_account_chart","group_account_user",1,0,0,0
"access_account_journal_view_system","account.journal.view system","model_account_journal_view","base.group_system",1,1,1,1
"access_account_account_type_system","account.account.type system","model_account_account_type","base.group_system",1,1,1,1
"access_account_analytic_journal_system","account.analytic.journal system","model_account_analytic_journal","base.group_system",1,1,1,1
@ -150,8 +144,58 @@
"access_account_invoice_line_accountant","account.invoice.line accountant","model_account_invoice_line","account.group_account_user",1,0,0,0
"access_res_partner_address_accountant","res.partner.address accountant","base.model_res_partner_address","account.group_account_user",1,0,0,0
"access_account_invoice_line_manager","account.invoice.line manager","model_account_invoice_line","account.group_account_manager",1,0,0,0
"access_analytic_report_manager","analytic.report manager","model_analytic_report","account.group_account_manager",1,1,1,1
"access_account_account_invoice","account.account invoice","model_account_account","account.group_account_invoice",1,1,1,1
"access_res_partner_address_invoice","res.partner.address invoice","base.model_res_partner_address","account.group_account_invoice",1,1,1,1
"access_account_invoice_line_system","account.invoice.line system","model_account_invoice_line","base.group_system",1,0,0,0
"access_account_analytic_accountant","account.analytic.account accountant","analytic.model_account_analytic_account","account.group_account_user",1,1,1,1
"access_account_account_type_invoice","account.account.type invoice","model_account_account_type","account.group_account_invoice",1,1,1,1
"access_report_account_receivable_invoice","report.account.receivable.invoice","model_report_account_receivable","account.group_account_invoice",1,1,1,1
"access_report_account_receivable_user","report.account.receivable.user","model_report_account_receivable","account.group_account_user",1,1,1,1
"access_account_sequence_fiscal_year_invoice","account.sequence.fiscalyear invoice","model_account_sequence_fiscalyear","account.group_account_invoice",1,1,1,1
"access_account_invoice_accounting_accountant","account.invoice","model_account_invoice","account.group_accounting_accountant",1,1,1,1
"access_account_invoice_line_accounting_accountant","account.invoice.line","model_account_invoice_line","account.group_accounting_accountant",1,1,1,1
"access_res_partner_accounting_accountant","res.partner","base.model_res_partner","account.group_accounting_accountant",1,1,1,1
"access_account_account_accounting_accountant","account.account","model_account_account","account.group_accounting_accountant",1,0,0,0
"access_account_account_type_accounting_accountant","account.type","model_account_account_type","account.group_accounting_accountant",1,0,0,0
"access_account_tax_accounting_accountant","account.tax","model_account_tax","account.group_accounting_accountant",1,0,0,0
"access_account_tax_code_accounting_accountant","account.tax.code","model_account_tax_code","account.group_accounting_accountant",1,0,0,0
"access_account_invoice_tax_accounting_accountant","account.invoice.tax","model_account_invoice_tax","account.group_accounting_accountant",1,0,0,0
"access_res_partner_address_accounting_accountant","res.partner.address","base.model_res_partner_address","account.group_accounting_accountant",1,1,1,1
"access_account_move_accounting_accountant","account.move","model_account_move","account.group_accounting_accountant",1,1,1,1
"access_account_move_line_accounting_accountant","account.move.line","model_account_move_line","account.group_accounting_accountant",1,1,1,1
"access_res_partner_bank_accounting_accountant","res.partner.bank","base.model_res_partner_bank","account.group_accounting_accountant",1,0,0,0
"access_res_partner_event_accounting_accountant","res.partner.event","base.model_res_partner_event","account.group_accounting_accountant",1,0,0,0
"access_res_currency_rate_accounting_accountant","res.currency.rate","base.model_res_currency_rate","account.group_accounting_accountant",1,1,0,0
"access_res_currency_accounting_accountant","res.currency","base.model_res_currency","account.group_accounting_accountant",1,1,0,0
"access_product_template_accounting_accountant","product.template","product.model_product_template","account.group_accounting_accountant",1,0,0,0
"access_product_product_accounting_accountant","product.product","product.model_product_product","account.group_accounting_accountant",1,0,0,0
"access_product_category_accounting_accountant","product.category","product.model_product_category","account.group_accounting_accountant",1,0,0,0
"access_product_pricelist_accounting_accountant","product.pricelist","product.model_product_pricelist","account.group_accounting_accountant",1,0,0,0
"access_product_pricelist_version_accounting_accountant","product.pricelist.version","product.model_product_pricelist_version","account.group_accounting_accountant",1,0,0,0
"access_product_pricelist_item_accounting_accountant","product.pricelist.item","product.model_product_pricelist_item","account.group_accounting_accountant",1,0,0,0
"access_account_payment_term_accounting_accountant","account.payment.term","model_account_payment_term","account.group_accounting_accountant",1,0,0,0
"access_res_payterm_accounting_accountant","res.payterm","base.model_res_payterm","account.group_accounting_accountant",1,0,0,0
"access_account_payment_term_line_accounting_accountant","account.payment.term.line","model_account_payment_term_line","account.group_accounting_accountant",1,0,0,0
"access_account_journal_accounting_accountant","account.journal","model_account_journal","account.group_accounting_accountant",1,0,0,0
"access_account_fiscalyear_accounting_accountant","account.fiscalyear","model_account_fiscalyear","account.group_accounting_accountant",1,0,0,0
"access_account_period_accounting_accountant","account.period","model_account_period","account.group_accounting_accountant",1,0,0,0
"access_account_move_reconcile_accounting_accountant","account.move.reconcile","model_account_move_reconcile","account.group_accounting_accountant",1,1,1,1
"access_account_tax_code_accounting_accountant","account.tax.code","model_account_tax_code","account.group_accounting_accountant",1,0,0,0
"access_account_bank_statement_accounting_accountant","account.bank.statement","model_account_bank_statement","account.group_accounting_accountant",1,1,1,1
"access_account_cashbox_line_accounting_accountant","account.cashbox.line","model_account_cashbox_line","account.group_accounting_accountant",1,1,1,1
"access_account_bank_statement_reconcile_line","account.bank.statement.reconcile.line","model_account_bank_statement_reconcile_line","account.group_accounting_accountant",1,1,1,1
"access_account_bank_statement_line_accounting_accountant","account.bank.statement.line","model_account_bank_statement_line","account.group_accounting_accountant",1,1,1,1
"access_account_invoice_report_accounting_accountant","account.invoice.report","model_account_invoice_report","account.group_accounting_accountant",1,0,0,0
"access_report_account_receivable_accounting_accountant","report.account.receivable","model_report_account_receivable","account.group_accounting_accountant",1,0,0,0
"access_temp_range_accounting_accountant","temp.range","model_temp_range","account.group_accounting_accountant",1,0,0,0
"access_report_aged_receivable_accounting_accountant","report.aged.receivable","model_report_aged_receivable","account.group_accounting_accountant",1,0,0,0
"access_report_invoice_created_accounting_accountant","report.invoice.created","model_report_invoice_created","account.group_accounting_accountant",1,0,0,0
"access_account_entries_report_accounting_accountant","account.entries.report","model_account_entries_report","account.group_accounting_accountant",1,0,0,0
"access_account_invoice_report_accounting_accountant","account.invoice.report","model_account_invoice_report","account.group_accounting_accountant",1,0,0,0
"access_account_journal_view_accounting_accountant","account.journal.view","model_account_journal_view","account.group_accounting_accountant",1,0,0,0
"access_account_journal_period_accounting_accountant","account.journal.period","model_account_journal_period","account.group_accounting_accountant",1,1,1,1
"access_account_journal_column_accounting_accountant","account.journal.column","model_account_journal_column","account.group_accounting_accountant",1,1,1,1
"access_account_analytic_account_accounting_accountant","account.analytic.account","analytic.model_account_analytic_account","account.group_accounting_accountant",1,0,0,0
"access_account_analytic_line_accounting_accountant","account.analytic.line","analytic.model_account_analytic_line","account.group_accounting_accountant",1,0,0,0
"access_account_analytic_journal_accounting_accountant","account.analytic.journal","model_account_analytic_journal","account.group_accounting_accountant",1,0,0,0
"access_account_bank_statement_reconcile_accounting_accountant","account.bank.statement.reconcile","model_account_bank_statement_reconcile","account.group_accounting_accountant",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
11 access_account_journal_column account.journal.column model_account_journal_column account.group_account_user 1 0 0 0
12 access_account_journal account.journal model_account_journal account.group_account_user 1 0 0 0
13 access_account_period account.period model_account_period account.group_account_user 1 0 0 0
14 access_account_journal_period_manager account.journal.period manager model_account_journal_period account.group_account_manager 1 1 0 1 0 1 0
15 access_account_journal_period account.journal.period model_account_journal_period account.group_account_user 1 1 1 1
16 access_account_move account.move model_account_move account.group_account_user 1 1 1 1
17 access_account_move_line account.move.line model_account_move_line account.group_account_user 1 1 1 1
22 access_account_model_line account.model.line model_account_model_line account.group_account_user 1 1 1 1
23 access_account_subscription account.subscription model_account_subscription account.group_account_user 1 1 1 1
24 access_account_subscription_line account.subscription.line model_account_subscription_line account.group_account_user 1 1 1 1
25 access_account_tax_template access_account_subscription_manager account.tax.template account.subscription manager model_account_tax_template model_account_subscription account.group_account_manager 1 1 0 1 0 1 0
26 access_account_account_template access_account_subscription_line_manager account.account.template account.subscription.line manager model_account_account_template model_account_subscription_line account.group_account_manager 1 1 0 1 0 1 0
27 access_account_account_template account.account.template model_account_account_template account.group_account_manager 1 0 0 0
28 access_account_tax_code_template account.tax.code.template model_account_tax_code_template account.group_account_manager 1 0 0 0
29 access_account_chart_template account.chart.template model_account_chart_template account.group_account_manager 1 1 1 1
30 access_account_tax_template account.tax.template model_account_tax_template account.group_account_manager 1 1 0 1 0 1 0
31 access_account_bank_statement account.bank.statement model_account_bank_statement account.group_account_user 1 0 0 0
32 access_account_bank_statement_reconcile account.bank.statement.reconcile model_account_bank_statement_reconcile account.group_account_user 1 1 1 1
33 access_account_bank_statement_reconcile_line account.bank.statement.reconcile.line model_account_bank_statement_reconcile_line account.group_account_user 1 1 1 1
34 access_account_bank_statement_line account.bank.statement.line model_account_bank_statement_line account.group_account_user 1 0 0 0
35 access_account_analytic_line account.analytic.line model_account_analytic_line account.group_account_user 1 1 1 1
36 access_account_analytic_line_manager account.analytic.line manager model_account_analytic_line account.group_account_manager 1 0 0 0
37 access_report_hr_timesheet_invoice_journal report.hr.timesheet.invoice.journal model_report_hr_timesheet_invoice_journal account.group_account_manager 1 0 0 0
38 access_account_analytic_account account.analytic.account analytic.model_account_analytic_account base.group_user 1 0 0 0
39 access_account_analytic_journal account.analytic.journal model_account_analytic_journal account.group_account_user 1 0 0 0
40 access_account_invoice_uinvoice account.invoice model_account_invoice account.group_account_invoice 1 1 1 1
41 access_account_invoice_line_uinvoice account.invoice.line model_account_invoice_line account.group_account_invoice 1 1 1 1
42 access_account_invoice_tax_uinvoice account.invoice.tax model_account_invoice_tax account.group_account_invoice 1 1 1 1
access_account_analytic_line_uinvoice account.analytic.line model_account_analytic_line account.group_account_manager 1 0 0 0
43 access_account_move_uinvoice account.move model_account_move account.group_account_invoice 1 0 0 0
44 access_account_move_line_uinvoice account.move.line invoice model_account_move_line account.group_account_invoice 1 1 1 1
45 access_account_move_reconcile_uinvoice account.move.reconcile model_account_move_reconcile account.group_account_invoice 1 1 1 1
46 access_account_journal_period_uinvoice account.journal.period model_account_journal_period account.group_account_invoice 1 1 1 1
47 access_account_payment_term_manager account.payment.term model_account_payment_term account.group_account_manager 1 1 0 1 0 1 0
48 access_account_payment_term_line_manager account.payment.term.line model_account_payment_term_line account.group_account_manager 1 1 0 1 0 1 0
49 access_account_account_type_manager account.account.type model_account_account_type account.group_account_manager 1 1 0 1 0 1 0
50 access_account_tax_manager account.tax model_account_tax account.group_account_manager 1 1 0 1 0 1 0
51 access_account_account_manager account.account model_account_account account.group_account_manager 1 1 0 1 0 1 0
52 access_account_journal_view_manager account.journal.view model_account_journal_view account.group_account_manager 1 1 0 1 0 1 0
53 access_account_journal_column_manager account.journal.column model_account_journal_column account.group_account_manager 1 1 0 1 0 1 0
54 access_account_journal_manager account.journal model_account_journal account.group_account_manager 1 1 0 1 0 1 0
55 access_account_journal_invoice account.journal invoice model_account_journal account.group_account_invoice 1 0 0 0
56 access_account_period_manager account.period model_account_period account.group_account_manager 1 0 0 0
57 access_account_period_invoice account.period invoice model_account_period account.group_account_invoice 1 0 0 0
58 access_account_tax_code_manager account.tax.code model_account_tax_code account.group_account_manager 1 0 0 0
access_account_tax_manager account.tax model_account_tax account.group_account_manager 1 1 1 1
59 access_account_invoice_group_invoice account.invoice group invoice model_account_invoice account.group_account_invoice 1 1 1 1
60 access_account_analytic_account_manager account.analytic.account analytic.model_account_analytic_account account.group_account_manager 1 1 0 1 0 1 0
61 access_account_analytic_journal_manager account.analytic.journal model_account_analytic_journal account.group_account_manager 1 1 0 1 0 1 0
62 access_account_fiscalyear account.fiscalyear model_account_fiscalyear account.group_account_manager 1 1 0 1 0 1 0
63 access_account_fiscalyear_user account.fiscalyear.user model_account_fiscalyear account.group_account_user 1 0 0 0
64 access_account_fiscalyear_invoice account.fiscalyear.invoice model_account_fiscalyear account.group_account_invoice 1 0 0 0
65 access_account_fiscalyear_partner_manager account.fiscalyear.partnermanager model_account_fiscalyear base.group_partner_manager 1 0 0 0
71 access_account_payment_term_line_partner_manager account.payment.term.line partner manager model_account_payment_term_line base.group_user 1 0 0 0
72 access_account_account_product_manager account.account product manager model_account_account product.group_product_manager 1 0 0 0
73 access_account_journal_product_manager account.journal product manager model_account_journal product.group_product_manager 1 0 0 0
74 access_account_fiscal_position_product_manager account.fiscal.position account.manager model_account_fiscal_position account.group_account_manager 1 1 0 1 0 1 0
75 access_account_fiscal_position_tax_product_manager account.fiscal.position.tax account.manager model_account_fiscal_position_tax account.group_account_manager 1 1 0 1 0 1 0
76 access_account_fiscal_position_account_product_manager account.fiscal.position account.manager model_account_fiscal_position_account account.group_account_manager 1 1 0 1 0 1 0
77 access_account_fiscal_position account.fiscal.position all model_account_fiscal_position base.group_user 1 0 0 0
78 access_account_fiscal_position_tax account.fiscal.position.tax all model_account_fiscal_position_tax base.group_user 1 0 0 0
79 access_account_fiscal_position_account account.fiscal.position all model_account_fiscal_position_account base.group_user 1 0 0 0
80 access_account_fiscal_position_template account.fiscal.position.template model_account_fiscal_position_template account.group_account_manager 1 1 0 1 0 1 0
81 access_account_fiscal_position_tax_template account.fiscal.position.tax.template model_account_fiscal_position_tax_template account.group_account_manager 1 1 0 1 0 1 0
82 access_account_fiscal_position_account_template account.fiscal.position.account.template model_account_fiscal_position_account_template account.group_account_manager 1 1 0 1 0 1 0
83 access_account_sequence_fiscal_year account.sequence.fiscalyear model_account_sequence_fiscalyear account.group_account_user 1 1 1 1
84 access_account_sequence_fiscal_year_user account.sequence.fiscalyear user model_account_sequence_fiscalyear base.group_user 1 0 0 0
85 access_report_account_receivable report.account.receivable model_report_account_receivable account.group_account_manager 1 1 1 1
86 access_temp_range temp.range model_temp_range account.group_account_manager 1 0 0 0
87 access_report_aged_receivable report.aged.receivable model_report_aged_receivable account.group_account_manager 1 0 1 0 1 0 1
88 access_report_invoice_created report.invoice.created model_report_invoice_created account.group_account_manager 1 0 1 0 1 0 1
89 access_report_account_type_sales report.account_type.sales model_report_account_type_sales account.group_account_manager 1 0 1 0 1 0 1
90 access_report_account_sales report.account.sales model_report_account_sales account.group_account_manager 1 0 1 0 1 0 1
91 access_account_invoice_report account.invoice.report model_account_invoice_report account.group_account_manager 1 1 1 1
92 access_account_account_report_manager access_res_partner_group_account_manager account.account.report res_partner group_account_manager model_account_account_report model_res_partner account.group_account_manager 1 0 0 0
access_res_partner_group_account_manager res_partner group_account_manager model_res_partner account.group_account_manager 1 1 1 1
93 access_account_invoice_accountant account.invoice accountant model_account_invoice account.group_account_user 1 0 0 0
94 access_account_tax_code_accountant account.tax.code accountant model_account_tax_code account.group_account_user 1 1 1 1
95 access_account_analytic_chart access_account_move_line_manager account.analytic.chart account.move.line manager model_account_analytic_chart model_account_move_line account.group_account_user account.group_account_manager 1 1 0 1 0 1 0
access_account_move_line_manager account.move.line manager model_account_move_line account.group_account_manager 1 1 1 1
96 access_account_move_manager account.move manager model_account_move account.group_account_manager 1 0 0 0
97 access_account_invoice_manager account.invoice manager model_account_invoice account.group_account_manager 1 0 0 0
98 access_account_bank_statement_manager account.bank.statement manager model_account_bank_statement account.group_account_manager 1 0 0 0
access_account_analytic_chart_manager account.analytic.chart manager model_account_analytic_chart account.group_account_manager 1 0 0 0
99 access_account_entries_report_manager account.entries.report model_account_entries_report account.group_account_manager 1 1 1 1
100 access_analytic_entries_report_manager analytic.entries.report model_analytic_entries_report account.group_account_manager 1 0 0 0
101 access_account_cashbox_line account.cashbox.line model_account_cashbox_line account.group_account_manager 1 1 0 1 0 1 0
102 access_account_cashbox_line account.cashbox.line model_account_cashbox_line account.group_account_user 1 0 0 0
103 access_account_move_line_system account.move.line system model_account_move_line base.group_system 1 0 0 0
104 access_account_invoice_system account.invoice system model_account_invoice base.group_system 1 0 0 0
105 access_account_bank_statement_system account.bank.statement system model_account_bank_statement base.group_system 1 0 0 0
106 access_account_move_system account.move system model_account_move base.group_system 1 0 0 0
107 access_account_analytic_line_system account.analytic.line system model_account_analytic_line base.group_system 1 0 0 0
access_account_analytic_system account.analytic.chart system model_account_analytic_chart base.group_system 1 0 0 0
108 access_account_tax_code_system account.tax.code system model_account_tax_code base.group_system 1 1 1 1
109 access_account_journal_system account.journal system model_account_journal base.group_system 1 1 1 1
access_account_chart_system account.chart system model_account_chart base.group_system 1 0 0 0
110 access_account_period_system account.period system model_account_period base.group_system 1 1 1 1
access_account_chart_accountant account.chart accountant model_account_chart group_account_user 1 0 0 0
111 access_account_journal_view_system account.journal.view system model_account_journal_view base.group_system 1 1 1 1
112 access_account_account_type_system account.account.type system model_account_account_type base.group_system 1 1 1 1
113 access_account_analytic_journal_system account.analytic.journal system model_account_analytic_journal base.group_system 1 1 1 1
144 access_account_invoice_line_accountant account.invoice.line accountant model_account_invoice_line account.group_account_user 1 0 0 0
145 access_res_partner_address_accountant res.partner.address accountant base.model_res_partner_address account.group_account_user 1 0 0 0
146 access_account_invoice_line_manager account.invoice.line manager model_account_invoice_line account.group_account_manager 1 0 0 0
access_analytic_report_manager analytic.report manager model_analytic_report account.group_account_manager 1 1 1 1
147 access_account_account_invoice account.account invoice model_account_account account.group_account_invoice 1 1 1 1
148 access_res_partner_address_invoice res.partner.address invoice base.model_res_partner_address account.group_account_invoice 1 1 1 1
149 access_account_invoice_line_system account.invoice.line system model_account_invoice_line base.group_system 1 0 0 0
150 access_account_analytic_accountant account.analytic.account accountant analytic.model_account_analytic_account account.group_account_user 1 1 1 1
151 access_account_account_type_invoice account.account.type invoice model_account_account_type account.group_account_invoice 1 1 1 1
152 access_report_account_receivable_invoice report.account.receivable.invoice model_report_account_receivable account.group_account_invoice 1 1 1 1
153 access_report_account_receivable_user report.account.receivable.user model_report_account_receivable account.group_account_user 1 1 1 1
154 access_account_sequence_fiscal_year_invoice account.sequence.fiscalyear invoice model_account_sequence_fiscalyear account.group_account_invoice 1 1 1 1
155 access_account_invoice_accounting_accountant account.invoice model_account_invoice account.group_accounting_accountant 1 1 1 1
156 access_account_invoice_line_accounting_accountant account.invoice.line model_account_invoice_line account.group_accounting_accountant 1 1 1 1
157 access_res_partner_accounting_accountant res.partner base.model_res_partner account.group_accounting_accountant 1 1 1 1
158 access_account_account_accounting_accountant account.account model_account_account account.group_accounting_accountant 1 0 0 0
159 access_account_account_type_accounting_accountant account.type model_account_account_type account.group_accounting_accountant 1 0 0 0
160 access_account_tax_accounting_accountant account.tax model_account_tax account.group_accounting_accountant 1 0 0 0
161 access_account_tax_code_accounting_accountant account.tax.code model_account_tax_code account.group_accounting_accountant 1 0 0 0
162 access_account_invoice_tax_accounting_accountant account.invoice.tax model_account_invoice_tax account.group_accounting_accountant 1 0 0 0
163 access_res_partner_address_accounting_accountant res.partner.address base.model_res_partner_address account.group_accounting_accountant 1 1 1 1
164 access_account_move_accounting_accountant account.move model_account_move account.group_accounting_accountant 1 1 1 1
165 access_account_move_line_accounting_accountant account.move.line model_account_move_line account.group_accounting_accountant 1 1 1 1
166 access_res_partner_bank_accounting_accountant res.partner.bank base.model_res_partner_bank account.group_accounting_accountant 1 0 0 0
167 access_res_partner_event_accounting_accountant res.partner.event base.model_res_partner_event account.group_accounting_accountant 1 0 0 0
168 access_res_currency_rate_accounting_accountant res.currency.rate base.model_res_currency_rate account.group_accounting_accountant 1 1 0 0
169 access_res_currency_accounting_accountant res.currency base.model_res_currency account.group_accounting_accountant 1 1 0 0
170 access_product_template_accounting_accountant product.template product.model_product_template account.group_accounting_accountant 1 0 0 0
171 access_product_product_accounting_accountant product.product product.model_product_product account.group_accounting_accountant 1 0 0 0
172 access_product_category_accounting_accountant product.category product.model_product_category account.group_accounting_accountant 1 0 0 0
173 access_product_pricelist_accounting_accountant product.pricelist product.model_product_pricelist account.group_accounting_accountant 1 0 0 0
174 access_product_pricelist_version_accounting_accountant product.pricelist.version product.model_product_pricelist_version account.group_accounting_accountant 1 0 0 0
175 access_product_pricelist_item_accounting_accountant product.pricelist.item product.model_product_pricelist_item account.group_accounting_accountant 1 0 0 0
176 access_account_payment_term_accounting_accountant account.payment.term model_account_payment_term account.group_accounting_accountant 1 0 0 0
177 access_res_payterm_accounting_accountant res.payterm base.model_res_payterm account.group_accounting_accountant 1 0 0 0
178 access_account_payment_term_line_accounting_accountant account.payment.term.line model_account_payment_term_line account.group_accounting_accountant 1 0 0 0
179 access_account_journal_accounting_accountant account.journal model_account_journal account.group_accounting_accountant 1 0 0 0
180 access_account_fiscalyear_accounting_accountant account.fiscalyear model_account_fiscalyear account.group_accounting_accountant 1 0 0 0
181 access_account_period_accounting_accountant account.period model_account_period account.group_accounting_accountant 1 0 0 0
182 access_account_move_reconcile_accounting_accountant account.move.reconcile model_account_move_reconcile account.group_accounting_accountant 1 1 1 1
183 access_account_tax_code_accounting_accountant account.tax.code model_account_tax_code account.group_accounting_accountant 1 0 0 0
184 access_account_bank_statement_accounting_accountant account.bank.statement model_account_bank_statement account.group_accounting_accountant 1 1 1 1
185 access_account_cashbox_line_accounting_accountant account.cashbox.line model_account_cashbox_line account.group_accounting_accountant 1 1 1 1
186 access_account_bank_statement_reconcile_line account.bank.statement.reconcile.line model_account_bank_statement_reconcile_line account.group_accounting_accountant 1 1 1 1
187 access_account_bank_statement_line_accounting_accountant account.bank.statement.line model_account_bank_statement_line account.group_accounting_accountant 1 1 1 1
188 access_account_invoice_report_accounting_accountant account.invoice.report model_account_invoice_report account.group_accounting_accountant 1 0 0 0
189 access_report_account_receivable_accounting_accountant report.account.receivable model_report_account_receivable account.group_accounting_accountant 1 0 0 0
190 access_temp_range_accounting_accountant temp.range model_temp_range account.group_accounting_accountant 1 0 0 0
191 access_report_aged_receivable_accounting_accountant report.aged.receivable model_report_aged_receivable account.group_accounting_accountant 1 0 0 0
192 access_report_invoice_created_accounting_accountant report.invoice.created model_report_invoice_created account.group_accounting_accountant 1 0 0 0
193 access_account_entries_report_accounting_accountant account.entries.report model_account_entries_report account.group_accounting_accountant 1 0 0 0
194 access_account_invoice_report_accounting_accountant account.invoice.report model_account_invoice_report account.group_accounting_accountant 1 0 0 0
195 access_account_journal_view_accounting_accountant account.journal.view model_account_journal_view account.group_accounting_accountant 1 0 0 0
196 access_account_journal_period_accounting_accountant account.journal.period model_account_journal_period account.group_accounting_accountant 1 1 1 1
197 access_account_journal_column_accounting_accountant account.journal.column model_account_journal_column account.group_accounting_accountant 1 1 1 1
198 access_account_analytic_account_accounting_accountant account.analytic.account analytic.model_account_analytic_account account.group_accounting_accountant 1 0 0 0
199 access_account_analytic_line_accounting_accountant account.analytic.line analytic.model_account_analytic_line account.group_accounting_accountant 1 0 0 0
200 access_account_analytic_journal_accounting_accountant account.analytic.journal model_account_analytic_journal account.group_accounting_accountant 1 0 0 0
201 access_account_bank_statement_reconcile_accounting_accountant account.bank.statement.reconcile model_account_bank_statement_reconcile account.group_accounting_accountant 1 1 1 1

View File

@ -47,7 +47,7 @@
-
!assert {model: account.invoice, id: account_invoice_customer0}:
- state == 'open'
-
I check that now there is a move attached to the invoice
-
@ -126,7 +126,7 @@
acc_id=self.browse(cr, uid, ref("account_invoice_customer0"))
assert(acc_id.move_id)
-
I refund the invoice Using Credit Note
I refund the invoice Using Refund Button
-
!record {model: account.invoice.refund, id: account_invoice_refund_0}:
description: Refund To China Export

View File

@ -47,8 +47,7 @@
I check the opening entries By using "Entries by Line wizard"
-
!record {model: account.move.journal, id: account_move_journal_0}:
journal_id: account.sales_journal
period_id: account_period_jan11
{}
-
I clicked on Open Journal Button to check the entries

View File

@ -1,5 +1,5 @@
-
In order to test Validate Ledger Postings wizard in OpenERP I created a account move
In order to test the 'Validate Journal Entries' wizard in OpenERP, I created an account move
-
!record {model: account.move, id: account_move_0}:
@ -40,7 +40,7 @@
!assert {model: account.move, id: account_move_0}:
- state == 'draft'
-
I validate this account move by using Validate Ledger Postings
I validate this account move by using the 'Validate Journal Entries' wizard
-
!record {model: validate.account.move, id: validate_account_move_0}:
journal_id: account.bank_journal

View File

@ -48,9 +48,9 @@ import account_open_closed_fiscalyear
import account_compare_account_balance_report
import account_invoice_state
import account_chart
import account_tax_chart
#TODO: remove this file no moe used
# also remove related view fiel
#import account_move_line_select
import account_validate_account_move
import account_use_model

View File

@ -151,8 +151,6 @@ class account_automatic_reconcile(osv.osv_memory):
query = "SELECT partner_id FROM account_move_line WHERE account_id=%s AND reconcile_id IS NULL \
AND state <> 'draft' GROUP BY partner_id \
HAVING ABS(SUM(debit-credit)) <> %s AND count(*)>0"%(account_id, 0.0)
# query="SELECT partner_id FROM account_move_line WHERE account_id=%s AND reconcile_id IS NULL \
# AND state <> 'draft' GROUP BY partner_id AND debit = credi"%(account_id)
else:
query = "SELECT partner_id FROM account_move_line WHERE account_id=%s AND reconcile_id IS NULL \
AND state <> 'draft' GROUP BY partner_id \

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<data>
<record id="account_automatic_reconcile_view" model="ir.ui.view">
<field name="name">Account Automatic Reconcile</field>
@ -9,28 +9,28 @@
<field name="arch" type="xml">
<form string="Reconciliation">
<group width="660" height="430">
<separator string="Options" colspan="4"/>
<group>
<field name="account_ids" colspan="4" domain="[('reconcile','=',1)]"/>
<field name="date1"/>
<field name="date2"/>
<field name="power"/>
<field name="allow_write_off"/>
<separator string="Options" colspan="4"/>
<group>
<field name="account_ids" colspan="4" domain="[('reconcile','=',1)]"/>
<field name="date1"/>
<field name="date2"/>
<field name="power"/>
<field name="allow_write_off"/>
</group>
<newline/>
<group attrs="{'readonly':[('allow_write_off', '!=', True)]}">
<separator string="Write-Off Move" colspan="4"/>
<field name="max_amount"/>
<field name="writeoff_acc_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
<field name="journal_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
<field name="period_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
</group>
<separator string ="" colspan="4"/>
<group colspan="2" col="4">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="reconcile" string="Reconcile" type="object" icon="terp-stock_effects-object-colorize"/>
</group>
</group>
<newline/>
<group attrs="{'readonly':[('allow_write_off', '!=', True)]}">
<separator string="Write-Off Move" colspan="4"/>
<field name="max_amount"/>
<field name="writeoff_acc_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
<field name="journal_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
<field name="period_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
</group>
<separator string ="" colspan="4"/>
<group colspan="2" col="4">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="reconcile" string="Reconcile" type="object" icon="terp-stock_effects-object-colorize"/>
</group>
</group>
</form>
</field>
</record>
@ -48,11 +48,12 @@
</record>
<menuitem
icon="STOCK_EXECUTE"
name="Automatic Reconciliation"
action="action_account_automatic_reconcile"
id="menu_automatic_reconcile"
parent="periodical_processing_reconciliation"/>
icon="STOCK_EXECUTE"
name="Automatic Reconciliation"
action="action_account_automatic_reconcile"
id="menu_automatic_reconcile"
parent="periodical_processing_reconciliation"
groups="base.group_extended"/>
<record id="account_automatic_reconcile_view1" model="ir.ui.view">
<field name="name">Automatic reconcile unreconcile</field>
@ -63,9 +64,9 @@
<field name="reconciled"/>
<newline/>
<field name="unreconciled"/>
<group colspan="4" col="6">
<separator colspan="6"/>
<button special="cancel" string="Ok" icon="terp-dialog-close" default_focus="1"/>
<group colspan="4" col="6">
<separator colspan="6"/>
<button special="cancel" string="Ok" icon="terp-dialog-close" default_focus="1"/>
</group>
</form>
</field>

View File

@ -26,17 +26,18 @@ class account_change_currency(osv.osv_memory):
_name = 'account.change.currency'
_description = 'Change Currency'
_columns = {
'currency_id': fields.many2one('res.currency', 'New Currency', required=True),
}
'currency_id': fields.many2one('res.currency', 'Change to', required=True, help="Select a currency to apply on the invoice"),
}
def view_init(self, cr , uid , fields_list, context=None):
obj_inv = self.pool.get('account.invoice')
if context is None:
context = {}
state = obj_inv.browse(cr, uid, context['active_id']).state
if obj_inv.browse(cr, uid, context['active_id']).state != 'draft':
raise osv.except_osv(_('Error'), _('You can only change currency for Draft Invoice !'))
pass
if context.get('active_id',False):
state = obj_inv.browse(cr, uid, context['active_id']).state
if obj_inv.browse(cr, uid, context['active_id']).state != 'draft':
raise osv.except_osv(_('Error'), _('You can only change currency for Draft Invoice !'))
pass
def change_currency(self, cr, uid, ids, context=None):
obj_inv = self.pool.get('account.invoice')
@ -56,13 +57,19 @@ class account_change_currency(osv.osv_memory):
new_price = 0
if invoice.company_id.currency_id.id == invoice.currency_id.id:
new_price = line.price_unit * rate
if new_price <= 0:
raise osv.except_osv(_('Error'), _('New currency is not confirured properly !'))
if invoice.company_id.currency_id.id != invoice.currency_id.id and invoice.company_id.currency_id.id == new_currency:
old_rate = invoice.currency_id.rate
if old_rate <= 0:
raise osv.except_osv(_('Error'), _('Currnt currency is not confirured properly !'))
new_price = line.price_unit / old_rate
if invoice.company_id.currency_id.id != invoice.currency_id.id and invoice.company_id.currency_id.id != new_currency:
old_rate = invoice.currency_id.rate
if old_rate <= 0:
raise osv.except_osv(_('Error'), _('Current currency is not confirured properly !'))
new_price = (line.price_unit / old_rate ) * rate
obj_inv_line.write(cr, uid, [line.id], {'price_unit' : new_price})
obj_inv.write(cr, uid, [invoice.id], {'currency_id' : new_currency}, context=context)
@ -70,4 +77,4 @@ class account_change_currency(osv.osv_memory):
account_change_currency()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,35 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_account_change_currency" model="ir.ui.view">
<record id="view_account_change_currency" model="ir.ui.view">
<field name="name">Change Currency</field>
<field name="model">account.change.currency</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Invoice Currency">
<separator colspan="4" string="This wizard will change the currency of the invoice"/>
<field name="currency_id"/>
<separator colspan="4"/>
<group colspan="2" col="4">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="change_currency" string="Change Currency" type="object" icon="terp-stock_effects-object-colorize"/>
</group>
</form>
<form string="Invoice Currency">
<separator colspan="4" string="This wizard will change the currency of the invoice"/>
<field name="currency_id"/>
<separator colspan="4"/>
<group colspan="2" col="4">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="change_currency" string="Change Currency" type="object" icon="terp-stock_effects-object-colorize"/>
</group>
</form>
</field>
</record>
</record>
<record id="action_account_change_currency" model="ir.actions.act_window">
<record id="action_account_change_currency" model="ir.actions.act_window">
<field name="name">Change Currency</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.change.currency</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_account_change_currency"/>
<field name="context">{'record_id' : active_id}</field>
<field name="context">{'record_id' : active_id}</field>
<field name="target">new</field>
</record>
</record>
</data>
</openerp>

View File

@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
@ -26,7 +27,7 @@ class account_chart(osv.osv_memory):
For Chart of Accounrs
"""
_name = "account.chart"
_description = "chart"
_description = "Account chart"
_columns = {
'fiscalyear': fields.many2one('account.fiscalyear', \
'Fiscal year', \
@ -37,11 +38,9 @@ class account_chart(osv.osv_memory):
def _get_fiscalyear(self, cr, uid, context=None):
"""Return default Fiscalyear value"""
fiscalyear_obj = self.pool.get('account.fiscalyear')
fiscalyear = fiscalyear_obj.find(cr, uid)
return fiscalyear
return self.pool.get('account.fiscalyear').find(cr, uid)
def account_chart_open_window(self, cr, uid, ids, context={}):
def account_chart_open_window(self, cr, uid, ids, context=None):
"""
Opens chart of Accounts
@param cr: the current row, from the database cursor,
@ -51,6 +50,8 @@ class account_chart(osv.osv_memory):
"""
mod_obj = self.pool.get('ir.model.data')
act_obj = self.pool.get('ir.actions.act_window')
if context is None:
context = {}
data = self.read(cr, uid, ids, [], context=context)[0]
result = mod_obj._get_id(cr, uid, 'account', 'action_account_tree')
id = mod_obj.read(cr, uid, [result], ['res_id'], context=context)[0]['res_id']
@ -64,7 +65,8 @@ class account_chart(osv.osv_memory):
_defaults = {
'fiscalyear': _get_fiscalyear,
'target_move': 'all'
}
}
account_chart()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -14,7 +14,7 @@
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel" />
<button icon="terp-gtk-go-back-rtl" string="Open Charts" name="account_chart_open_window" type="object" />
</group>

View File

@ -32,7 +32,7 @@ class account_compare_account_balance_report(osv.osv_memory):
_description = 'Account Balance Report'
_columns = {
'fiscalyear': fields.many2many('account.fiscalyear', 'account_fiscalyear_rel','account_id','fiscalyear_id','Fiscal year', help='Keep empty for all open fiscal year'),
'select_account': fields.many2one('account.account','Select Reference Account(for % comparision)',help='Keep empty for comparision to its parent'),
'select_account': fields.many2one('account.account','Select Reference Account(for % comparision)',help='Keep empty for comparison to its parent'),
'account_choice': fields.selection([('all','All accounts'),
('bal_zero','With balance is not equal to 0'),
('moves','With movements')],'Show Accounts'),
@ -46,13 +46,13 @@ class account_compare_account_balance_report(osv.osv_memory):
'periods': fields.many2many('account.period', 'period_account_balance_rel',
'report_id', 'period_id', 'Periods',
help='Keep empty for all open fiscal year'),
}
}
_defaults={
'compare_pattern': 'none',
'account_choice': 'moves',
'period_manner': 'actual',
}
}
def check(self, cr, uid, ids, context=None):
data={}

View File

@ -1,51 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="account_compare_account_balance_report_view" model="ir.ui.view">
<field name="name">account.compare.account.balance.report.form</field>
<field name="model">account.compare.account.balance.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Customize Report">
<notebook tabpos="up">
<page string="Report Options">
<separator string="Select Fiscal Year(s)(Maximum Three Years)" colspan="4"/>
<label align="0.7" colspan="6" string="(If you do not select Fiscal year it will take all open fiscal years)"/>
<field name="fiscalyear" colspan="5" nolabel="1"/>
<field name="landscape" colspan="4"/>
<field name="show_columns" colspan="4"/>
<field name="format_perc" colspan="4"/>
<field name="select_account" colspan="4"/>
<field name="account_choice" colspan="4"/>
<field name="compare_pattern" colspan="4"/>
</page>
<page string="Select Period">
<field name="period_manner" colspan="4"/>
<separator string="Select Period(s)" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</page>
</notebook>
<newline/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</form>
<field name="name">account.compare.account.balance.report.form</field>
<field name="model">account.compare.account.balance.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Customize Report">
<notebook tabpos="up">
<page string="Report Options">
<separator string="Select Fiscal Year(s)(Maximum Three Years)" colspan="4"/>
<label align="0.7" colspan="6" string="(If you do not select Fiscal year it will take all open fiscal years)"/>
<field name="fiscalyear" colspan="5" nolabel="1"/>
<field name="landscape" colspan="4"/>
<field name="show_columns" colspan="4"/>
<field name="format_perc" colspan="4"/>
<field name="select_account" colspan="4"/>
<field name="account_choice" colspan="4"/>
<field name="compare_pattern" colspan="4"/>
</page>
<page string="Select Period">
<field name="period_manner" colspan="4"/>
<separator string="Select Period(s)" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</page>
</notebook>
<newline/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</form>
</field>
</record>
</record>
<act_window name="Account balance-Compare Years"
res_model="account.compare.account.balance.report"
src_model="account.account"
view_mode="form"
target="new"
key2="client_print_multi"
id="action_view_account_compare_account_balance_report"/>
<act_window name="Account balance-Compare Years"
res_model="account.compare.account.balance.report"
src_model="account.account"
view_mode="form"
target="new"
key2="client_print_multi"
id="action_view_account_compare_account_balance_report"/>
</data>
</openerp>
</data>
</openerp>

View File

@ -39,10 +39,10 @@ class account_fiscalyear_close(osv.osv_memory):
'Opening Entries Period', required=True),
'report_name': fields.char('Name of new entries',size=64, required=True),
'sure': fields.boolean('Check this box'),
}
}
_defaults = {
'report_name':'End of Fiscal Year Entry',
}
}
def data_save(self, cr, uid, ids, context=None):
"""

View File

@ -33,7 +33,7 @@ class account_fiscalyear_close_state(osv.osv_memory):
'fy_id': fields.many2one('account.fiscalyear', \
'Fiscal Year to close', required=True),
'sure': fields.boolean('Check this box', required=False)
}
}
def data_save(self, cr, uid, ids, context=None):
"""

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