[MERGE] branch merged with lp:~openerp-dev/openobject-addons/trunk-dev-addons3
bzr revid: mtr@mtr-20100728050035-60mqhlb0zc6eeyed
This commit is contained in:
@@ -79,7 +79,7 @@ module named account_vouchers
|
||||
'wizard/account_invoice_state_view.xml',
|
||||
'wizard/account_partner_balance_report_view.xml',
|
||||
'wizard/account_balance_report_view.xml',
|
||||
'wizard/account_move_line_select_view.xml',
|
||||
# 'wizard/account_move_line_select_view.xml',
|
||||
'wizard/account_aged_trial_balance_view.xml',
|
||||
'wizard/account_compare_account_balance_report_view.xml',
|
||||
'wizard/account_third_party_ledger.xml',
|
||||
@@ -127,7 +127,6 @@ module named account_vouchers
|
||||
'board_account_demo.xml',
|
||||
],
|
||||
'test': [
|
||||
'test/account_sequence_test.yml',
|
||||
'test/account_customer_invoice.yml',
|
||||
'test/account_supplier_invoice.yml',
|
||||
'test/account_change_currency.yml',
|
||||
@@ -137,7 +136,7 @@ module named account_vouchers
|
||||
'test/account_invoice_state.yml',
|
||||
'test/account_use_model.yml',
|
||||
'test/account_validate_account_move.yml',
|
||||
# 'test/account_fiscalyear_close.yml',
|
||||
'test/account_fiscalyear_close.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
|
||||
+97
-80
@@ -248,59 +248,59 @@ class account_account(osv.osv):
|
||||
|
||||
def __compute(self, cr, uid, ids, field_names, arg=None, context=None,
|
||||
query='', query_params=()):
|
||||
""" compute the balance, debit and/or credit for the provided
|
||||
account ids
|
||||
Arguments:
|
||||
`ids`: account ids
|
||||
`field_names`: the fields to compute (a list of any of
|
||||
'balance', 'debit' and 'credit')
|
||||
`arg`: unused fields.function stuff
|
||||
`query`: additional query filter (as a string)
|
||||
`query_params`: parameters for the provided query string
|
||||
(__compute will handle their escaping) as a
|
||||
tuple
|
||||
"""
|
||||
mapping = {
|
||||
'balance': "COALESCE(SUM(l.debit),0) " \
|
||||
"- COALESCE(SUM(l.credit), 0) as balance",
|
||||
'debit': "COALESCE(SUM(l.debit), 0) as debit",
|
||||
'credit': "COALESCE(SUM(l.credit), 0) as credit"
|
||||
}
|
||||
#get all the necessary accounts
|
||||
children_and_consolidated = self._get_children_and_consol(cr, uid, ids, context=context)
|
||||
#compute for each account the balance/debit/credit from the move lines
|
||||
accounts = {}
|
||||
if children_and_consolidated:
|
||||
aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
|
||||
""" compute the balance, debit and/or credit for the provided
|
||||
account ids
|
||||
Arguments:
|
||||
`ids`: account ids
|
||||
`field_names`: the fields to compute (a list of any of
|
||||
'balance', 'debit' and 'credit')
|
||||
`arg`: unused fields.function stuff
|
||||
`query`: additional query filter (as a string)
|
||||
`query_params`: parameters for the provided query string
|
||||
(__compute will handle their escaping) as a
|
||||
tuple
|
||||
"""
|
||||
mapping = {
|
||||
'balance': "COALESCE(SUM(l.debit),0) " \
|
||||
"- COALESCE(SUM(l.credit), 0) as balance",
|
||||
'debit': "COALESCE(SUM(l.debit), 0) as debit",
|
||||
'credit': "COALESCE(SUM(l.credit), 0) as credit"
|
||||
}
|
||||
#get all the necessary accounts
|
||||
children_and_consolidated = self._get_children_and_consol(cr, uid, ids, context=context)
|
||||
#compute for each account the balance/debit/credit from the move lines
|
||||
accounts = {}
|
||||
if children_and_consolidated:
|
||||
aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
|
||||
|
||||
wheres = [""]
|
||||
if query.strip():
|
||||
wheres.append(query.strip())
|
||||
if aml_query.strip():
|
||||
wheres.append(aml_query.strip())
|
||||
filters = " AND ".join(wheres)
|
||||
self.logger.notifyChannel('addons.'+self._name, netsvc.LOG_DEBUG,
|
||||
'Filters: %s'%filters)
|
||||
# IN might not work ideally in case there are too many
|
||||
# children_and_consolidated, in that case join on a
|
||||
# values() e.g.:
|
||||
# SELECT l.account_id as id FROM account_move_line l
|
||||
# INNER JOIN (VALUES (id1), (id2), (id3), ...) AS tmp (id)
|
||||
# ON l.account_id = tmp.id
|
||||
# or make _get_children_and_consol return a query and join on that
|
||||
request = ("SELECT l.account_id as id, " +\
|
||||
' , '.join(map(mapping.__getitem__, field_names)) +
|
||||
" FROM account_move_line l" \
|
||||
" WHERE l.account_id IN %s " \
|
||||
+ filters +
|
||||
" GROUP BY l.account_id")
|
||||
params = (tuple(children_and_consolidated),) + query_params
|
||||
cr.execute(request, params)
|
||||
self.logger.notifyChannel('addons.'+self._name, netsvc.LOG_DEBUG,
|
||||
'Status: %s'%cr.statusmessage)
|
||||
wheres = [""]
|
||||
if query.strip():
|
||||
wheres.append(query.strip())
|
||||
if aml_query.strip():
|
||||
wheres.append(aml_query.strip())
|
||||
filters = " AND ".join(wheres)
|
||||
self.logger.notifyChannel('addons.'+self._name, netsvc.LOG_DEBUG,
|
||||
'Filters: %s'%filters)
|
||||
# IN might not work ideally in case there are too many
|
||||
# children_and_consolidated, in that case join on a
|
||||
# values() e.g.:
|
||||
# SELECT l.account_id as id FROM account_move_line l
|
||||
# INNER JOIN (VALUES (id1), (id2), (id3), ...) AS tmp (id)
|
||||
# ON l.account_id = tmp.id
|
||||
# or make _get_children_and_consol return a query and join on that
|
||||
request = ("SELECT l.account_id as id, " +\
|
||||
' , '.join(map(mapping.__getitem__, field_names)) +
|
||||
" FROM account_move_line l" \
|
||||
" WHERE l.account_id IN %s " \
|
||||
+ filters +
|
||||
" GROUP BY l.account_id")
|
||||
params = (tuple(children_and_consolidated),) + query_params
|
||||
cr.execute(request, params)
|
||||
self.logger.notifyChannel('addons.'+self._name, netsvc.LOG_DEBUG,
|
||||
'Status: %s'%cr.statusmessage)
|
||||
|
||||
for res in cr.dictfetchall():
|
||||
accounts[res['id']] = res
|
||||
for res in cr.dictfetchall():
|
||||
accounts[res['id']] = res
|
||||
|
||||
# consolidate accounts with direct children
|
||||
children_and_consolidated.reverse()
|
||||
@@ -629,8 +629,8 @@ class account_journal(osv.osv):
|
||||
'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'),
|
||||
}
|
||||
|
||||
@@ -656,9 +656,18 @@ class account_journal(osv.osv):
|
||||
@param context: context arguments, like lang, time zone
|
||||
@return: return a result
|
||||
"""
|
||||
|
||||
journal_type = ('sale', 'sale_refund', 'purchase', 'purchase_refund')
|
||||
journal_seq = {
|
||||
'sale':'seq_out_invoice',
|
||||
'purchase':'seq_in_invoice',
|
||||
'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
|
||||
|
||||
@@ -685,11 +694,14 @@ class account_journal(osv.osv):
|
||||
res.update({
|
||||
'sequence_id':seq_id
|
||||
})
|
||||
|
||||
if not journal.invoice_sequence_id:
|
||||
res.update({
|
||||
'invoice_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)
|
||||
|
||||
@@ -1018,7 +1030,6 @@ class account_move(osv.osv):
|
||||
res.append((move.id, name))
|
||||
return res
|
||||
|
||||
|
||||
def _get_period(self, cr, uid, context):
|
||||
periods = self.pool.get('account.period').find(cr, uid)
|
||||
if periods:
|
||||
@@ -1066,24 +1077,13 @@ class account_move(osv.osv):
|
||||
'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner"),
|
||||
'amount': fields.function(_amount_compute, method=True, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount),
|
||||
'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}),
|
||||
'type': fields.selection([
|
||||
('pay_voucher','Cash Payment'),
|
||||
('bank_pay_voucher','Bank Payment'),
|
||||
('rec_voucher','Cash Receipt'),
|
||||
('bank_rec_voucher','Bank Receipt'),
|
||||
('cont_voucher','Contra'),
|
||||
('journal_sale_vou','Journal Sale'),
|
||||
('journal_pur_voucher','Journal Purchase'),
|
||||
('journal_voucher','Journal Voucher'),
|
||||
],'Entry Type', select=True , size=128, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'narration':fields.text('Narration', readonly=True, select=True, states={'draft':[('readonly',False)]}),
|
||||
'narration':fields.text('Narration', select=True),
|
||||
'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company',store=True),
|
||||
}
|
||||
_defaults = {
|
||||
'name': lambda *a: '/',
|
||||
'state': lambda *a: 'draft',
|
||||
'period_id': _get_period,
|
||||
'type' : lambda *a : 'journal_voucher',
|
||||
'date': lambda *a:time.strftime('%Y-%m-%d'),
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
||||
}
|
||||
@@ -1116,6 +1116,7 @@ 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):
|
||||
if self.validate(cr, uid, ids, context) and len(ids):
|
||||
for move in self.browse(cr, uid, ids):
|
||||
@@ -1162,8 +1163,20 @@ class account_move(osv.osv):
|
||||
# TODO: Check if period is closed !
|
||||
#
|
||||
def create(self, cr, uid, vals, context={}):
|
||||
if 'line_id' in vals:
|
||||
if 'journal_id' in vals:
|
||||
if 'line_id' in vals and context.get('copy'):
|
||||
for l in vals['line_id']:
|
||||
if not l[0]:
|
||||
l[2].update({
|
||||
'reconcile_id':False,
|
||||
'reconcil_partial_id':False,
|
||||
'analytic_lines':False,
|
||||
'invoice':False,
|
||||
'ref':False,
|
||||
'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]:
|
||||
l[2]['journal_id'] = vals['journal_id']
|
||||
@@ -1189,11 +1202,14 @@ class account_move(osv.osv):
|
||||
result = super(account_move, self).create(cr, uid, vals, context)
|
||||
return result
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
default = default.copy()
|
||||
default.update({'state':'draft', 'name':'/',})
|
||||
def copy(self, cr, uid, id, default={}, context={}):
|
||||
default.update({
|
||||
'state':'draft',
|
||||
'name':'/',
|
||||
})
|
||||
context.update({
|
||||
'copy':True
|
||||
})
|
||||
return super(account_move, self).copy(cr, uid, id, default, context)
|
||||
|
||||
def unlink(self, cr, uid, ids, context={}, check=True):
|
||||
@@ -2527,9 +2543,9 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||
'account_paid_id': acc_template_ref[value['account_paid_id']],
|
||||
})
|
||||
|
||||
# Creating Journals
|
||||
# Creating Journals Sales and Purchase
|
||||
vals_journal={}
|
||||
data_id = data_pool.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_view')])
|
||||
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
|
||||
|
||||
@@ -2561,6 +2577,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||
vals_journal['type'] = 'purchase'
|
||||
vals_journal['code'] = _('EXJ')
|
||||
vals_journal['sequence_id'] = seq_id_purchase
|
||||
vals_journal['view_id'] = view_id
|
||||
|
||||
if obj_multi.chart_template_id.property_account_payable:
|
||||
vals_journal['default_credit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_expense_categ.id]
|
||||
|
||||
@@ -160,6 +160,32 @@ class account_bank_statement(osv.osv):
|
||||
'period_id': _get_period,
|
||||
}
|
||||
|
||||
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 button_confirm_bank(self, cr, uid, ids, context={}):
|
||||
done = []
|
||||
res_currency_obj = self.pool.get('res.currency')
|
||||
@@ -335,6 +361,7 @@ class account_bank_statement(osv.osv):
|
||||
|
||||
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)
|
||||
self.write(cr, uid, done, {'state':'confirm'}, context=context)
|
||||
return True
|
||||
|
||||
@@ -174,6 +174,17 @@ class account_cash_statement(osv.osv):
|
||||
|
||||
return company_id
|
||||
|
||||
def _get_cash_box_lines(self, cr, uid, ids, context={}):
|
||||
res = []
|
||||
curr = [1, 2, 5, 10, 20, 50, 100, 500]
|
||||
for rs in curr:
|
||||
dct = {
|
||||
'pieces':rs,
|
||||
'number':0
|
||||
}
|
||||
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),
|
||||
@@ -197,24 +208,23 @@ class account_cash_statement(osv.osv):
|
||||
'date': lambda *a:time.strftime("%Y-%m-%d %H:%M:%S"),
|
||||
'journal_id': _default_journal_id,
|
||||
'user_id': lambda self, cr, uid, context=None: uid,
|
||||
'company_id': _get_company
|
||||
'company_id': _get_company,
|
||||
'starting_details_ids':_get_cash_box_lines,
|
||||
'ending_details_ids':_get_cash_box_lines
|
||||
}
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
company_id = vals and vals.get('company_id',False)
|
||||
if company_id:
|
||||
open_jrnl = self.search(cr, uid, [('company_id', '=', vals['company_id']), ('journal_id', '=', vals['journal_id']), ('state', '=', 'open')])
|
||||
sql = [
|
||||
('company_id', '=', vals['company_id']),
|
||||
('journal_id', '=', vals['journal_id']),
|
||||
('state', '=', 'open')
|
||||
]
|
||||
open_jrnl = self.search(cr, uid, sql)
|
||||
if open_jrnl:
|
||||
raise osv.except_osv('Error', u'Une caisse de type espèce est déjà ouverte')
|
||||
if 'starting_details_ids' in vals:
|
||||
vals['starting_details_ids'] = starting_details_ids = map(list, vals['starting_details_ids'])
|
||||
for i in starting_details_ids:
|
||||
if i and i[0] and i[1]:
|
||||
i[0], i[1] = 0, 0
|
||||
raise osv.except_osv('Error', _('You can not have two open register for the same journal'))
|
||||
res_id = super(account_cash_statement, self).create(cr, uid, vals, context=context)
|
||||
res = self._get_starting_balance(cr, uid, [res_id])
|
||||
for rs in res:
|
||||
super(account_cash_statement, self).write(cr, uid, rs, res.get(rs))
|
||||
return res_id
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
@@ -284,27 +294,26 @@ class account_cash_statement(osv.osv):
|
||||
|
||||
number = self.pool.get('ir.sequence').get(cr, uid, statement.journal_id.sequence_id.code)
|
||||
|
||||
if len(statement.starting_details_ids) > 0:
|
||||
sid = []
|
||||
for line in statement.starting_details_ids:
|
||||
sid.append(line.id)
|
||||
|
||||
cash_pool.unlink(cr, uid, sid)
|
||||
|
||||
cr.execute("select id from account_bank_statement where journal_id=%s and user_id=%s and state=%s order by id desc limit 1", (statement.journal_id.id, uid, 'confirm'))
|
||||
rs = cr.fetchone()
|
||||
rs = rs and rs[0] or None
|
||||
if rs:
|
||||
statement = statement_pool.browse(cr, uid, rs)
|
||||
balance_start = statement.balance_end_real or 0.0
|
||||
open_ids = cash_pool.search(cr, uid, [('ending_id','=',statement.id)])
|
||||
for sid in open_ids:
|
||||
default = {
|
||||
'ending_id': False,
|
||||
'starting_id':ids[0]
|
||||
}
|
||||
cash_pool.copy(cr, uid, sid, default)
|
||||
|
||||
# if len(statement.starting_details_ids) > 0:
|
||||
# sid = []
|
||||
# for line in statement.starting_details_ids:
|
||||
# sid.append(line.id)
|
||||
# cash_pool.unlink(cr, uid, sid)
|
||||
#
|
||||
# cr.execute("select id from account_bank_statement where journal_id=%s and user_id=%s and state=%s order by id desc limit 1", (statement.journal_id.id, uid, 'confirm'))
|
||||
# rs = cr.fetchone()
|
||||
# rs = rs and rs[0] or None
|
||||
# if rs:
|
||||
# statement = statement_pool.browse(cr, uid, rs)
|
||||
# balance_start = statement.balance_end_real or 0.0
|
||||
# open_ids = cash_pool.search(cr, uid, [('ending_id','=',statement.id)])
|
||||
# for sid in open_ids:
|
||||
# default = {
|
||||
# 'ending_id': False,
|
||||
# 'starting_id':ids[0]
|
||||
# }
|
||||
# cash_pool.copy(cr, uid, sid, default)
|
||||
#
|
||||
vals = {
|
||||
'date':time.strftime("%Y-%m-%d %H:%M:%S"),
|
||||
'state':'open',
|
||||
|
||||
@@ -135,6 +135,12 @@
|
||||
<field name="amount_untaxed" sum="Untaxed Amount"/>
|
||||
<field name="amount_total" sum="Total Amount"/>
|
||||
<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="terp-gtk-stop"/>
|
||||
<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"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -151,7 +157,7 @@
|
||||
<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"/>
|
||||
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}"/>
|
||||
<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"/>
|
||||
@@ -260,7 +266,7 @@
|
||||
<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"/>
|
||||
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}"/>
|
||||
<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"/>
|
||||
@@ -365,6 +371,11 @@
|
||||
<field name="amount_total"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group col="10" colspan="4">
|
||||
<field name="journal_id" widget="selection" select='1'/>
|
||||
<field name="period_id" select='1'/>
|
||||
</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'}"/>
|
||||
@@ -424,7 +435,7 @@
|
||||
<field name="domain">[('type','=','out_invoice')]</field>
|
||||
<field name="context">{'type':'out_invoice'}</field>
|
||||
<field name="search_view_id" ref="view_account_invoice_filter"/>
|
||||
<field name="help">Most of customer invoices are automatically generate in draft mode by OpenERP flows, following a purchase order for instance. Review, confirm or cancel, pay or refund yours customers invoices here. A manual invoice can be created here.</field>
|
||||
<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">
|
||||
|
||||
@@ -8,24 +8,23 @@
|
||||
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="3"/>
|
||||
<!-- <menuitem id="menu_accounting" name="Accounting" parent="menu_finance" sequence="5"/>-->
|
||||
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user"/>
|
||||
<menuitem id="periodical_processing_journal_entries_validation" name="Entries to Review" parent="menu_finance_periodical_processing"/>
|
||||
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
|
||||
<menuitem id="periodical_processing_journal_entries_validation" name="Entries to Review" parent="menu_finance_periodical_processing"/>
|
||||
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing"/>-->
|
||||
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
|
||||
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_end_of_period" name="End of Period" parent="menu_finance_periodical_processing"/>-->
|
||||
<menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="5"/>
|
||||
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12"/>
|
||||
<menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_generic_report" name="Management Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_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"/>
|
||||
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts"/>
|
||||
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting"/>
|
||||
<menuitem id="menu_configuration_misc" name="Miscelleanous" parent="menu_finance_configuration"/>
|
||||
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
|
||||
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts"/>
|
||||
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting"/>
|
||||
<menuitem id="menu_configuration_misc" name="Miscelleanous" parent="menu_finance_configuration"/>
|
||||
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
|
||||
<!-- <menuitem id="menu_finance_configuration1" name="Configuration" parent="menu_finance" sequence="80"/>-->
|
||||
<!-- <menuitem id="base.menu_action_currency_form" parent="menu_finance_configuration" sequence="20"/>-->
|
||||
<!-- <menuitem id="menu_finance_accounting1" name="Financial Accounting" parent="menu_finance_configuration" sequence="80"/>-->
|
||||
@@ -34,10 +33,9 @@
|
||||
<!-- <menuitem id="menu_finance_reporting11" name="Reporting" parent="account.menu_finance" sequence="80"/>-->
|
||||
<menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="menu_finance_reporting" sequence="100"/>
|
||||
<!-- <menuitem id="menu_finance_legal_statement1" name="Legal Statements" parent="account.menu_finance_reporting" sequence="200"/>-->
|
||||
<!-- <menuitem id="menu_generic_report" name="Generic Reports" parent="account.menu_finance_legal_statement" sequence="8"/>-->
|
||||
|
||||
<menuitem id="menu_finance_entries" name="Accounting" parent="menu_finance" sequence="4"
|
||||
groups="group_account_user"/>
|
||||
groups="group_account_user"/>
|
||||
<menuitem id="account.menu_finance_recurrent_entries" name="Recurring Entries" parent="menu_finance_periodical_processing" sequence="15"/>
|
||||
|
||||
<!-- <menuitem id="menu_finance_periodical_processing11" name="Periodical Processing" parent="account.menu_finance"-->
|
||||
@@ -45,7 +43,18 @@
|
||||
<!-- groups="group_account_user"/>-->
|
||||
<menuitem id="menu_account_end_year_treatments" name="End of Period" parent="menu_finance_periodical_processing"/>
|
||||
|
||||
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="menu_finance_reporting" sequence="300"/>
|
||||
<menuitem id="menu_finance_statistic_report_statement" name="Statistic Reports" parent="menu_finance_reporting" sequence="300"/>
|
||||
|
||||
<menuitem
|
||||
parent="account.menu_finance_legal_statement"
|
||||
id="final_accounting_reports"
|
||||
name="Accounting Reports"/>
|
||||
|
||||
<menuitem
|
||||
parent="account.menu_finance_legal_statement"
|
||||
id="menu_journals_report"
|
||||
name="Journals"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
##############################################################################
|
||||
import time
|
||||
from datetime import datetime
|
||||
|
||||
import netsvc
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
@@ -183,7 +182,7 @@ class account_move_line(osv.osv):
|
||||
# Compute the current move
|
||||
move_id = False
|
||||
partner_id = False
|
||||
if context.get('journal_id',False) and context.get('period_id',False):
|
||||
if context.get('journal_id', False) and context.get('period_id', False):
|
||||
if 'move_id' in fields:
|
||||
cr.execute('select move_id \
|
||||
from \
|
||||
@@ -199,6 +198,7 @@ class account_move_line(osv.osv):
|
||||
return data
|
||||
else:
|
||||
data['move_id'] = move_id
|
||||
|
||||
if 'date' in fields:
|
||||
cr.execute('select date \
|
||||
from \
|
||||
@@ -214,7 +214,6 @@ class account_move_line(osv.osv):
|
||||
period = period_obj.browse(cr, uid, context['period_id'],
|
||||
context=context)
|
||||
data['date'] = period.date_start
|
||||
|
||||
if not move_id:
|
||||
return data
|
||||
|
||||
@@ -401,7 +400,7 @@ class account_move_line(osv.osv):
|
||||
'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),
|
||||
|
||||
'narration': fields.related('move_id','narration', type='text', relation='account.move', string='Narration'),
|
||||
'ref': fields.char('Ref.', size=64),
|
||||
'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),
|
||||
@@ -454,6 +453,7 @@ class account_move_line(osv.osv):
|
||||
context=context)
|
||||
dt = period.date_start
|
||||
return dt
|
||||
|
||||
def _get_currency(self, cr, uid, context={}):
|
||||
if not context.get('journal_id', False):
|
||||
return False
|
||||
@@ -786,6 +786,31 @@ 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 fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False):
|
||||
result = super(osv.osv, self).fields_view_get(cr, uid, view_id,view_type,context,toolbar=toolbar, submenu=submenu)
|
||||
if view_type != 'tree':
|
||||
@@ -794,7 +819,7 @@ class account_move_line(osv.osv):
|
||||
fld = []
|
||||
fields = {}
|
||||
flds = []
|
||||
title = self.view_header_get(cr, uid, view_id, view_type, context)
|
||||
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')
|
||||
|
||||
@@ -848,11 +873,14 @@ class account_move_line(osv.osv):
|
||||
elif field == 'credit':
|
||||
attrs.append('sum="Total credit"')
|
||||
elif field == 'account_tax_id':
|
||||
attrs.append('domain="[(\'parent_id\',\'=\',False)]"')
|
||||
attrs.append('domain="[(\'parent_id\',\'=\',False), (\'type_tax_use\',\'=\',context.get(journal_id.type, \'sale\'))]"')
|
||||
elif field == 'account_id' and journal.id:
|
||||
attrs.append('domain="[(\'journal_id\', \'=\', '+str(journal.id)+'),(\'type\',\'<>\',\'view\'), (\'type\',\'<>\',\'closed\')]" on_change="onchange_account_id(account_id, partner_id)"')
|
||||
elif field == 'partner_id':
|
||||
attrs.append('on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"')
|
||||
# elif field == 'date':
|
||||
# attrs.append('on_change="onchange_date(date)"')
|
||||
|
||||
# if field.readonly:
|
||||
# attrs.append('readonly="1"')
|
||||
# if field.required:
|
||||
@@ -898,6 +926,7 @@ class account_move_line(osv.osv):
|
||||
def _check_date(self, cr, uid, vals, context=None, check=True):
|
||||
if context is None:
|
||||
context = {}
|
||||
journal_id = False
|
||||
if 'date' in vals.keys():
|
||||
if 'journal_id' in vals and 'journal_id' not in context:
|
||||
journal_id = vals['journal_id']
|
||||
@@ -1082,10 +1111,10 @@ class account_move_line(osv.osv):
|
||||
|
||||
#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
|
||||
if vals.get('account_tax_id',False):
|
||||
if vals.get('account_tax_id', False):
|
||||
tax_id = tax_obj.browse(cr, uid, vals['account_tax_id'])
|
||||
total = vals['debit'] - vals['credit']
|
||||
if journal.refund_journal:
|
||||
@@ -1158,7 +1187,7 @@ class account_move_line(osv.osv):
|
||||
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:
|
||||
self.pool.get('account.move').button_validate(cr,uid, [vals['move_id']],context)
|
||||
rs = self.pool.get('account.move').button_validate(cr,uid, [vals['move_id']],context)
|
||||
return result
|
||||
account_move_line()
|
||||
|
||||
|
||||
+301
-146
@@ -266,12 +266,19 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Journal Column">
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<field colspan="4" name="name" select="1"/><field name="name"/>
|
||||
<field name="date"/>
|
||||
<field name="period_id"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="balance_start"/>
|
||||
<field name="balance_end_real"/>
|
||||
<field name="balance_end"/>
|
||||
<field name="state"/>
|
||||
<field name="field" select="1"/>
|
||||
<field name="sequence"/>
|
||||
<newline/>
|
||||
<field name="readonly"/>
|
||||
<field name="required"/>
|
||||
<!-- <newline/>-->
|
||||
<!-- <field name="readonly"/>-->
|
||||
<!-- <field name="required"/>-->
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -283,8 +290,8 @@
|
||||
<tree string="Journal Column">
|
||||
<field name="sequence"/>
|
||||
<field name="name"/>
|
||||
<field name="required"/>
|
||||
<field name="readonly"/>
|
||||
<!-- <field name="required"/>-->
|
||||
<!-- <field name="readonly"/>-->
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -295,11 +302,18 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Journal View">
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field colspan="4" name="columns_id" nolabel="1" widget="one2many_list"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_account_journal_view" model="ir.actions.act_window">
|
||||
<field name="name">Journal Views</field>
|
||||
<field name="res_model">account.journal.view</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="action_account_journal_view" id="menu_action_account_journal_view" parent="account.menu_low_level"/>
|
||||
|
||||
<!--
|
||||
# Account Journal
|
||||
@@ -381,15 +395,14 @@
|
||||
<field name="centralisation" groups="base.group_extended"/>
|
||||
<field name="entry_posted"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Invoicing Data" colspan="4"/>
|
||||
<field name="invoice_sequence_id" groups="base.group_extended"/>
|
||||
<field name="group_invoice_lines"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" groups="base.group_extended">
|
||||
<separator string="Sequence" colspan="4"/>
|
||||
<field name="sequence_id"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Invoicing Data" colspan="4"/>
|
||||
<field name="group_invoice_lines"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Entry Controls" groups="base.group_extended">
|
||||
<separator colspan="4" string="Accounts Type Allowed (empty for no control)"/>
|
||||
@@ -414,18 +427,20 @@
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Statement">
|
||||
<group col="10" colspan="4">
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Statement"/>
|
||||
<filter icon="terp-check" string="Posted" domain="[('state','=','confirm')]" help="Confirm confirm"/>
|
||||
<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"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="journal_id"/>
|
||||
</group>
|
||||
<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="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
|
||||
<filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
|
||||
<filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -437,10 +452,10 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="red:balance_end_real!=balance_end and state=='draft';blue:state=='draft' and (balance_end_real==balance_end);black:state=='confirm'" string="Statement">
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="date"/>
|
||||
<field name="period_id"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="balance_start"/>
|
||||
<field name="balance_end_real"/>
|
||||
<field name="balance_end"/>
|
||||
@@ -457,13 +472,13 @@
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Bank Statements">
|
||||
<group>
|
||||
<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"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="journal_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
@@ -482,7 +497,7 @@
|
||||
<form string="Bank Statement">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1"/>
|
||||
<field name="date" 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"/>
|
||||
<field name="period_id"/>
|
||||
<field name="balance_start"/>
|
||||
@@ -536,7 +551,7 @@
|
||||
<field name="name">Bank Statements</field>
|
||||
<field name="res_model">account.bank.statement</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="domain">[('journal_id.type', '=', 'bank')]</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_bank_statement_tree_bank">
|
||||
@@ -562,12 +577,12 @@
|
||||
<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="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>
|
||||
@@ -663,7 +678,7 @@
|
||||
<field name="period_id"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="amount"/>
|
||||
<field name="amount" sum="Total Amount"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -899,43 +914,70 @@
|
||||
<field eval="2" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Entry Line">
|
||||
<notebook>
|
||||
<group col="6" colspan="4">
|
||||
<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"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Information">
|
||||
<separator colspan="4" string="General Information"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
<field name="ref"/>
|
||||
<field name="invoice"/>
|
||||
<field name="account_id" select="1" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="partner_id" select="1" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Amount"/>
|
||||
<field name="account_id" select="1" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="debit"/>
|
||||
<field name="credit"/>
|
||||
<field name="quantity"/>
|
||||
</group>
|
||||
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Accounting Documents"/>
|
||||
<field name="invoice"/>
|
||||
<field name="move_id" required="False"/>
|
||||
<field name="statement_id"/>
|
||||
</group>
|
||||
|
||||
<field name="debit"/>
|
||||
<field name="credit"/>
|
||||
<field name="company_id" required="1" groups="base.group_multi_company"/>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Dates"/>
|
||||
<field name="date" select="1"/>
|
||||
<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"/>
|
||||
<field name="amount_currency"/>
|
||||
</group>
|
||||
|
||||
<separator colspan="4" string="Optional Information"/>
|
||||
<field name="currency_id"/>
|
||||
<field name="amount_currency"/>
|
||||
<field name="quantity"/>
|
||||
<field name="move_id" required="False"/>
|
||||
<newline/>
|
||||
<field name="statement_id"/>
|
||||
<field name="blocked"/>
|
||||
<field name="date_maturity"/>
|
||||
<field name="date_created"/>
|
||||
<newline/>
|
||||
<field name="tax_code_id"/>
|
||||
<field name="tax_amount"/>
|
||||
<newline/>
|
||||
<field name="account_tax_id" domain="[('parent_id','=',False)]"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Reconciliation"/>
|
||||
<field name="reconcile_id"/>
|
||||
<field name="reconcile_partial_id"/>
|
||||
</group>
|
||||
|
||||
<separator colspan="4" string="State"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
<field name="reconcile_id"/>
|
||||
<field name="reconcile_partial_id"/>
|
||||
<field name="state"/>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="States"/>
|
||||
<field name="state"/>
|
||||
<field name="blocked"/>
|
||||
</group>
|
||||
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Analytic"/>
|
||||
<field name="analytic_account_id"/>
|
||||
</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)}"/>
|
||||
@@ -945,7 +987,6 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_move_line_form2" model="ir.ui.view">
|
||||
<field name="name">account.move.line.form2</field>
|
||||
<field name="model">account.move.line</field>
|
||||
@@ -953,7 +994,7 @@
|
||||
<field eval="9" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Entry Line">
|
||||
<notebook>
|
||||
<notebook colspan="4">
|
||||
<page string="Information">
|
||||
<separator colspan="4" string="General Information"/>
|
||||
<field name="name" select="1"/>
|
||||
@@ -993,6 +1034,19 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_move_line_graph" model="ir.ui.view">
|
||||
<field name="name">account.move.line.graph</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Account Statistics" type="bar">
|
||||
<field name="account_id"/>
|
||||
<field name="debit" operator="+"/>
|
||||
<field name="credit" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</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>
|
||||
@@ -1003,17 +1057,25 @@
|
||||
<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'/>
|
||||
<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"/>
|
||||
<field name="move_id" select="1" string="Number (Move)"/>
|
||||
<field name="name" 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>
|
||||
<newline/>
|
||||
<group col="10" colspan="4">
|
||||
<field name="journal_id" widget="selection" context="{'journal_id':self, 'visible_id':self or 0, 'normal_view':False}"/>
|
||||
<field name="period_id" widget="selection" context="{'period_id':self}"/>
|
||||
<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}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="narration" select="1"/>
|
||||
<field name="date" select='1'/>
|
||||
<field name="balance" string="Debit/Credit" select='1'/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -1039,10 +1101,38 @@
|
||||
<field name="search_view_id" ref="view_account_move_line_filter"/>
|
||||
</record>
|
||||
|
||||
<record id="action_move_line_select" 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="view_id" ref="view_move_line_tree"/>
|
||||
<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>
|
||||
<field name="name">Open Journal Items</field>
|
||||
<field eval="'ir.actions.act_window,%d'%action_move_line_select" name="value"/>
|
||||
<field eval="True" name="object"/>
|
||||
</record>
|
||||
<!--
|
||||
Account.Entry Edition
|
||||
-->
|
||||
|
||||
<record id="account_move_graph" model="ir.ui.view">
|
||||
<field name="name">account.move.graph</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Account Statistics" type="bar">
|
||||
<field name="period_id"/>
|
||||
<field name="amount" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_move_tree" model="ir.ui.view">
|
||||
<field name="name">account.move.tree</field>
|
||||
<field name="model">account.move</field>
|
||||
@@ -1054,11 +1144,10 @@
|
||||
<field name="ref"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
<field name="type" invisible=" not context.get('set_visible',True)"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="line_id"/>
|
||||
<field name="to_check" groups="base.group_extended"/>
|
||||
<field name="amount"/>
|
||||
<field name="amount" sum="Total Amount"/>
|
||||
<field name="state"/>
|
||||
<button name="button_validate" states="draft" string="Approve" type="object" icon="terp-camera_test"/>
|
||||
</tree>
|
||||
@@ -1072,38 +1161,88 @@
|
||||
<form string="Journal Entries">
|
||||
<group colspan="4" col="6">
|
||||
<field name="name" select="1" readonly="True"/>
|
||||
<field name="ref" select="1"/>
|
||||
<field name="to_check" groups="base.group_extended"/>
|
||||
<field name="journal_id" select="1"/>
|
||||
<field name="period_id"/>
|
||||
<field name="type"/>
|
||||
<field name="ref" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
<field name="company_id" required="1" groups="base.group_multi_company"/>
|
||||
<field name="partner_id" invisible="1" select="1"/>
|
||||
<field name="amount" invisible="1" select="1"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Journal Entries Lines">
|
||||
<field colspan="4" height="200" name="line_id" nolabel="1" widget="one2many_list" default_get="{'lines':line_id ,'journal':journal_id }">
|
||||
<field colspan="4" name="line_id" nolabel="1" height="250" widget="one2many_list" default_get="{'lines':line_id ,'journal':journal_id }">
|
||||
<form string="Account Entry Line">
|
||||
<separator colspan="4" string="General Information"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="account_id" domain="[('journal_id','=',parent.journal_id)]"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
|
||||
<group col="6" colspan="4">
|
||||
<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"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Information">
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Amount"/>
|
||||
<field name="account_id" select="1" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="debit"/>
|
||||
<field name="credit"/>
|
||||
<field name="quantity"/>
|
||||
</group>
|
||||
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Accounting Documents"/>
|
||||
<field name="invoice"/>
|
||||
<field name="move_id" required="False"/>
|
||||
<field name="statement_id"/>
|
||||
</group>
|
||||
|
||||
<field name="debit" select="1"/>
|
||||
<field name="credit" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Dates"/>
|
||||
<field name="date" select="1"/>
|
||||
<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"/>
|
||||
<field name="amount_currency"/>
|
||||
</group>
|
||||
|
||||
<separator colspan="4" string="Optional Information"/>
|
||||
<field name="currency_id"/>
|
||||
<field name="amount_currency"/>
|
||||
<field name="quantity" select="1"/>
|
||||
<newline/>
|
||||
<field name="date_maturity"/>
|
||||
<field name="date_created"/>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Reconciliation"/>
|
||||
<field name="reconcile_id"/>
|
||||
<field name="reconcile_partial_id"/>
|
||||
</group>
|
||||
|
||||
<separator colspan="4" string="State"/>
|
||||
<field name="reconcile_id"/>
|
||||
<field name="reconcile_partial_id"/>
|
||||
<field name="statement_id"/>
|
||||
<field name="state"/>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="States"/>
|
||||
<field name="state"/>
|
||||
<field name="blocked"/>
|
||||
</group>
|
||||
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Analytic"/>
|
||||
<field name="analytic_account_id"/>
|
||||
</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>
|
||||
</notebook>
|
||||
</form>
|
||||
<tree colors="blue:state in ('draft');black:state in ('posted')" editable="top" string="Account Entry Line">
|
||||
<field name="ref"/>
|
||||
@@ -1125,20 +1264,13 @@
|
||||
</tree>
|
||||
</field>
|
||||
<separator colspan="4" string="Narration"/>
|
||||
<field name="narration" colspan="4" nolabel="1"/>
|
||||
<field name="state" select="1"/>
|
||||
<group col="2" colspan="2">
|
||||
<field name="narration" colspan="4" nolabel="1" height="50"/>
|
||||
<group col="4" colspan="4">
|
||||
<field name="state" select="1"/>
|
||||
<button name="button_validate" states="draft" string="Approve" type="object" icon="terp-camera_test"/>
|
||||
<button name="button_cancel" states="posted" string="Cancel" type="object" icon="terp-gtk-stop"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Other Information">
|
||||
<field name="company_id" required="1" groups="base.group_multi_company"/>
|
||||
<field name="date" select="1" groups="base.group_extended"/>
|
||||
<field name="to_check" groups="base.group_extended"/>
|
||||
<field name="partner_id" invisible="1" select="1"/>
|
||||
<field name="amount" invisible="1" select="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
@@ -1154,29 +1286,37 @@
|
||||
<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-camera_test" string="To Review" domain="[('to_check','=',True)]" groups="base.group_extended" help="To Review"/>
|
||||
<field name="date" select='1'/>
|
||||
<field name="name" select='1'/>
|
||||
<field name="journal_id" select='1'/>
|
||||
<field name="partner_id" select='1'/>
|
||||
<filter icon="terp-stock_effects-object-colorize" 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="date" select='1'/>
|
||||
<field name="narration" select="1"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group col='8' colspan='4'>
|
||||
<field name="journal_id" widget="selection" select='1'/>
|
||||
<field name="period_id" select='1'/>
|
||||
</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="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type', 'set_visible':True}"/>
|
||||
<filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
|
||||
<filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_move_journal_line" model="ir.actions.act_window">
|
||||
<record id="action_move_journal_line" 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_mode">tree,form,graph</field>
|
||||
<field name="view_id" ref="view_move_tree"/>
|
||||
<field name="search_view_id" ref="view_account_move_filter"/>
|
||||
</record>
|
||||
@@ -1205,21 +1345,20 @@
|
||||
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"
|
||||
/>
|
||||
<!-- <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"/>-->
|
||||
@@ -1239,7 +1378,7 @@
|
||||
<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="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>
|
||||
@@ -1251,11 +1390,10 @@
|
||||
<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="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>
|
||||
<field name="context">{'journal_id':1}</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_moves_purchase" id="menu_eaction_account_moves_purchase" parent="menu_finance_payables"/>
|
||||
@@ -1761,7 +1899,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_move_line_tax_tree"/>
|
||||
<field name="domain">[('tax_code_id','=',active_id),('state','<>','draft')]</field>
|
||||
<field name="domain">[('tax_code_id','child_of',active_id),('state','<>','draft')]</field>
|
||||
</record>
|
||||
<record id="ir_open_tax_move_line" model="ir.values">
|
||||
<field name="key2">tree_but_open</field>
|
||||
@@ -2272,7 +2410,7 @@
|
||||
<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="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>
|
||||
@@ -2286,23 +2424,22 @@
|
||||
/>
|
||||
|
||||
<!-- Cash Statement -->
|
||||
<record id="view_bank_statement_tree" model="ir.ui.view">
|
||||
<record id="view_cash_statement_tree" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.tree</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end);black:state in ('open')" string="Statement">
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="date"/>
|
||||
<field name="period_id"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="balance_start"/>
|
||||
<field name="balance_end_real"/>
|
||||
<field name="balance_end"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="state"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft" icon="terp-camera_test"/>
|
||||
<button type="object" string="Confirm" name="button_confirm_cash" states="open" icon="terp-gtk-go-back-rtl"/>
|
||||
<button type="object" string="Confirm" name="button_confirm_bank" states="open" icon="terp-gtk-go-back-rtl"/>
|
||||
<button type="object" string="Cancel" name="button_cancel" states="confirm" icon="terp-gtk-stop"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -2354,7 +2491,7 @@
|
||||
</page>
|
||||
<page string="CashBox">
|
||||
<group col="2" colspan="2" expand="1">
|
||||
<field name="starting_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','=','draft')]}">
|
||||
<field name="starting_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','!=','draft')]}">
|
||||
<tree string = "Opening Balance" editable="bottom">
|
||||
<field name="pieces"/>
|
||||
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
|
||||
@@ -2368,7 +2505,7 @@
|
||||
</field>
|
||||
</group>
|
||||
<group col="2" colspan="2" expand="1">
|
||||
<field name="ending_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','=','draft')]}">
|
||||
<field name="ending_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','!=','open')]}">
|
||||
<tree string = "Closing Balance" editable="bottom">
|
||||
<field name="pieces"/>
|
||||
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
|
||||
@@ -2389,7 +2526,7 @@
|
||||
<group col="6" colspan="4">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Dates" colspan="4"/>
|
||||
<field name="date" select="1" attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
<field name="date" select="1" attrs="{'readonly':[('state','!=','draft')]}" on_change="onchange_date(date)"/>
|
||||
<field name="closing_date" select="1" attrs="{'readonly':[('state','=','confirm')]}"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
@@ -2412,20 +2549,32 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_cash_statement_graph" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.graph</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Account Statistics" type="bar">
|
||||
<field name="date"/>
|
||||
<field name="balance_start" operator="+"/>
|
||||
<field name="balance_end" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_view_bank_statement_tree" model="ir.actions.act_window">
|
||||
<field name="name">Cash Register</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.bank.statement</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_bank_statement_tree"/>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="view_id" ref="view_cash_statement_tree"/>
|
||||
<field name="search_view_id" ref="view_account_bank_statement_filter"/>
|
||||
<field name="domain">[('journal_id.type', '=', 'cash')]</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="act_cash_statement1_all">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_bank_statement_tree"/>
|
||||
<field name="view_id" ref="view_cash_statement_tree"/>
|
||||
<field name="act_window_id" ref="action_view_bank_statement_tree"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="act_cash_statement2_all">
|
||||
@@ -2434,6 +2583,12 @@
|
||||
<field name="view_id" ref="view_bank_statement_form2"/>
|
||||
<field name="act_window_id" ref="action_view_bank_statement_tree"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="act_cash_statement3_all">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="account_cash_statement_graph"/>
|
||||
<field name="act_window_id" ref="action_view_bank_statement_tree"/>
|
||||
</record>
|
||||
<menuitem action="action_view_bank_statement_tree" id="journal_cash_move_lines" parent="menu_finance_bank_and_cash"/>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -27,19 +27,15 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Board">
|
||||
<vpaned>
|
||||
<hpaned>
|
||||
<child1>
|
||||
<action colspan="4" height="160" name="%(account.action_invoice_tree1)d" string="Draft Customer Invoices" domain="[('state','=','draft'),('type','=','out_invoice')]"/>
|
||||
<action colspan="4" height="160" width="400" name="%(account.action_invoice_tree1)d" string="Draft Customer Invoices" domain="[('state','=','draft'),('type','=','out_invoice')]"/>
|
||||
</child1>
|
||||
<child2>
|
||||
<group col="2" colspan="2" expand="1">
|
||||
<action colspan="4" name="%(action_aged_receivable)d" string="Aged receivables"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<action colspan="4" height="220" name="%(action_aged_income)d" string="Aged income"/>
|
||||
</group>
|
||||
<action colspan="4" height="220" name="%(action_aged_receivable)d" string="Aged receivables"/>
|
||||
<action colspan="4" height="220" name="%(action_aged_income)d" string="Aged income"/>
|
||||
</child2>
|
||||
</vpaned>
|
||||
</hpaned>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -53,7 +49,7 @@
|
||||
<field name="view_id" ref="board_account_form"/>
|
||||
</record>
|
||||
|
||||
<menuitem icon="terp-graph" 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"/>
|
||||
<menuitem action="open_board_account" icon="terp-graph" id="menu_board_account" parent="menu_dashboard_acc" sequence="1"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -385,18 +385,18 @@
|
||||
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_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')]"/>
|
||||
|
||||
+357
-30
@@ -7,13 +7,14 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-29 22:11+0000\n"
|
||||
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
|
||||
"PO-Revision-Date: 2010-07-26 17:47+0000\n"
|
||||
"Last-Translator: Albert Cervera i Areny - http://www.NaN-tic.com <albert@nan-"
|
||||
"tic.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-07-01 03:45+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-27 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -55,7 +56,7 @@ msgstr "Activo"
|
||||
#. module: account
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Nombre de modelo inválido en la definición de acción."
|
||||
msgstr "Nombre de modelo no válido en la definición de la acción."
|
||||
|
||||
#. module: account
|
||||
#: help:account.journal,currency:0
|
||||
@@ -193,8 +194,6 @@ msgstr "Seleccionar línea movimineto"
|
||||
#. module: account
|
||||
#: rml:account.journal.period.print:0
|
||||
#: rml:account.tax.code.entries:0
|
||||
#: rml:account.third_party_ledger:0
|
||||
#: rml:account.third_party_ledger_other:0
|
||||
msgid "Entry label"
|
||||
msgstr "Ref. asiento"
|
||||
|
||||
@@ -218,7 +217,7 @@ msgstr "Código para calcular (si tipo=código)"
|
||||
#: view:account.move:0
|
||||
#: view:account.move.line:0
|
||||
msgid "Account Entry Line"
|
||||
msgstr "Línea del asiento contable"
|
||||
msgstr "Apunte"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.aged.trial.balance,init:0
|
||||
@@ -239,7 +238,6 @@ msgstr "Asientos recurrentes"
|
||||
#: field:account.move,amount:0
|
||||
#: field:account.tax,amount:0
|
||||
#: field:account.tax.template,amount:0
|
||||
#: xsl:account.transfer:0
|
||||
msgid "Amount"
|
||||
msgstr "Importe"
|
||||
|
||||
@@ -308,7 +306,6 @@ msgstr "Pagos fuera de plazo"
|
||||
#. module: account
|
||||
#: wizard_view:account.account.balance.report,checktype:0
|
||||
#: wizard_view:account.analytic.account.analytic.check.report,init:0
|
||||
#: wizard_view:account.analytic.account.balance.report,init:0
|
||||
#: wizard_view:account.analytic.account.cost_ledger.report,init:0
|
||||
#: wizard_view:account.analytic.account.inverted.balance.report,init:0
|
||||
#: wizard_view:account.analytic.account.quantity_cost_ledger.report,init:0
|
||||
@@ -348,6 +345,7 @@ msgid "Delta Debit"
|
||||
msgstr "Diferencia debe"
|
||||
|
||||
#. module: account
|
||||
#: model:account.account.type,name:account.account_type_tax
|
||||
#: rml:account.invoice:0
|
||||
#: field:account.invoice,amount_tax:0
|
||||
#: field:account.move.line,account_tax_id:0
|
||||
@@ -362,7 +360,9 @@ msgstr "Trans. debe"
|
||||
#. module: account
|
||||
#: field:account.analytic.line,account_id:0
|
||||
#: field:account.invoice.line,account_analytic_id:0
|
||||
#: wizard_field:account.invoice.pay,addendum,analytic_id:0
|
||||
#: field:account.move.line,analytic_account_id:0
|
||||
#: wizard_field:account.move.line.reconcile,addendum,analytic_id:0
|
||||
#: field:report.hr.timesheet.invoice.journal,account_id:0
|
||||
msgid "Analytic Account"
|
||||
msgstr "Cuenta analítica"
|
||||
@@ -686,8 +686,11 @@ msgstr "Subtotal :"
|
||||
#. module: account
|
||||
#: field:account.analytic.account,line_ids:0
|
||||
#: view:account.analytic.line:0
|
||||
#: code:addons/account/project/wizard/wizard_account_analytic_line.py:0
|
||||
#: model:ir.actions.act_window,name:account.action_account_analytic_line_form
|
||||
#: model:ir.actions.act_window,name:account.action_account_tree1
|
||||
#: model:ir.ui.menu,name:account.next_id_41
|
||||
#, python-format
|
||||
msgid "Analytic Entries"
|
||||
msgstr "Asientos analíticos"
|
||||
|
||||
@@ -702,6 +705,7 @@ msgid "Associated Partner"
|
||||
msgstr "Empresa asociada"
|
||||
|
||||
#. module: account
|
||||
#: view:account.invoice:0
|
||||
#: field:account.invoice,comment:0
|
||||
msgid "Additional Information"
|
||||
msgstr "Información adicional"
|
||||
@@ -1018,7 +1022,7 @@ msgstr "Contabilidad financiera"
|
||||
#. module: account
|
||||
#: rml:account.invoice:0
|
||||
msgid "Net Total:"
|
||||
msgstr "Total neto:"
|
||||
msgstr "Base:"
|
||||
|
||||
#. module: account
|
||||
#: view:account.fiscal.position:0
|
||||
@@ -1486,6 +1490,9 @@ msgstr "Dejarlo vacío para usar la cuenta de ingresos"
|
||||
#: field:account.bank.statement.reconcile,line_new_ids:0
|
||||
#: wizard_view:account.move.line.reconcile,init_full:0
|
||||
#: wizard_view:account.move.line.reconcile,init_partial:0
|
||||
#: code:addons/account/wizard/wizard_pay_invoice.py:0
|
||||
#: code:addons/account/wizard/wizard_reconcile.py:0
|
||||
#, python-format
|
||||
msgid "Write-Off"
|
||||
msgstr "Desajuste"
|
||||
|
||||
@@ -1896,7 +1903,6 @@ msgstr "x Diario facturas rectificativas (abono) de gastos"
|
||||
#: field:account.journal,type:0
|
||||
#: field:account.move,type:0
|
||||
#: field:account.move.reconcile,type:0
|
||||
#: xsl:account.transfer:0
|
||||
msgid "Type"
|
||||
msgstr "Tipo"
|
||||
|
||||
@@ -2094,7 +2100,7 @@ msgstr "Gasto"
|
||||
#. module: account
|
||||
#: field:account.journal,invoice_sequence_id:0
|
||||
msgid "Invoice Sequence"
|
||||
msgstr "factura de secuencia"
|
||||
msgstr "Secuencia de facturas"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.automatic.reconcile,init:0
|
||||
@@ -2109,7 +2115,7 @@ msgstr "Proceso de factura de cliente"
|
||||
#. module: account
|
||||
#: rml:account.invoice:0
|
||||
msgid "Fiscal Position Remark :"
|
||||
msgstr "Comentario situacion fiscal"
|
||||
msgstr "Observación posición fiscal :"
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.fiscalyear.close,init,period_id:0
|
||||
@@ -2340,13 +2346,13 @@ msgstr "La cuenta base de la declaración de impuestos."
|
||||
#: selection:account.general.ledger.report,checktype,sortbydate:0
|
||||
#: rml:account.journal.period.print:0
|
||||
#: field:account.move,date:0
|
||||
#: wizard_field:account.move.line.reconcile,addendum,date_p:0
|
||||
#: rml:account.overdue:0
|
||||
#: wizard_field:account.subscription.generate,init,date:0
|
||||
#: field:account.subscription.line,date:0
|
||||
#: rml:account.tax.code.entries:0
|
||||
#: rml:account.third_party_ledger:0
|
||||
#: rml:account.third_party_ledger_other:0
|
||||
#: xsl:account.transfer:0
|
||||
msgid "Date"
|
||||
msgstr "Fecha"
|
||||
|
||||
@@ -2467,10 +2473,11 @@ msgstr "Fecha final"
|
||||
#: view:account.bank.statement:0
|
||||
#: field:account.move.reconcile,line_id:0
|
||||
#: model:ir.actions.act_window,name:account.action_move_line_search
|
||||
#: model:ir.actions.act_window,name:account.action_move_line_select
|
||||
#: model:ir.actions.act_window,name:account.action_move_line_tree1
|
||||
#: model:ir.ui.menu,name:account.menu_action_move_line_search
|
||||
msgid "Entry Lines"
|
||||
msgstr "Líneas de asiento"
|
||||
msgstr "Apuntes"
|
||||
|
||||
#. module: account
|
||||
#: view:account.tax:0
|
||||
@@ -2660,6 +2667,8 @@ msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: rml:account.analytic.account.journal:0
|
||||
#: wizard_view:account.invoice.pay,addendum:0
|
||||
#: wizard_view:account.move.line.reconcile,addendum:0
|
||||
#: model:ir.ui.menu,name:account.next_id_40
|
||||
#: model:process.node,name:account.process_node_analytic0
|
||||
#: model:process.node,name:account.process_node_analyticcost0
|
||||
@@ -2768,6 +2777,7 @@ msgid "Invoice Number"
|
||||
msgstr "Número factura"
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.analytic.account.balance.report,init,date2:0
|
||||
#: field:account.period,date_stop:0
|
||||
msgid "End of Period"
|
||||
msgstr "Fin de período"
|
||||
@@ -2780,7 +2790,7 @@ msgstr "_Aceptar"
|
||||
#. module: account
|
||||
#: field:account.invoice,amount_untaxed:0
|
||||
msgid "Untaxed"
|
||||
msgstr "Sin impuestos"
|
||||
msgstr "Base"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.report.xml,name:account.account_analytic_account_inverted_balance
|
||||
@@ -2954,8 +2964,6 @@ msgstr "Nombre completo de la cuenta"
|
||||
#: rml:account.journal.period.print:0
|
||||
#: rml:account.partner.balance:0
|
||||
#: rml:account.tax.code.entries:0
|
||||
#: rml:account.third_party_ledger:0
|
||||
#: rml:account.third_party_ledger_other:0
|
||||
#: rml:account.vat.declaration:0
|
||||
msgid "1cm 27.7cm 20cm 27.7cm"
|
||||
msgstr "1cm 27.7cm 20cm 27.7cm"
|
||||
@@ -3005,16 +3013,18 @@ msgstr "Conciliación de asientos de órdenes de pago."
|
||||
#: model:ir.actions.act_window,name:account.act_account_journal_2_account_move_line
|
||||
#: model:ir.model,name:account.model_account_move_line
|
||||
msgid "Entry lines"
|
||||
msgstr "Líneas de asiento"
|
||||
msgstr "Apuntes"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.automatic.reconcile,init:0
|
||||
#: wizard_view:account.move.line.reconcile,init_full:0
|
||||
#: wizard_view:account.move.line.reconcile,init_partial:0
|
||||
#: wizard_view:account.move.line.reconcile.select,init:0
|
||||
#: code:addons/account/wizard/wizard_reconcile_select.py:0
|
||||
#: model:ir.ui.menu,name:account.next_id_20
|
||||
#: model:process.node,name:account.process_node_reconciliation0
|
||||
#: model:process.node,name:account.process_node_supplierreconciliation0
|
||||
#, python-format
|
||||
msgid "Reconciliation"
|
||||
msgstr "Conciliación"
|
||||
|
||||
@@ -3077,7 +3087,6 @@ msgstr "Situación"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.invoice:0
|
||||
#: xsl:account.transfer:0
|
||||
msgid "Document"
|
||||
msgstr "Documento"
|
||||
|
||||
@@ -3127,6 +3136,8 @@ msgstr "Diario analítico"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.general.ledger:0
|
||||
#: rml:account.third_party_ledger:0
|
||||
#: rml:account.third_party_ledger_other:0
|
||||
msgid "Entry Label"
|
||||
msgstr "Etiqueta asiento"
|
||||
|
||||
@@ -3319,6 +3330,7 @@ msgid "Generate Fiscal Year Opening Entries"
|
||||
msgstr "Generar asientos apertura ejercicio fiscal"
|
||||
|
||||
#. module: account
|
||||
#: view:account.move.reconcile:0
|
||||
#: model:ir.actions.wizard,name:account.wizard_reconcile
|
||||
msgid "Reconcile Entries"
|
||||
msgstr "Conciliar los asientos"
|
||||
@@ -3676,7 +3688,6 @@ msgstr ""
|
||||
"empresa actual."
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.invoice.pay,addendum,comment:0
|
||||
#: wizard_field:account.invoice.pay,init,name:0
|
||||
msgid "Entry Name"
|
||||
msgstr "Descripción"
|
||||
@@ -4146,8 +4157,8 @@ msgid ""
|
||||
"You can check this box to mark the entry line as a litigation with the "
|
||||
"associated partner"
|
||||
msgstr ""
|
||||
"Marque esta opción para señalar la línea de asiento en desacuerdo con la "
|
||||
"empresa asociada"
|
||||
"Marque esta opción para señalar el apunte en desacuerdo con la empresa "
|
||||
"asociada"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.action_invoice_tree1
|
||||
@@ -4285,7 +4296,7 @@ msgid ""
|
||||
"date for the payment of this entry line."
|
||||
msgstr ""
|
||||
"Este campo es usado en asientos a pagar y a cobrar. Puede definir la fecha "
|
||||
"límite de pago para esta línea de asiento."
|
||||
"límite de pago para este apunte."
|
||||
|
||||
#. module: account
|
||||
#: rml:account.tax.code.entries:0
|
||||
@@ -5031,6 +5042,7 @@ msgid "Invoice Lines"
|
||||
msgstr "Líneas de factura"
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.analytic.account.balance.report,init,date1:0
|
||||
#: field:account.period,date_start:0
|
||||
msgid "Start of Period"
|
||||
msgstr "Inicio del periodo"
|
||||
@@ -5391,7 +5403,7 @@ msgstr "PRO-FORMA"
|
||||
#. module: account
|
||||
#: field:account.move.reconcile,line_partial_ids:0
|
||||
msgid "Partial Entry lines"
|
||||
msgstr "Líneas de asiento parcial"
|
||||
msgstr "Apuntes de conciliación parcial"
|
||||
|
||||
#. module: account
|
||||
#: help:account.move.line,statement_id:0
|
||||
@@ -5427,8 +5439,6 @@ msgstr "Proceso factura de proveedor"
|
||||
#: rml:account.journal.period.print:0
|
||||
#: rml:account.partner.balance:0
|
||||
#: rml:account.tax.code.entries:0
|
||||
#: rml:account.third_party_ledger:0
|
||||
#: rml:account.third_party_ledger_other:0
|
||||
#: rml:account.vat.declaration:0
|
||||
msgid "Page"
|
||||
msgstr "Página"
|
||||
@@ -5514,7 +5524,6 @@ msgstr "Número de periodos"
|
||||
|
||||
#. module: account
|
||||
#: wizard_field:account.analytic.account.analytic.check.report,init,date2:0
|
||||
#: wizard_field:account.analytic.account.balance.report,init,date2:0
|
||||
#: wizard_field:account.analytic.account.cost_ledger.report,init,date2:0
|
||||
#: wizard_field:account.analytic.account.inverted.balance.report,init,date2:0
|
||||
#: wizard_field:account.analytic.account.journal.report,init,date2:0
|
||||
@@ -5708,7 +5717,6 @@ msgstr "Ejercicio fiscal a cerrar"
|
||||
#. module: account
|
||||
#: wizard_field:account.aged.trial.balance,init,date1:0
|
||||
#: wizard_field:account.analytic.account.analytic.check.report,init,date1:0
|
||||
#: wizard_field:account.analytic.account.balance.report,init,date1:0
|
||||
#: wizard_field:account.analytic.account.cost_ledger.report,init,date1:0
|
||||
#: wizard_field:account.analytic.account.inverted.balance.report,init,date1:0
|
||||
#: wizard_field:account.analytic.account.journal.report,init,date1:0
|
||||
@@ -6258,7 +6266,7 @@ msgid "Show Comparision in %"
|
||||
msgstr "Mostrar comparación en %"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.balance.account.balance.report,init:0
|
||||
#: wizard_view:account.analytic.account.balance.report,init:0
|
||||
msgid "Select Period"
|
||||
msgstr "Seleccionar periodo"
|
||||
|
||||
@@ -6435,5 +6443,324 @@ msgstr "A cobrar anteriores"
|
||||
msgid "Untaxed Amount"
|
||||
msgstr "Base imponible"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Integrity Error !"
|
||||
#~ msgstr "¡Error de integridad!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "You have to provide an account for the write off entry !"
|
||||
#~ msgstr "¡Debe indicar una cuenta para el asiento de ajuste!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Warning !"
|
||||
#~ msgstr "¡Atención!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "You can not delete posted movement: \"%s\"!"
|
||||
#~ msgstr "¡No puede eliminar el movimiento fijado: \"%s\"!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "No analytic journal !"
|
||||
#~ msgstr "¡No diario analítico!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Bank Journal "
|
||||
#~ msgstr "Diario bancario "
|
||||
|
||||
#, python-format
|
||||
#~ msgid "You can not use this general account in this journal !"
|
||||
#~ msgstr "¡No puede usar esta cuenta general en este diario!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "You can not add/modify entries in a closed journal."
|
||||
#~ msgstr "No puede añadir/modificar asientos en un diario cerrado."
|
||||
|
||||
#, python-format
|
||||
#~ msgid ""
|
||||
#~ "You can not do this modification on a reconciled entry ! Please note that "
|
||||
#~ "you can just change some non important fields !"
|
||||
#~ msgstr ""
|
||||
#~ "¡No puede hacer esta modificación en un asiento conciliado! ¡Observe que "
|
||||
#~ "sólo puede cambiar algunos campos no importantes!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "You must first select a partner !"
|
||||
#~ msgstr "¡Primero debe seleccionar una empresa!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "The opening journal must not have any entry in the new fiscal year !"
|
||||
#~ msgstr ""
|
||||
#~ "¡El diario de apertura no debe tener ningún asiento en el nuevo ejercicio "
|
||||
#~ "fiscal!"
|
||||
|
||||
#~ msgid "account.config.wizard"
|
||||
#~ msgstr "account.config.asistente"
|
||||
|
||||
#, python-format
|
||||
#~ msgid ""
|
||||
#~ "The expected balance (%.2f) is different than the computed one. (%.2f)"
|
||||
#~ msgstr "El balance previsto (%.2f) es diferente del calculado. (%.2f)"
|
||||
|
||||
#, python-format
|
||||
#~ msgid ""
|
||||
#~ "You can not do this modification on a confirmed entry ! Please note that you "
|
||||
#~ "can just change some non important fields !"
|
||||
#~ msgstr ""
|
||||
#~ "¡No puede hacer esta modificación en un asiento confirmado! ¡Observe que "
|
||||
#~ "sólo puede cambiar algunos campos no importantes!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Purchase Journal"
|
||||
#~ msgstr "Diario de compras"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Free Reference"
|
||||
#~ msgstr "Referencia libre"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "No Partner Defined !"
|
||||
#~ msgstr "¡No se ha definido empresa!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Entries are not of the same account or already reconciled ! "
|
||||
#~ msgstr "¡Asientos no son de la misma cuenta o ya están conciliados! "
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Invalid action !"
|
||||
#~ msgstr "¡Acción no válida!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "No sequence defined in the journal !"
|
||||
#~ msgstr "¡No se ha definido una secuencia en el diario!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Your journal must have a default credit and debit account."
|
||||
#~ msgstr "El diario debe tener una cuenta haber y debe por defecto."
|
||||
|
||||
#, python-format
|
||||
#~ msgid "The journal must have default credit and debit account"
|
||||
#~ msgstr "El diario debe tener una cuenta haber y debe por defecto."
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Some entries are already reconciled !"
|
||||
#~ msgstr "¡Algunos asientos ya están conciliados!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "No Analytic Journal !"
|
||||
#~ msgstr "¡No diario analítico!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Already Reconciled"
|
||||
#~ msgstr "Ya conciliado"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "The account entries lines are not in valid state."
|
||||
#~ msgstr "Las líneas de los asientos contables no están en estado válido."
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Unable to reconcile entry \"%s\": %.2f"
|
||||
#~ msgstr "No es posible conciliar el asiento \"%s\": %.2f"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Please set an analytic journal on this financial journal !"
|
||||
#~ msgstr "¡Por favor indique un diario analítico en este diario financiero!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "EXJ"
|
||||
#~ msgstr "GASTO"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Sales Journal"
|
||||
#~ msgstr "Diario de ventas"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "BNK"
|
||||
#~ msgstr "BANCO"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Entries: "
|
||||
#~ msgstr "Asientos: "
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Couldn't create move between different companies"
|
||||
#~ msgstr "No se ha podido crear movimiento entre diferentes compañías"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Entry \"%s\" is not valid !"
|
||||
#~ msgstr "¡El asiento \"%s\" no es válido!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Error !"
|
||||
#~ msgstr "¡Error!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "SAJ"
|
||||
#~ msgstr "VENTA"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "The journal must have centralised counterpart"
|
||||
#~ msgstr "El diario debe tener un homólogo centralizado"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Bad total !"
|
||||
#~ msgstr "¡Total erróneo!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "End of Fiscal Year Entry"
|
||||
#~ msgstr "Asiento fin de ejercicio fiscal"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "UserError"
|
||||
#~ msgstr "Error de usuario"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Warning"
|
||||
#~ msgstr "Aviso"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Please verify that an account is defined in the journal."
|
||||
#~ msgstr "Compruebe que se ha definido una cuenta en el diario."
|
||||
|
||||
#, python-format
|
||||
#~ msgid "You can not use an inactive account!"
|
||||
#~ msgstr "¡No puede utilizar una cuenta inactiva!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Entry is already reconciled"
|
||||
#~ msgstr "El asiento ya está conciliado"
|
||||
|
||||
#, python-format
|
||||
#~ msgid ""
|
||||
#~ "Selected Move lines does not have any account move enties in draft state"
|
||||
#~ msgstr ""
|
||||
#~ "Ha seleccionado apuntes que no tienen ningún asiento contable en estado "
|
||||
#~ "borrador"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Standard Encoding"
|
||||
#~ msgstr "Codificación estándar"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Bad account!"
|
||||
#~ msgstr "¡Cuenta incorrecta!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Closing of fiscal year cancelled, please check the box !"
|
||||
#~ msgstr "¡Cierre del ejercicio fiscal cancelado, por favor marque la caja!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Bad account !"
|
||||
#~ msgstr "¡Cuenta incorrecta!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Error"
|
||||
#~ msgstr "Error"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Taxes missing !"
|
||||
#~ msgstr "¡Faltan impuestos!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "No piece number !"
|
||||
#~ msgstr "¡Ningún trozo de número!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Closing of states cancelled, please check the box !"
|
||||
#~ msgstr "¡Cierre de estados cancelado, por favor marque la caja!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "You have to define an analytic journal on the '%s' journal!"
|
||||
#~ msgstr "¡Debe definir un diario analítico en el diario '%s'!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "No Data Available"
|
||||
#~ msgstr "No hay datos disponibles"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "You must select accounts to reconcile"
|
||||
#~ msgstr "Debe seleccionar las cuentas a conciliar"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Cannot delete invoice(s) that are already opened or paid !"
|
||||
#~ msgstr "¡No se puede eliminar factura(s) que ya estan abiertas o pagadas!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Unable to change tax !"
|
||||
#~ msgstr "¡No ha sido posible cambiar el impuesto!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Invoice is already reconciled"
|
||||
#~ msgstr "La factura ya está conciliada"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Date to must be set between %s and %s"
|
||||
#~ msgstr "La fecha debe estar entre %s y %s"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "No records found for your selection!"
|
||||
#~ msgstr "¡No se han encontrado registros en su selección!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Data Insufficient !"
|
||||
#~ msgstr "¡Datos insuficientes!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Date not in a defined fiscal year"
|
||||
#~ msgstr "La fecha no está en un ejercicio fiscal definido"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Can not pay draft/proforma/cancel invoice."
|
||||
#~ msgstr "No se puede pagar una factura borrador/proforma/cancelada."
|
||||
|
||||
#, python-format
|
||||
#~ msgid "You must define an analytic journal of type '%s' !"
|
||||
#~ msgstr "¡Debe definir un diario analítico de tipo '%s'!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "No journal for ending writing has been defined for the fiscal year"
|
||||
#~ msgstr ""
|
||||
#~ "No se ha definido un diario para el asiento de cierre para el ejercicio "
|
||||
#~ "fiscal"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Can not %s draft/proforma/cancel invoice."
|
||||
#~ msgstr "No se puede %s factura borrador/proforma/cancelada."
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Cannot create invoice move on centralised journal"
|
||||
#~ msgstr "No se puede crear asiento factura en el diario centralizado"
|
||||
|
||||
#, python-format
|
||||
#~ msgid ""
|
||||
#~ "The Payment Term of Supplier does not have Payment Term Lines(Computation) "
|
||||
#~ "defined !"
|
||||
#~ msgstr ""
|
||||
#~ "¡El plazo de pago de los proveedores no tiene líneas de plazo de pago "
|
||||
#~ "(Cálculo) definidas!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "You can not change the tax, you should remove and recreate lines !"
|
||||
#~ msgstr ""
|
||||
#~ "¡No se puede cambiar el impuesto, debe eliminar y recrear las líneas!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Global taxes defined, but are not in invoice lines !"
|
||||
#~ msgstr ""
|
||||
#~ "¡Impuestos globales definidos, pero no están en líneas de la factura!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "No Period found on Invoice!"
|
||||
#~ msgstr "No se encontro un período en la factura"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "No period found !"
|
||||
#~ msgstr "¡No se ha encontrado período!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Unable to find a valid period !"
|
||||
#~ msgstr "¡No ha sido posible encontrar un período válido!"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "You must enter a period length that cannot be 0 or below !"
|
||||
#~ msgstr ""
|
||||
#~ "¡Debe introducir una duración del período que no puede ser 0 o inferior!"
|
||||
|
||||
+556
-261
File diff suppressed because it is too large
Load Diff
+465
-406
File diff suppressed because it is too large
Load Diff
+817
-264
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-23 04:08+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -215,7 +215,7 @@ msgstr "明细"
|
||||
#. module: account
|
||||
#: wizard_view:account.aged.trial.balance,init:0
|
||||
msgid "Aged Trial Balance"
|
||||
msgstr "账龄试算平衡表"
|
||||
msgstr "旧的试算表"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.menu_finance_recurrent_entries
|
||||
@@ -239,7 +239,7 @@ msgstr "金额"
|
||||
#: model:ir.actions.wizard,name:account.wizard_third_party_ledger
|
||||
#: model:ir.ui.menu,name:account.menu_third_party_ledger
|
||||
msgid "Partner Ledger"
|
||||
msgstr "业务伙伴总帐"
|
||||
msgstr "业务伙伴分类账"
|
||||
|
||||
#. module: account
|
||||
#: field:product.template,supplier_taxes_id:0
|
||||
@@ -460,7 +460,7 @@ msgstr "从草稿确认, 与对/ 不对账"
|
||||
#: model:ir.actions.wizard,name:account.action_account_bank_reconcile_tree
|
||||
#: model:ir.ui.menu,name:account.menu_action_account_bank_reconcile_check_tree
|
||||
msgid "Bank reconciliation"
|
||||
msgstr "银行对账"
|
||||
msgstr "银行对帐单"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.invoice:0
|
||||
@@ -680,7 +680,7 @@ msgstr "月"
|
||||
#. module: account
|
||||
#: field:account.analytic.account,partner_id:0
|
||||
msgid "Associated Partner"
|
||||
msgstr "相关业务伙伴"
|
||||
msgstr "相关的业务伙伴"
|
||||
|
||||
#. module: account
|
||||
#: view:account.invoice:0
|
||||
@@ -795,7 +795,7 @@ msgstr "之前生成的记录:"
|
||||
#: model:ir.actions.report.xml,name:account.account_analytic_account_cost_ledger
|
||||
#: model:ir.actions.wizard,name:account.account_analytic_account_cost_ledger_report
|
||||
msgid "Cost Ledger"
|
||||
msgstr "成本分类帐"
|
||||
msgstr "成本分类账"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.account.balance.report,checktype:0
|
||||
@@ -888,7 +888,7 @@ msgstr "补差额集合"
|
||||
#: field:account.model.line,amount_currency:0
|
||||
#: field:account.move.line,amount_currency:0
|
||||
msgid "Amount Currency"
|
||||
msgstr "货币金额"
|
||||
msgstr "另一货币金额"
|
||||
|
||||
#. module: account
|
||||
#: field:account.chart.template,property_account_expense_categ:0
|
||||
@@ -1897,7 +1897,7 @@ msgstr "支付发票"
|
||||
#. module: account
|
||||
#: constraint:account.invoice:0
|
||||
msgid "Error: Invalid Bvr Number (wrong checksum)."
|
||||
msgstr "错误:无效的Bvr号(错误的检验和)"
|
||||
msgstr "错误:无效的Bvr号(校验错误)"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,name:account.action_invoice_tree5
|
||||
@@ -4212,7 +4212,7 @@ msgstr "这序列提供记录集合列表的显示顺序"
|
||||
#. module: account
|
||||
#: field:account.journal,type_control_ids:0
|
||||
msgid "Type Controls"
|
||||
msgstr "类型控制"
|
||||
msgstr "控制类型"
|
||||
|
||||
#. module: account
|
||||
#: field:account.analytic.account,name:0
|
||||
@@ -5182,7 +5182,7 @@ msgstr "从手动转为草稿"
|
||||
#. module: account
|
||||
#: model:ir.ui.menu,name:account.next_id_43
|
||||
msgid "This Month"
|
||||
msgstr "本月"
|
||||
msgstr "这月"
|
||||
|
||||
#. module: account
|
||||
#: field:account.account.type,sign:0
|
||||
@@ -5209,7 +5209,7 @@ msgstr "在确认对帐单产生的会计分录"
|
||||
#. module: account
|
||||
#: wizard_view:account_use_models,create:0
|
||||
msgid "Use Model"
|
||||
msgstr "使用模型"
|
||||
msgstr "使用模式"
|
||||
|
||||
#. module: account
|
||||
#: wizard_button:account.wizard_paid_open,init,end:0
|
||||
|
||||
@@ -33,8 +33,9 @@ class account_installer(osv.osv_memory):
|
||||
_inherit = 'res.config.installer'
|
||||
|
||||
def _get_default_accounts(self, cr, uid, context=None):
|
||||
accounts = [{'acc_name':'Current','account_type':'cash'},
|
||||
{'acc_name':'Deposit','account_type':'cash'}]
|
||||
accounts = [{'acc_name':'Current','account_type':'bank'},
|
||||
{'acc_name':'Deposit','account_type':'bank'},
|
||||
{'acc_name':'Cash','account_type':'cash'}]
|
||||
return accounts
|
||||
|
||||
def _get_charts(self, cr, uid, context=None):
|
||||
@@ -295,9 +296,12 @@ class account_installer(osv.osv_memory):
|
||||
'account_paid_id': acc_template_ref[value['account_paid_id']],
|
||||
})
|
||||
|
||||
# Creating Journals
|
||||
# Creating Journals Sales and Purchase
|
||||
vals_journal={}
|
||||
view_id = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Journal View')])[0]
|
||||
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 seq_journal:
|
||||
|
||||
+33
-37
@@ -219,7 +219,7 @@ class account_invoice(osv.osv):
|
||||
|
||||
_name = "account.invoice"
|
||||
_description = 'Invoice'
|
||||
_order = "number"
|
||||
_order = "id"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Description', size=64, select=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
@@ -231,11 +231,12 @@ class account_invoice(osv.osv):
|
||||
('in_refund','Supplier Refund'),
|
||||
],'Type', readonly=True, select=True, change_default=True),
|
||||
|
||||
'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'),
|
||||
#'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)]}),
|
||||
'comment': fields.text('Additional Information', translate=True),
|
||||
'comment': fields.text('Additional Information'),
|
||||
|
||||
'state': fields.selection([
|
||||
('draft','Draft'),
|
||||
@@ -768,8 +769,8 @@ class account_invoice(osv.osv):
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
context = {}
|
||||
for inv in self.browse(cr, uid, ids):
|
||||
if not inv.journal_id.invoice_sequence_id:
|
||||
raise osv.except_osv(_('Error !'), _('Please define invoice sequence on invoice journal'))
|
||||
if not inv.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.'))
|
||||
if inv.move_id:
|
||||
@@ -875,7 +876,14 @@ 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, 'type': entry_type}
|
||||
move = {
|
||||
'ref': inv.number,
|
||||
'line_id': line,
|
||||
'journal_id': journal_id,
|
||||
'date': date,
|
||||
'type': entry_type,
|
||||
'narration':inv.comment
|
||||
}
|
||||
period_id=inv.period_id and inv.period_id.id or False
|
||||
if not period_id:
|
||||
period_ids= self.pool.get('account.period').search(cr, uid, [('date_start','<=',inv.date_invoice or time.strftime('%Y-%m-%d')),('date_stop','>=',inv.date_invoice or time.strftime('%Y-%m-%d'))])
|
||||
@@ -919,44 +927,32 @@ 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, {})
|
||||
|
||||
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 ''
|
||||
if not number:
|
||||
tmp_context = {
|
||||
'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id
|
||||
}
|
||||
if obj_inv.journal_id.invoice_sequence_id:
|
||||
sequence_id = obj_inv.journal_id.invoice_sequence_id.id
|
||||
number = self.pool.get('ir.sequence').get_id(cr, uid,
|
||||
sequence_id,
|
||||
'id',
|
||||
context=tmp_context)
|
||||
else:
|
||||
number = self.pool.get('ir.sequence').get_id(cr, uid,
|
||||
'account.invoice.%s' % invtype,
|
||||
'code',
|
||||
context=tmp_context)
|
||||
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 = \'\')',
|
||||
|
||||
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)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record id="analytic_root" model="account.analytic.account">
|
||||
<field name="name">Analytic Chart</field>
|
||||
<field name="name" model="res.company" use="name" search="[('id', '=', 1)]"/>
|
||||
<field name="code">0</field>
|
||||
</record>
|
||||
<record id="analytic_absences" model="account.analytic.account">
|
||||
|
||||
@@ -23,25 +23,25 @@
|
||||
<field name="model">account.analytic.account</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Analytic Account">
|
||||
<group col="8" colspan="4">
|
||||
<filter icon="terp-check" string="Current" domain="[('state','=','open')]" help="Current Accounts"/>
|
||||
<filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="partner_id" select="1"/>
|
||||
<field name="user_id" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Parent" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
|
||||
<filter string="Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Associated Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<search string="Analytic Account">
|
||||
<group col="8" colspan="4">
|
||||
<filter icon="terp-check" string="Current" domain="[('state','=','open')]" help="Current Accounts"/>
|
||||
<filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="partner_id" select="1"/>
|
||||
<field name="user_id" widget="selection"/>
|
||||
</group>
|
||||
</search>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Parent" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
|
||||
<filter string="Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Associated Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -54,17 +54,17 @@
|
||||
<tree toolbar="True" colors="red:(date<=current_date);black:(date>current_date)" string="Analytic account">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="date"/>
|
||||
<field name="company_currency_id"/>
|
||||
<field name="debit"/>
|
||||
<field name="credit"/>
|
||||
<field name="balance"/>
|
||||
<field name="quantity"/>
|
||||
<field name="quantity_max"/>
|
||||
<field name="parent_id" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="company_currency_id"/>
|
||||
<!-- <field name="date"/>-->
|
||||
<!-- <field name="debit"/>-->
|
||||
<!-- <field name="credit"/>-->
|
||||
<!-- <field name="quantity"/>-->
|
||||
<!-- <field name="quantity_max"/>-->
|
||||
<!-- <field name="parent_id" invisible="1"/>-->
|
||||
<!-- <field name="type" invisible="1"/>-->
|
||||
<!-- <field name="partner_id" invisible="1"/>-->
|
||||
<!-- <field name="user_id" invisible="1"/>-->
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -109,13 +109,13 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph,form</field>
|
||||
<field name="view_id" ref="view_account_analytic_account_tree"/>
|
||||
<field name="context">{"search_default_user_id":uid}</field>
|
||||
<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"/>
|
||||
|
||||
<record id="act_account_renew_view" model="ir.actions.act_window">
|
||||
<record id="act_account_renew_view" model="ir.actions.act_window">
|
||||
<field name="name">Accounts to Renew</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
@@ -141,7 +141,7 @@
|
||||
<!-- 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"/>
|
||||
<!-- <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"/>
|
||||
@@ -200,22 +200,26 @@
|
||||
<field name="model">account.analytic.line</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Analytic Lines">
|
||||
<group col='6' colspan='4'>
|
||||
<search string="Search Analytic Lines">
|
||||
<group col='6' colspan='4'>
|
||||
<field name="name" select="1"/>
|
||||
<field name="journal_id" select="1"/>
|
||||
<field name="account_id" select="1"/>
|
||||
<field name="amount" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
<field name="user_id" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group string="Group By..." expand="0">
|
||||
<filter string="General Account" context="{'group_by':'general_account_id'}"/>
|
||||
<filter string="Analytic Account" context="{'group_by':'account_id'}"/>
|
||||
<filter string="Analytic Journal" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Product" context="{'group_by':'product_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</group>
|
||||
<newline/>
|
||||
<group col='6' colspan='4'>
|
||||
<field name="journal_id" select="1" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group string="Group By..." expand="0">
|
||||
<filter string="General Account" context="{'group_by':'general_account_id'}"/>
|
||||
<filter string="Analytic Account" context="{'group_by':'account_id'}"/>
|
||||
<filter string="Analytic Journal" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Product" context="{'group_by':'product_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_account_analytic_line_form" model="ir.actions.act_window">
|
||||
@@ -298,16 +302,16 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_analytic_journal_search" model="ir.ui.view">
|
||||
<record id="view_analytic_journal_search" model="ir.ui.view">
|
||||
<field name="name">account.analytic.journal.search</field>
|
||||
<field name="model">account.analytic.journal</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="analytic Journals">
|
||||
<group expand="0" string="Group By...">
|
||||
<search string="analytic Journals">
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -446,14 +450,14 @@
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Analytic Entries Stats">
|
||||
<group col="8" colspan="4">
|
||||
<filter icon="terp-go-year" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Sale journal in this year"/>
|
||||
<filter icon="terp-go-month" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Sale journal in this month"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="month" select="1"/>
|
||||
<field name="account_id" select="1"/>
|
||||
</group>
|
||||
<group col="8" colspan="4">
|
||||
<filter icon="terp-go-year" string="This Year" domain="[('name','=',time.strftime('%%Y'))]" help="Sale journal in this year"/>
|
||||
<filter icon="terp-go-month" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="Sale journal in this month"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="month" select="1"/>
|
||||
<field name="account_id" select="1"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(get_abs(a['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -196,7 +196,7 @@
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(sum_dr()) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(get_abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -221,10 +221,10 @@
|
||||
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines_another('asset'), 'a') ]]</font>[[ a['code'] ]]<font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ a['code'] ]]<font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name'] ]]</font></para>
|
||||
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(get_abs(a['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -234,7 +234,7 @@
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(sum_cr()) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(get_abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(get_abs(a['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9"><font>[[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]]</font><font>[[ a['code1'] ]]</font></para>
|
||||
@@ -206,7 +206,7 @@
|
||||
<para style="terp_default_9"><font color="white">[[ '. '*(a['level1']-1) ]]</font><font>[[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) ]][[ a['name1'] ]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance1'] and formatLang(abs(a['balance1'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance1'] and formatLang(get_abs(a['balance1'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -216,13 +216,13 @@
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(get_abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Balance:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(get_abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
@@ -37,6 +37,7 @@ class report_balancesheet_horizontal(rml_parse.rml_parse):
|
||||
self.result_temp=[]
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'get_abs' : self.get_abs,
|
||||
'get_lines' : self.get_lines,
|
||||
'get_lines_another' : self.get_lines_another,
|
||||
'get_company': self.get_company,
|
||||
@@ -48,6 +49,9 @@ class report_balancesheet_horizontal(rml_parse.rml_parse):
|
||||
|
||||
})
|
||||
self.context = context
|
||||
|
||||
def get_abs(self,amount):
|
||||
return abs(amount)
|
||||
|
||||
def sum_dr(self):
|
||||
if self.res_pl['type'] == 'Net Profit':
|
||||
|
||||
@@ -35,6 +35,7 @@ class report_pl_account_horizontal(rml_parse.rml_parse):
|
||||
self.result_temp=[]
|
||||
self.localcontext.update( {
|
||||
'time': time,
|
||||
'get_abs' : self.get_abs,
|
||||
'get_lines' : self.get_lines,
|
||||
'get_lines_another' : self.get_lines_another,
|
||||
'get_company': self.get_company,
|
||||
@@ -45,7 +46,10 @@ class report_pl_account_horizontal(rml_parse.rml_parse):
|
||||
'final_result' : self.final_result,
|
||||
})
|
||||
self.context = context
|
||||
|
||||
|
||||
def get_abs(self,amount):
|
||||
return abs(amount)
|
||||
|
||||
def final_result(self):
|
||||
return self.res_pl
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a.balance and formatLang(abs(a.balance)) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a.balance and formatLang(get_abs(a.balance)) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -214,7 +214,7 @@
|
||||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Profit C.F.B.L.' and final_result()['type'] or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(get_abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -224,7 +224,7 @@
|
||||
<para style="terp_default_Bold_9">Total:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(get_abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -256,7 +256,7 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a.balance and formatLang(abs(a.balance)) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a.balance and formatLang(get_abs(a.balance)) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -269,7 +269,7 @@
|
||||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Loss C.F.B.L.' and final_result()['type'] or removeParentNode('blockTable') ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(get_abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -279,7 +279,7 @@
|
||||
<para style="terp_default_Bold_9">Total:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(get_abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(abs(a['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance'] and formatLang(get_abs(a['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
@@ -227,7 +227,7 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance1'] and formatLang(abs(a['balance1'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ a['balance1'] and formatLang(get_abs(a['balance1'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -240,7 +240,7 @@
|
||||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Profit C.F.B.L.' and final_result()['type'] or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(get_abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9"></para>
|
||||
@@ -249,7 +249,7 @@
|
||||
<para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Loss C.F.B.L.' and final_result()['type'] or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(get_abs(final_result()['balance'])) or 0.0 ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -260,13 +260,13 @@
|
||||
<para style="terp_default_Bold_9">Total:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_dr() and formatLang(get_abs(sum_dr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total:([[ get_currency(data['form']) ]])</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
<para style="terp_default_Right_9_Bold"><u>[[ sum_cr() and formatLang(get_abs(sum_cr())) or 0.0 ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
"access_account_fiscalyear","account.fiscalyear","model_account_fiscalyear","account.group_account_manager",1,1,1,1
|
||||
"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
|
||||
"access_res_currency_account_manager","res.currency account manager","base.model_res_currency","group_account_manager",1,1,1,1
|
||||
"access_res_currency_rate_account_manager","res.currency.rate account manager","base.model_res_currency_rate","group_account_manager",1,1,1,1
|
||||
"access_account_invoice_user","account.invoice user","model_account_invoice","base.group_user",1,0,0,0
|
||||
|
||||
|
@@ -45,7 +45,9 @@ import account_open_closed_fiscalyear
|
||||
import account_compare_account_balance_report
|
||||
import account_invoice_state
|
||||
import account_chart
|
||||
import account_move_line_select
|
||||
#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
|
||||
|
||||
@@ -29,15 +29,15 @@ class account_automatic_reconcile(osv.osv_memory):
|
||||
_description = 'Automatic Reconcile'
|
||||
|
||||
_columns = {
|
||||
'account_ids': fields.many2many('account.account', 'reconcile_account_rel', 'reconcile_id', 'account_id', 'Account to reconcile', domain = [('reconcile','=',1)], \
|
||||
'account_ids': fields.many2many('account.account', 'reconcile_account_rel', 'reconcile_id', 'account_id', 'Accounts to Reconcile', domain = [('reconcile','=',1)], \
|
||||
help = 'If no account is specified, the reconciliation will be made using every accounts that can be reconcilied'),
|
||||
'writeoff_acc_id': fields.many2one('account.account', 'Account'),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal'),
|
||||
'period_id': fields.many2one('account.period', 'Period'),
|
||||
'max_amount': fields.float('Maximum write-off amount'),
|
||||
'power': fields.selection([(p, str(p)) for p in range(2, 10)], 'Power', required=True, help='Number of partial amounts that can be combined to find a balance point can be chosen as the power of the automatic reconciliation'),
|
||||
'date1': fields.date('Start of period', required=True),
|
||||
'date2': fields.date('End of period', required=True),
|
||||
'date1': fields.date('Starting Date', required=True),
|
||||
'date2': fields.date('Ending Date', required=True),
|
||||
'reconciled': fields.integer('Reconciled transactions', readonly=True),
|
||||
'unreconciled': fields.integer('Not reconciled transactions', readonly=True),
|
||||
'allow_write_off': fields.boolean('Allow write off')
|
||||
@@ -54,6 +54,7 @@ class account_automatic_reconcile(osv.osv_memory):
|
||||
'date2': time.strftime('%Y-%m-%d'),
|
||||
'reconciled': _get_reconciled,
|
||||
'unreconciled': _get_unreconciled,
|
||||
'power':2
|
||||
}
|
||||
|
||||
#TODO: cleanup and comment this code... For now, it is awfulllll
|
||||
@@ -245,4 +246,4 @@ class account_automatic_reconcile(osv.osv_memory):
|
||||
|
||||
account_automatic_reconcile()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -7,33 +7,33 @@
|
||||
<field name="model">account.automatic.reconcile</field>
|
||||
<field name="type">form</field>
|
||||
<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"/>
|
||||
</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>
|
||||
<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"/>
|
||||
</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>
|
||||
</record>
|
||||
|
||||
<record id="action_account_automatic_reconcile" model="ir.actions.act_window">
|
||||
<field name="name">Account Automatic Reconcile</field>
|
||||
@@ -47,29 +47,29 @@
|
||||
<field name="help">For an invoice to be considered as paid, the invoice entries must be reconciled with counterparts, usually payments. With the automatic reconciliation functionality, OpenERP make its own search for entries to reconcile in a series of accounts. It tries to find entries for each partner where the amounts correspond.</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
icon="STOCK_EXECUTE"
|
||||
name="Automatic Reconciliation"
|
||||
action="action_account_automatic_reconcile"
|
||||
id="menu_automatic_reconcile"
|
||||
parent="periodical_processing_reconciliation"/>
|
||||
<menuitem
|
||||
icon="STOCK_EXECUTE"
|
||||
name="Automatic Reconciliation"
|
||||
action="action_account_automatic_reconcile"
|
||||
id="menu_automatic_reconcile"
|
||||
parent="periodical_processing_reconciliation"/>
|
||||
|
||||
<record id="account_automatic_reconcile_view1" model="ir.ui.view">
|
||||
<field name="name">Automatic reconcile unreconcile</field>
|
||||
<field name="model">account.automatic.reconcile</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reconciliation result">
|
||||
<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>
|
||||
</form>
|
||||
<form string="Reconciliation result">
|
||||
<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>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -7,41 +7,41 @@
|
||||
<field name="model">account.balance.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select period">
|
||||
<group width="650" height="200">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="display_account" required = "True"/>
|
||||
<newline/>
|
||||
<field name="fiscalyear"/>
|
||||
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
|
||||
<newline/>
|
||||
<separator string="Filters" colspan="4"/>
|
||||
<field name="state" required="True"/>
|
||||
<newline/>
|
||||
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
|
||||
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
|
||||
<separator string="Date Filter" colspan="4"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
|
||||
<separator string="Filter on Periods" colspan="4"/>
|
||||
<field name="periods" colspan="4" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<newline/>
|
||||
<group colspan="4" col="6">
|
||||
<separator colspan="4"/>
|
||||
<newline/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Select period">
|
||||
<group width="650" height="200">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="display_account" required = "True"/>
|
||||
<newline/>
|
||||
<field name="fiscalyear"/>
|
||||
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
|
||||
<newline/>
|
||||
<separator string="Filters" colspan="4"/>
|
||||
<field name="state" required="True"/>
|
||||
<newline/>
|
||||
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
|
||||
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
|
||||
<separator string="Date Filter" colspan="4"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
|
||||
<separator string="Filter on Periods" colspan="4"/>
|
||||
<field name="periods" colspan="4" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<newline/>
|
||||
<group colspan="4" col="6">
|
||||
<separator colspan="4"/>
|
||||
<newline/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="action_account_balance_report" model="ir.actions.act_window">
|
||||
<record id="action_account_balance_report" model="ir.actions.act_window">
|
||||
<field name="name">Account Balance</field>
|
||||
<field name="res_model">account.balance.report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
@@ -51,7 +51,7 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="action_account_balance_report_values">
|
||||
<record model="ir.values" id="action_account_balance_report_values">
|
||||
<field name="model_id" ref="account.model_account_account" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Account Balance</field>
|
||||
@@ -59,19 +59,19 @@
|
||||
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_balance_report'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">account.account</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="account_balance_report_account_view" model="ir.ui.view">
|
||||
<record id="account_balance_report_account_view" model="ir.ui.view">
|
||||
<field name="name">Account Balance</field>
|
||||
<field name="model">account.balance.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Chart">
|
||||
<field name="Account_list"/>
|
||||
<separator colspan="4"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button name="next_view" string="Next" type="object" icon="gtk-go-forward" default_focus="1"/>
|
||||
</form>
|
||||
<form string="Select Chart">
|
||||
<field name="Account_list"/>
|
||||
<separator colspan="4"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button name="next_view" string="Next" type="object" icon="gtk-go-forward" default_focus="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -86,11 +86,11 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem icon="STOCK_PRINT"
|
||||
name="Account Balance"
|
||||
action="action_account_balance_account_report"
|
||||
id="menu_account_balance_report"
|
||||
parent="account.menu_generic_report"/>
|
||||
<menuitem icon="STOCK_PRINT"
|
||||
name="Account Balance"
|
||||
action="action_account_balance_account_report"
|
||||
id="menu_account_balance_report"
|
||||
parent="account.final_accounting_reports"/>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -114,14 +114,12 @@ class account_bs_report(osv.osv_memory):
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'account.balancesheet.horizontal',
|
||||
'datas': data,
|
||||
'nodestroy':True,
|
||||
}
|
||||
else:
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'account.balancesheet',
|
||||
'datas': data,
|
||||
'nodestroy':True,
|
||||
}
|
||||
|
||||
def _check_date(self, cr, uid, data, context=None):
|
||||
|
||||
@@ -2,27 +2,27 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_account_central_journal" model="ir.ui.view">
|
||||
<record id="view_account_central_journal" model="ir.ui.view">
|
||||
<field name="name">Account central Journal</field>
|
||||
<field name="model">account.central.journal</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Print Central Journal">
|
||||
<group height="370" width="400">
|
||||
<group>
|
||||
<separator string="Journals"/><newline/>
|
||||
<field name="journal_id" nolabel="1"/><newline/>
|
||||
<separator string="Periods"/><newline/>
|
||||
<field name="period_id" nolabel="1"/><newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Print Central Journal">
|
||||
<group height="370" width="400">
|
||||
<group>
|
||||
<separator string="Journals"/><newline/>
|
||||
<field name="journal_id" nolabel="1"/><newline/>
|
||||
<separator string="Periods"/><newline/>
|
||||
<field name="period_id" nolabel="1"/><newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Central Journals"
|
||||
parent="account.menu_generic_report"
|
||||
action="action_account_central_journal"
|
||||
id="menu_account_central_journal"
|
||||
icon="STOCK_PRINT"/>
|
||||
<menuitem
|
||||
name="Central Journals"
|
||||
parent="account.menu_journals_report"
|
||||
action="action_account_central_journal"
|
||||
id="menu_account_central_journal"
|
||||
icon="STOCK_PRINT"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -58,6 +58,11 @@ cancelled, please check the box !'))
|
||||
'WHERE fiscalyear_id = %s', ('done', fy_id))
|
||||
cr.execute('UPDATE account_fiscalyear ' \
|
||||
'SET state = %s WHERE id = %s', ('done', fy_id))
|
||||
|
||||
# Log message for Fiscalyear
|
||||
fy_pool = self.pool.get('account.fiscalyear')
|
||||
fy_code = fy_pool.browse(cr, uid, fy_id, context=context).code
|
||||
fy_pool.log(cr, uid, fy_id, "Fiscal year '%s' is closed, no more modification allowed." % (fy_code))
|
||||
return {}
|
||||
|
||||
account_fiscalyear_close_state()
|
||||
|
||||
@@ -2,27 +2,27 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_account_general_journal" model="ir.ui.view">
|
||||
<record id="view_account_general_journal" model="ir.ui.view">
|
||||
<field name="name">Account Genral Journal</field>
|
||||
<field name="model">account.general.journal</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Print General Journal">
|
||||
<group height="380" width="400">
|
||||
<group>
|
||||
<separator string="Journals"/><newline/>
|
||||
<field name="journal_id" nolabel="1"/><newline/>
|
||||
<separator string="Periods"/><newline/>
|
||||
<field name="period_id" nolabel="1"/><newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Print General Journal">
|
||||
<group height="380" width="400">
|
||||
<group>
|
||||
<separator string="Journals"/><newline/>
|
||||
<field name="journal_id" nolabel="1"/><newline/>
|
||||
<separator string="Periods"/><newline/>
|
||||
<field name="period_id" nolabel="1"/><newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="General Journals"
|
||||
parent="account.menu_generic_report"
|
||||
action="action_account_general_journal"
|
||||
id="menu_account_general_journal"
|
||||
icon="STOCK_PRINT"/>
|
||||
<menuitem
|
||||
name="General Journals"
|
||||
parent="account.menu_journals_report"
|
||||
action="action_account_general_journal"
|
||||
id="menu_account_general_journal"
|
||||
icon="STOCK_PRINT"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<menuitem
|
||||
icon="STOCK_PRINT"
|
||||
name="General Ledger"
|
||||
parent="account.menu_generic_report"
|
||||
parent="account.final_accounting_reports"
|
||||
action="action_account_general_ledger_menu"
|
||||
id="menu_general_ledger"
|
||||
/>
|
||||
|
||||
@@ -25,15 +25,15 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="action_account_invoice_confirm_values">
|
||||
<field name="model_id" ref="account.model_account_invoice" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Confirm Draft Invoices</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_invoice_confirm'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">account.invoice</field>
|
||||
</record>
|
||||
<!-- <record model="ir.values" id="action_account_invoice_confirm_values">-->
|
||||
<!-- <field name="model_id" ref="account.model_account_invoice" />-->
|
||||
<!-- <field name="object" eval="1" />-->
|
||||
<!-- <field name="name">Confirm Draft Invoices</field>-->
|
||||
<!-- <field name="key2">client_action_multi</field>-->
|
||||
<!-- <field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_invoice_confirm'))" />-->
|
||||
<!-- <field name="key">action</field>-->
|
||||
<!-- <field name="model">account.invoice</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record id="account_invoice_cancel_view" model="ir.ui.view">
|
||||
<field name="name">account.invoice.cancel.form</field>
|
||||
@@ -59,15 +59,15 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="action_account_invoice_cancel_values">
|
||||
<field name="model_id" ref="account.model_account_invoice" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Cancel Selected Invoices</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_invoice_cancel'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">account.invoice</field>
|
||||
</record>
|
||||
<!-- <record model="ir.values" id="action_account_invoice_cancel_values">-->
|
||||
<!-- <field name="model_id" ref="account.model_account_invoice" />-->
|
||||
<!-- <field name="object" eval="1" />-->
|
||||
<!-- <field name="name">Cancel Selected Invoices</field>-->
|
||||
<!-- <field name="key2">client_action_multi</field>-->
|
||||
<!-- <field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_invoice_cancel'))" />-->
|
||||
<!-- <field name="key">action</field>-->
|
||||
<!-- <field name="model">account.invoice</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
<field name="model">account.move.line.select</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Select">
|
||||
<label string="Are you sure you want to open Account move line entries!" colspan="4"/>
|
||||
<separator string="" colspan="4" />
|
||||
<form string="Account Select">
|
||||
<label string="Are you sure you want to open Account move line entries!" colspan="4"/>
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open Entries" name="open_window" type="object" default_focus="1"/>
|
||||
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open Entries" name="open_window" type="object" default_focus="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
@@ -27,13 +27,13 @@
|
||||
<field name="target">new</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>
|
||||
<field name="name">Open Account</field>
|
||||
<field eval="'ir.actions.act_window,%d'%action_account_move_line_select_button" name="value"/>
|
||||
<field eval="True" name="object"/>
|
||||
</record>
|
||||
<!-- <record id="ir_account_move_line_select" model="ir.values">-->
|
||||
<!-- <field name="key2">tree_but_open</field>-->
|
||||
<!-- <field name="model">account.account</field>-->
|
||||
<!-- <field name="name">Open Account</field>-->
|
||||
<!-- <field eval="'ir.actions.act_window,%d'%action_account_move_line_select_button" name="value"/>-->
|
||||
<!-- <field eval="True" name="object"/>-->
|
||||
<!-- </record>-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -46,6 +46,11 @@ class account_period_close(osv.osv_memory):
|
||||
for id in context['active_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))
|
||||
|
||||
# Log message for Period
|
||||
period_pool = self.pool.get('account.period')
|
||||
for period_id, name in period_pool.name_get(cr, uid, [id]):
|
||||
period_pool.log(cr, uid, period_id, "Period '%s' is closed, no more modification allowed for this period." % (name))
|
||||
return {}
|
||||
|
||||
account_period_close()
|
||||
|
||||
@@ -111,14 +111,12 @@ class account_pl_report(osv.osv_memory):
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'pl.account.horizontal',
|
||||
'datas': data,
|
||||
'nodestroy':True,
|
||||
}
|
||||
else:
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'pl.account',
|
||||
'datas': data,
|
||||
'nodestroy':True,
|
||||
}
|
||||
|
||||
def _check_date(self, cr, uid, data, context=None):
|
||||
|
||||
@@ -76,11 +76,6 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
parent="account.menu_finance_legal_statement"
|
||||
id="final_accounting_reports"
|
||||
name="Accounting Reports"/>
|
||||
|
||||
<menuitem icon="STOCK_PRINT"
|
||||
name="Profit And Loss"
|
||||
action="action_pl_balance_account_report"
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
<menuitem
|
||||
name="Journals"
|
||||
parent="account.menu_generic_report"
|
||||
parent="account.menu_journals_report"
|
||||
action="action_account_print_journal"
|
||||
id="menu_account_print_journal"
|
||||
icon="STOCK_PRINT"/>
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
<form string="Create Entries From Models">
|
||||
<group height="240" width="510">
|
||||
<separator string="This wizard will create recurring accounting entries" colspan="4"/>
|
||||
<field name="model"/>
|
||||
<label string="Select recurring to create a manualy recurring accounting entries" width="400"/>
|
||||
<field name="model" colspan="4" nolabel="1"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="2">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-03-12 23:52+0000\n"
|
||||
"Last-Translator: Emerson <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-07-27 20:25+0000\n"
|
||||
"Last-Translator: Leandro Chaves <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-06-22 04:10+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-28 03:47+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
@@ -136,7 +136,7 @@ msgstr "Selecione Informação"
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.instance,account3_ids:0
|
||||
msgid "Account3 Id"
|
||||
msgstr ""
|
||||
msgstr "ID Conta3"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.instance,journal_id:0
|
||||
@@ -157,27 +157,27 @@ msgstr "Ref. Conta Analítica"
|
||||
#. module: account_analytic_plans
|
||||
#: rml:account.analytic.account.crossovered.analytic:0
|
||||
msgid "Analytic Account :"
|
||||
msgstr ""
|
||||
msgstr "Conta Analítica:"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: view:account.analytic.plan.line:0
|
||||
msgid "Analytic Plan Line"
|
||||
msgstr ""
|
||||
msgstr "Linha do Plano Analítico"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: rml:account.analytic.account.crossovered.analytic:0
|
||||
msgid "Analytic Account Reference:"
|
||||
msgstr ""
|
||||
msgstr "Conta Analítica Referencia"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: model:ir.actions.wizard,name:account_analytic_plans.create_model
|
||||
msgid "Create Model"
|
||||
msgstr ""
|
||||
msgstr "Criar Modelo"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan,default_instance_id:0
|
||||
msgid "Default Entries"
|
||||
msgstr ""
|
||||
msgstr "Lançamentos padrões"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: view:account.analytic.plan:0
|
||||
@@ -185,32 +185,32 @@ msgstr ""
|
||||
#: field:account.journal,plan_id:0
|
||||
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan
|
||||
msgid "Analytic Plans"
|
||||
msgstr ""
|
||||
msgstr "Planos Analíticos"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.line,min_required:0
|
||||
msgid "Minimum Allowed (%)"
|
||||
msgstr ""
|
||||
msgstr "Mínimo Permitido (%)"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.instance,account1_ids:0
|
||||
msgid "Account1 Id"
|
||||
msgstr ""
|
||||
msgstr "Id Conta1"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.line,max_required:0
|
||||
msgid "Maximum Allowed (%)"
|
||||
msgstr ""
|
||||
msgstr "Máximo Permitido (%)"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: wizard_view:create.model,info:0
|
||||
msgid "Distribution Model Saved"
|
||||
msgstr ""
|
||||
msgstr "Modelo de Distribuição Arquivado (Salvo)"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance
|
||||
msgid "Analytic Plan Instance"
|
||||
msgstr ""
|
||||
msgstr "Instância do Plano Analítico"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: constraint:ir.ui.view:0
|
||||
@@ -220,7 +220,7 @@ msgstr "Invalido XML para Arquitetura da View"
|
||||
#. module: account_analytic_plans
|
||||
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_instance_model_open
|
||||
msgid "Distribution Models"
|
||||
msgstr ""
|
||||
msgstr "Modelos de Distribuição"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: model:ir.module.module,description:account_analytic_plans.module_meta_information
|
||||
@@ -256,17 +256,47 @@ msgid ""
|
||||
"for one account entry.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"Este modelo permite o uso de vários planos analíticos, de acordo com o "
|
||||
"diário geral,\n"
|
||||
"de forma que várias linhas analíticas são criadas quando a fatura ou "
|
||||
"lançamento\n"
|
||||
"são confirmadas.\n"
|
||||
"\n"
|
||||
"Por exemplo, você pode definir a seguinte estrutura analítica:\n"
|
||||
" Projetos\n"
|
||||
" Projeto 1\n"
|
||||
" SubProj 1.1\n"
|
||||
" SubProj 1.2\n"
|
||||
" Projeto 2\n"
|
||||
" Vendedor\n"
|
||||
" Erico\n"
|
||||
" Fabiano\n"
|
||||
"\n"
|
||||
"No exemplo temos dois planos: Projetos e Vendedores. Uma fatura deve\n"
|
||||
"ser capaz de escrever lançamentos analíticos nos 2 planos: SubProj 1.1 e\n"
|
||||
"Fabiano. A conta também pode ser separada. O exemplo a seguir é para\n"
|
||||
"uma fatura que envolve os 2 subprojetos e está associada a um vendedor:\n"
|
||||
"\n"
|
||||
"Plano1:\n"
|
||||
" SubProjeto 1.1: 50%\n"
|
||||
" SubProjeto 1.2: 50%\n"
|
||||
"Plano2:\n"
|
||||
" Eric: 100%\n"
|
||||
"\n"
|
||||
"Quando esta linha da fatura for confirmada, ela vai gerar 3 linhas\n"
|
||||
"analíticas, para um lançamento na conta,\n"
|
||||
" "
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: model:ir.module.module,shortdesc:account_analytic_plans.module_meta_information
|
||||
msgid "Multiple-plans management in Analytic Accounting"
|
||||
msgstr ""
|
||||
msgstr "Múltiplos-planos gerenciados na Contabilidade Analítica"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: view:account.analytic.plan.line:0
|
||||
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_line
|
||||
msgid "Analytic Plan Lines"
|
||||
msgstr ""
|
||||
msgstr "Linhas do Plano Analítico"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: rml:account.analytic.account.crossovered.analytic:0
|
||||
@@ -276,68 +306,69 @@ msgstr ""
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.instance,plan_id:0
|
||||
msgid "Model's Plan"
|
||||
msgstr ""
|
||||
msgstr "Plano do Modelo"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.instance,account2_ids:0
|
||||
msgid "Account2 Id"
|
||||
msgstr ""
|
||||
msgstr "Id Conta2"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: rml:account.analytic.account.crossovered.analytic:0
|
||||
msgid "Amount"
|
||||
msgstr ""
|
||||
msgstr "Valor"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: help:account.analytic.plan.line,root_analytic_id:0
|
||||
msgid "Root account of this plan."
|
||||
msgstr ""
|
||||
msgstr "Conta raiz para este plano."
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.instance,account6_ids:0
|
||||
msgid "Account6 Id"
|
||||
msgstr ""
|
||||
msgstr "Id Conta6"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: rml:account.analytic.account.crossovered.analytic:0
|
||||
msgid "Quantity"
|
||||
msgstr ""
|
||||
msgstr "Quantidade"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.instance,account_ids:0
|
||||
msgid "Account Id"
|
||||
msgstr ""
|
||||
msgstr "Id Conta"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: rml:account.analytic.account.crossovered.analytic:0
|
||||
msgid "Code"
|
||||
msgstr ""
|
||||
msgstr "Código"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: wizard_button:create.model,info,end:0
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
msgstr "OK"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.line,root_analytic_id:0
|
||||
msgid "Root Account"
|
||||
msgstr ""
|
||||
msgstr "Conta Raiz"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: wizard_view:create.model,info:0
|
||||
msgid ""
|
||||
"This distribution model has been saved. You will be able to reuse it later."
|
||||
msgstr ""
|
||||
"Este modelo de distribuição foi salvo. Você poderá reutilizá-lo mais tarde."
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.line,sequence:0
|
||||
msgid "Sequence"
|
||||
msgstr ""
|
||||
msgstr "Sequência"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.plan.instance.line,analytic_account_id:0
|
||||
msgid "Analytic Account"
|
||||
msgstr ""
|
||||
msgstr "Conta analítica"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: field:account.analytic.default,analytics_id:0
|
||||
@@ -346,29 +377,29 @@ msgstr ""
|
||||
#: field:account.invoice.line,analytics_id:0
|
||||
#: field:account.move.line,analytics_id:0
|
||||
msgid "Analytic Distribution"
|
||||
msgstr ""
|
||||
msgstr "Distribuição Analítica"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: model:ir.ui.menu,name:account_analytic_plans.menu_account_analytic_plan_instance_action
|
||||
msgid "Analytic Distribution's models"
|
||||
msgstr ""
|
||||
msgstr "Modelos de Distribuição Analítica"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: wizard_button:wizard.crossovered.analytic,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
msgstr "Cancelar"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: wizard_field:wizard.crossovered.analytic,init,date1:0
|
||||
msgid "Start Date"
|
||||
msgstr ""
|
||||
msgstr "Data de Início"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: rml:account.analytic.account.crossovered.analytic:0
|
||||
msgid "at"
|
||||
msgstr ""
|
||||
msgstr "em"
|
||||
|
||||
#. module: account_analytic_plans
|
||||
#: rml:account.analytic.account.crossovered.analytic:0
|
||||
msgid "From Date"
|
||||
msgstr ""
|
||||
msgstr "Data Inicial"
|
||||
|
||||
@@ -7,19 +7,19 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2009-09-08 16:30+0000\n"
|
||||
"Last-Translator: Pedro_Maschio <pedro.bicudo@tgtconsult.com.br>\n"
|
||||
"PO-Revision-Date: 2010-07-27 20:39+0000\n"
|
||||
"Last-Translator: Leandro Chaves <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-06-22 04:18+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-28 03:47+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:crossovered.budget,creating_user_id:0
|
||||
msgid "Responsible User"
|
||||
msgstr ""
|
||||
msgstr "Usuário responsável"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.budget:0
|
||||
@@ -30,28 +30,28 @@ msgstr "% desempenho"
|
||||
#: model:ir.actions.act_window,name:account_budget.open_budget_post_form
|
||||
#: model:ir.ui.menu,name:account_budget.menu_budget_post_form
|
||||
msgid "Budgetary Positions"
|
||||
msgstr ""
|
||||
msgstr "Posições Orçamentárias"
|
||||
|
||||
#. module: account_budget
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
msgstr "Nome de modelo inválido na definição da ação"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.analytic.account.budget:0
|
||||
#: rml:crossovered.budget.report:0
|
||||
msgid "Printed at:"
|
||||
msgstr ""
|
||||
msgstr "Impresso em:"
|
||||
|
||||
#. module: account_budget
|
||||
#: view:crossovered.budget:0
|
||||
msgid "Confirm"
|
||||
msgstr ""
|
||||
msgstr "confirmar"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:crossovered.budget,validating_user_id:0
|
||||
msgid "Validate User"
|
||||
msgstr ""
|
||||
msgstr "Validar usuário"
|
||||
|
||||
#. module: account_budget
|
||||
#: constraint:ir.model:0
|
||||
@@ -64,12 +64,12 @@ msgstr ""
|
||||
#. module: account_budget
|
||||
#: selection:crossovered.budget,state:0
|
||||
msgid "Confirmed"
|
||||
msgstr ""
|
||||
msgstr "Confirmado"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:account.budget.post.dotation,period_id:0
|
||||
msgid "Period"
|
||||
msgstr ""
|
||||
msgstr "Período"
|
||||
|
||||
#. module: account_budget
|
||||
#: wizard_field:account.budget.report,init,date2:0
|
||||
@@ -77,61 +77,61 @@ msgstr ""
|
||||
#: wizard_field:wizard.crossovered.budget,init,date_to:0
|
||||
#: wizard_field:wizard.crossovered.budget.summary,init,date_to:0
|
||||
msgid "End of period"
|
||||
msgstr ""
|
||||
msgstr "Fim do período"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.budget:0
|
||||
msgid "Printing date:"
|
||||
msgstr ""
|
||||
msgstr "Data de impressão:"
|
||||
|
||||
#. module: account_budget
|
||||
#: selection:crossovered.budget,state:0
|
||||
msgid "Draft"
|
||||
msgstr ""
|
||||
msgstr "Provisório"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.analytic.account.budget:0
|
||||
#: rml:account.budget:0
|
||||
#: rml:crossovered.budget.report:0
|
||||
msgid "at"
|
||||
msgstr ""
|
||||
msgstr "em"
|
||||
|
||||
#. module: account_budget
|
||||
#: view:account.budget.post:0
|
||||
msgid "Dotations"
|
||||
msgstr ""
|
||||
msgstr "Dotações"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.budget:0
|
||||
msgid "Performance"
|
||||
msgstr ""
|
||||
msgstr "Desempenho"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.analytic.account.budget:0
|
||||
#: rml:account.budget:0
|
||||
#: rml:crossovered.budget.report:0
|
||||
msgid "Currency:"
|
||||
msgstr ""
|
||||
msgstr "Moeda:"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.budget:0
|
||||
msgid "From"
|
||||
msgstr ""
|
||||
msgstr "De"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:crossovered.budget.lines,percentage:0
|
||||
msgid "Percentage"
|
||||
msgstr ""
|
||||
msgstr "Porcentagem"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.budget:0
|
||||
msgid "Results"
|
||||
msgstr ""
|
||||
msgstr "Resultados"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:crossovered.budget,state:0
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
msgstr "Estado"
|
||||
|
||||
#. module: account_budget
|
||||
#: model:ir.module.module,description:account_budget.module_meta_information
|
||||
@@ -162,23 +162,46 @@ msgid ""
|
||||
"Budgets per Budgets.\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Este módulo permite um gerenciamento de orçamentos analíticos e cruzamento "
|
||||
"com outros módulos.\n"
|
||||
"\n"
|
||||
"Uma vez definido o Orçamento Principal e Orçamentos acessórios (em "
|
||||
"Finanças/Gerenciamento/Orçamento/), os Gerentes de Projeto podem marcar o "
|
||||
"montante planejado em cada Conta Analítica.\n"
|
||||
"\n"
|
||||
"O contador tem a possibilidade de ver o montante total planejado por cada "
|
||||
"Orçamento (Principal e Acessório) para poder se assegurar de que o total "
|
||||
"planejado não é maior ou menor do que o planejado para esse Orçamento. Cada "
|
||||
"lista de registros poderá ser alternada para o modo gráfico. \n"
|
||||
"\n"
|
||||
"Três relatórios estão disponíveis:\n"
|
||||
"\n"
|
||||
"1. O primeiro está disponível na Lista de Orçamentos. Este demonstra a "
|
||||
"alocação, para os Orçamentos, das Contas Analíticas por Orçamento "
|
||||
"Principal.\n"
|
||||
"2. O segundo é um resumo do primeiro. Somente demonstra a alocação, para os "
|
||||
"Orçamentos selecionados, das Contas Analíticas.\n"
|
||||
"3. O último está disponível no Plano de Contas Analítico. Demonstra a "
|
||||
"alocação, para as Contas selecionadas, do Orçamento Principal, por "
|
||||
"Orçamento.\n"
|
||||
"\n"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.budget:0
|
||||
#: rml:crossovered.budget.report:0
|
||||
msgid "%"
|
||||
msgstr ""
|
||||
msgstr "%"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.analytic.account.budget:0
|
||||
#: rml:crossovered.budget.report:0
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
msgstr "Descrição"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.analytic.account.budget:0
|
||||
msgid "Analytic Account :"
|
||||
msgstr ""
|
||||
msgstr "Conta Analítica:"
|
||||
|
||||
#. module: account_budget
|
||||
#: wizard_button:account.budget.report,init,report:0
|
||||
@@ -186,12 +209,12 @@ msgstr ""
|
||||
#: wizard_button:wizard.crossovered.budget,init,report:0
|
||||
#: wizard_button:wizard.crossovered.budget.summary,init,report:0
|
||||
msgid "Print"
|
||||
msgstr ""
|
||||
msgstr "Imprimir"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.budget:0
|
||||
msgid "A/c No."
|
||||
msgstr ""
|
||||
msgstr "No.Cta."
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.analytic.account.budget:0
|
||||
@@ -205,60 +228,60 @@ msgstr "para"
|
||||
#: rml:account.budget:0
|
||||
#: rml:crossovered.budget.report:0
|
||||
msgid "Total :"
|
||||
msgstr ""
|
||||
msgstr "Total :"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.analytic.account.budget:0
|
||||
#: field:crossovered.budget.lines,planned_amount:0
|
||||
#: rml:crossovered.budget.report:0
|
||||
msgid "Planned Amount"
|
||||
msgstr ""
|
||||
msgstr "Valor Planejado"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.analytic.account.budget:0
|
||||
#: rml:crossovered.budget.report:0
|
||||
msgid "Perc(%)"
|
||||
msgstr ""
|
||||
msgstr "Perc(%)"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.budget:0
|
||||
msgid "Period Budget"
|
||||
msgstr ""
|
||||
msgstr "Orçamento do Período"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.budget:0
|
||||
msgid "Budget Analysis"
|
||||
msgstr ""
|
||||
msgstr "Análise do Orçamento"
|
||||
|
||||
#. module: account_budget
|
||||
#: view:crossovered.budget:0
|
||||
#: selection:crossovered.budget,state:0
|
||||
msgid "Done"
|
||||
msgstr ""
|
||||
msgstr "Completo"
|
||||
|
||||
#. module: account_budget
|
||||
#: view:crossovered.budget:0
|
||||
msgid "Validate"
|
||||
msgstr ""
|
||||
msgstr "Validar"
|
||||
|
||||
#. module: account_budget
|
||||
#: wizard_view:wizard.crossovered.budget,init:0
|
||||
#: wizard_view:wizard.crossovered.budget.summary,init:0
|
||||
msgid "Select Options"
|
||||
msgstr ""
|
||||
msgstr "Selecione Opções"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.analytic.account.budget:0
|
||||
#: field:crossovered.budget.lines,practical_amount:0
|
||||
#: rml:crossovered.budget.report:0
|
||||
msgid "Practical Amount"
|
||||
msgstr ""
|
||||
msgstr "Valor Real"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:crossovered.budget,date_to:0
|
||||
#: field:crossovered.budget.lines,date_to:0
|
||||
msgid "End Date"
|
||||
msgstr ""
|
||||
msgstr "Data Final"
|
||||
|
||||
#. module: account_budget
|
||||
#: constraint:ir.ui.view:0
|
||||
@@ -268,7 +291,7 @@ msgstr "Invalido XML para Arquitetura da View"
|
||||
#. module: account_budget
|
||||
#: field:crossovered.budget.lines,theoritical_amount:0
|
||||
msgid "Theoritical Amount"
|
||||
msgstr ""
|
||||
msgstr "Valor Estimado"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:account.budget.post,name:0
|
||||
@@ -280,18 +303,18 @@ msgstr "Nome"
|
||||
#. module: account_budget
|
||||
#: model:ir.actions.wizard,name:account_budget.wizard_crossovered_budget_menu_1
|
||||
msgid "Print Summary of Budgets"
|
||||
msgstr ""
|
||||
msgstr "Imprimir Resumo dos Orçamentos"
|
||||
|
||||
#. module: account_budget
|
||||
#: model:ir.actions.wizard,name:account_budget.wizard_budget_spread
|
||||
msgid "Spread amount"
|
||||
msgstr ""
|
||||
msgstr "Valor Alocado"
|
||||
|
||||
#. module: account_budget
|
||||
#: view:account.analytic.account:0
|
||||
#: view:account.budget.post:0
|
||||
msgid "Lines"
|
||||
msgstr ""
|
||||
msgstr "Linhas"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.budget:0
|
||||
@@ -302,58 +325,58 @@ msgstr ""
|
||||
#: model:ir.model,name:account_budget.model_crossovered_budget
|
||||
#: model:ir.ui.menu,name:account_budget.menu_act_crossovered_budget_view
|
||||
msgid "Budget"
|
||||
msgstr ""
|
||||
msgstr "Orçamento"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:account.budget.post.dotation,post_id:0
|
||||
msgid "Item"
|
||||
msgstr ""
|
||||
msgstr "Item"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:account.budget.post.dotation,amount:0
|
||||
#: wizard_field:account.budget.spread,init,amount:0
|
||||
msgid "Amount"
|
||||
msgstr ""
|
||||
msgstr "Valor"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:crossovered.budget.lines,paid_date:0
|
||||
msgid "Paid Date"
|
||||
msgstr ""
|
||||
msgstr "Data do Pagamento"
|
||||
|
||||
#. module: account_budget
|
||||
#: model:ir.actions.act_window,name:account_budget.action_account_budget_post_tree
|
||||
#: model:ir.ui.menu,name:account_budget.menu_action_account_budget_post_tree
|
||||
#: model:ir.ui.menu,name:account_budget.next_id_31
|
||||
msgid "Budgets"
|
||||
msgstr ""
|
||||
msgstr "Orçamentos"
|
||||
|
||||
#. module: account_budget
|
||||
#: selection:crossovered.budget,state:0
|
||||
msgid "Cancelled"
|
||||
msgstr ""
|
||||
msgstr "Cancelado"
|
||||
|
||||
#. module: account_budget
|
||||
#: view:account.budget.post.dotation:0
|
||||
#: model:ir.model,name:account_budget.model_account_budget_post_dotation
|
||||
msgid "Budget Dotation"
|
||||
msgstr ""
|
||||
msgstr "Dotação Orçamentária"
|
||||
|
||||
#. module: account_budget
|
||||
#: view:account.budget.post.dotation:0
|
||||
msgid "Budget Dotations"
|
||||
msgstr ""
|
||||
msgstr "Dotações Orçamentárias"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.budget:0
|
||||
msgid "Budget Item Detail"
|
||||
msgstr ""
|
||||
msgstr "Detalhe do Item do Orçamento"
|
||||
|
||||
#. module: account_budget
|
||||
#: view:account.budget.post:0
|
||||
#: field:crossovered.budget.lines,general_budget_id:0
|
||||
#: model:ir.model,name:account_budget.model_account_budget_post
|
||||
msgid "Budgetary Position"
|
||||
msgstr ""
|
||||
msgstr "Posição Orçamentária"
|
||||
|
||||
#. module: account_budget
|
||||
#: wizard_field:account.budget.report,init,date1:0
|
||||
@@ -361,7 +384,7 @@ msgstr ""
|
||||
#: wizard_field:wizard.crossovered.budget,init,date_from:0
|
||||
#: wizard_field:wizard.crossovered.budget.summary,init,date_from:0
|
||||
msgid "Start of period"
|
||||
msgstr ""
|
||||
msgstr "Início do período"
|
||||
|
||||
#. module: account_budget
|
||||
#: model:ir.actions.report.xml,name:account_budget.account_analytic_account_budget
|
||||
@@ -369,49 +392,49 @@ msgstr ""
|
||||
#: model:ir.actions.wizard,name:account_budget.account_analytic_account_budget_report
|
||||
#: model:ir.actions.wizard,name:account_budget.wizard_crossovered_budget_menu
|
||||
msgid "Print Budgets"
|
||||
msgstr ""
|
||||
msgstr "Imprimir Orçamentos"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:account.budget.post,code:0
|
||||
#: field:crossovered.budget,code:0
|
||||
msgid "Code"
|
||||
msgstr ""
|
||||
msgstr "Código"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:account.budget.post.dotation,tot_planned:0
|
||||
msgid "Total Planned Amount"
|
||||
msgstr ""
|
||||
msgstr "Valor Total Planejado"
|
||||
|
||||
#. module: account_budget
|
||||
#: wizard_view:wizard.analytic.account.budget.report,init:0
|
||||
msgid "Select Dates Period"
|
||||
msgstr ""
|
||||
msgstr "Selecione as Datas do Período"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:account.budget.post,dotation_ids:0
|
||||
msgid "Spreading"
|
||||
msgstr ""
|
||||
msgstr "Alocação"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.analytic.account.budget:0
|
||||
#: rml:crossovered.budget.report:0
|
||||
msgid "Theoretical Amount"
|
||||
msgstr ""
|
||||
msgstr "Valor Planejado"
|
||||
|
||||
#. module: account_budget
|
||||
#: wizard_field:account.budget.spread,init,fiscalyear:0
|
||||
msgid "Fiscal Year"
|
||||
msgstr ""
|
||||
msgstr "Ano Fiscal"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:crossovered.budget.lines,analytic_account_id:0
|
||||
msgid "Analytic Account"
|
||||
msgstr ""
|
||||
msgstr "Conta Analítica"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:crossovered.budget.report:0
|
||||
msgid "Budget :"
|
||||
msgstr ""
|
||||
msgstr "Orçamento:"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.budget:0
|
||||
@@ -419,18 +442,18 @@ msgstr ""
|
||||
#: wizard_view:account.budget.spread,init:0
|
||||
#: wizard_button:account.budget.spread,init,spread:0
|
||||
msgid "Spread"
|
||||
msgstr ""
|
||||
msgstr "Alocação"
|
||||
|
||||
#. module: account_budget
|
||||
#: view:account.budget.post:0
|
||||
#: field:account.budget.post,account_ids:0
|
||||
msgid "Accounts"
|
||||
msgstr ""
|
||||
msgstr "Contas"
|
||||
|
||||
#. module: account_budget
|
||||
#: model:ir.actions.report.xml,name:account_budget.account_budget
|
||||
msgid "Print Budget"
|
||||
msgstr ""
|
||||
msgstr "Imprimir Orçamento"
|
||||
|
||||
#. module: account_budget
|
||||
#: view:account.analytic.account:0
|
||||
@@ -445,7 +468,7 @@ msgstr ""
|
||||
#: model:ir.model,name:account_budget.model_crossovered_budget_lines
|
||||
#: model:ir.ui.menu,name:account_budget.menu_act_crossovered_budget_lines_view
|
||||
msgid "Budget Lines"
|
||||
msgstr ""
|
||||
msgstr "Linhas do Orçamento"
|
||||
|
||||
#. module: account_budget
|
||||
#: wizard_button:account.budget.report,init,end:0
|
||||
@@ -455,31 +478,31 @@ msgstr ""
|
||||
#: wizard_button:wizard.crossovered.budget,init,end:0
|
||||
#: wizard_button:wizard.crossovered.budget.summary,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
msgstr "Cancelar"
|
||||
|
||||
#. module: account_budget
|
||||
#: model:ir.module.module,shortdesc:account_budget.module_meta_information
|
||||
msgid "Budget Management"
|
||||
msgstr ""
|
||||
msgstr "Administração do Orçamento"
|
||||
|
||||
#. module: account_budget
|
||||
#: field:crossovered.budget,date_from:0
|
||||
#: field:crossovered.budget.lines,date_from:0
|
||||
msgid "Start Date"
|
||||
msgstr ""
|
||||
msgstr "Data de Início"
|
||||
|
||||
#. module: account_budget
|
||||
#: rml:account.analytic.account.budget:0
|
||||
#: rml:crossovered.budget.report:0
|
||||
msgid "Analysis from"
|
||||
msgstr ""
|
||||
msgstr "Análise de"
|
||||
|
||||
#. module: account_budget
|
||||
#: selection:crossovered.budget,state:0
|
||||
msgid "Validated"
|
||||
msgstr ""
|
||||
msgstr "Validado"
|
||||
|
||||
#. module: account_budget
|
||||
#: wizard_view:account.budget.report,init:0
|
||||
msgid "Select period"
|
||||
msgstr ""
|
||||
msgstr "Selecione período"
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
##############################################################################
|
||||
|
||||
import account_coda_import
|
||||
import coda_import
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -0,0 +1,347 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 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 pooler
|
||||
import time
|
||||
import datetime
|
||||
import wizard
|
||||
import netsvc
|
||||
import base64
|
||||
from osv import osv
|
||||
from tools.translate import _
|
||||
|
||||
codawiz_form = """<?xml version="1.0"?>
|
||||
<form string="Import Coda Statement">
|
||||
<separator colspan="4" string="Select your bank journal :" />
|
||||
<field name="journal_id" colspan="1" domain="[('type','=','cash')]" />
|
||||
<newline />
|
||||
<field name="def_payable" /> <field name="def_receivable" />
|
||||
<newline />
|
||||
<field name="awaiting_account" />
|
||||
<separator string="Clic on 'New' to select your file :" colspan="4"/>
|
||||
<field name="coda"/>
|
||||
</form>
|
||||
"""
|
||||
|
||||
codawiz_fields = {
|
||||
'journal_id' : {
|
||||
'string':'Bank Journal',
|
||||
'type':'many2one',
|
||||
'relation':'account.journal',
|
||||
'required':True,
|
||||
|
||||
},
|
||||
'coda' : {
|
||||
'string':'Coda File',
|
||||
'type':'binary',
|
||||
'required':True,
|
||||
},
|
||||
'def_payable' : {
|
||||
'string' : 'Default Payable Account',
|
||||
'type' : 'many2one',
|
||||
'relation': 'account.account',
|
||||
'required':True,
|
||||
'domain':[('type','=','payable')],
|
||||
'help': 'Set here the payable account that will be used, by default, if the partner is not found',
|
||||
},
|
||||
'def_receivable' : {
|
||||
'string' : 'Default receivable Account',
|
||||
'type' : 'many2one',
|
||||
'relation': 'account.account',
|
||||
'required':True,
|
||||
'domain':[('type','=','receivable')],
|
||||
'help': 'Set here the receivable account that will be used, by default, if the partner is not found',
|
||||
},
|
||||
'awaiting_account' : {
|
||||
'string' : 'Default Account for Unrecognized Movement',
|
||||
'type' : 'many2one',
|
||||
'relation': 'account.account',
|
||||
'required':True,
|
||||
'help': 'Set here the default account that will be used, if the partner is found but does not have the bank account , or if he is domiciled',
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
result_form = """<?xml version="1.0"?>
|
||||
<form string="Import Coda Statement">
|
||||
<separator colspan="4" string="Results :" />
|
||||
<field name="note" colspan="4" nolabel="1" width="500"/>
|
||||
</form>
|
||||
"""
|
||||
|
||||
result_fields = {
|
||||
|
||||
'note' : {'string':'Log','type':'text'}
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _coda_parsing(self, cr, uid, data, context):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
codafile = data['form']['coda']
|
||||
journal_code = pool.get('account.journal').browse(cr, uid, data['form']['journal_id'], context).code
|
||||
def_pay_acc = data['form']['def_payable']
|
||||
def_rec_acc = data['form']['def_receivable']
|
||||
|
||||
str_log = ""
|
||||
err_log = "Errors:\n------\n"
|
||||
nb_err=0
|
||||
std_log=''
|
||||
str_log1 = "Coda File is Imported : "
|
||||
str_not=''
|
||||
str_not1=''
|
||||
|
||||
bank_statements=[]
|
||||
recordlist = base64.decodestring(codafile).split('\n')
|
||||
recordlist.pop()
|
||||
for line in recordlist:
|
||||
if line[0] == '0':
|
||||
# header data
|
||||
bank_statement = {}
|
||||
bank_statement["bank_statement_line"]={}
|
||||
bank_statement_lines = {}
|
||||
bank_statement['date'] = str2date(line[5:11])
|
||||
bank_statement['journal_id']=data['form']['journal_id']
|
||||
period_id = pool.get('account.period').search(cr,uid,[('date_start','<=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d"))),('date_stop','>=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d")))])
|
||||
bank_statement['period_id'] = period_id[0]
|
||||
bank_statement['state']='draft'
|
||||
elif line[0] == '1':
|
||||
# old balance data
|
||||
bal_start = list2float(line[43:58])
|
||||
if line[42] == '1':
|
||||
bal_start = - bal_start
|
||||
bank_statement["balance_start"]= bal_start
|
||||
bank_statement["acc_number"]=line[5:17]
|
||||
bank_statement["acc_holder"]=line[64:90]
|
||||
bank_statement['name'] = journal_code + ' ' + str(line[2:5])
|
||||
|
||||
elif line[0]=='2':
|
||||
# movement data record 2
|
||||
if line[1]=='1':
|
||||
# movement data record 2.1
|
||||
if bank_statement_lines.has_key(line[2:6]):
|
||||
continue
|
||||
st_line = {}
|
||||
st_line['extra_note'] = ''
|
||||
st_line['statement_id']=0
|
||||
st_line['ref'] = line[2:10]
|
||||
st_line['date'] = time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")),
|
||||
st_line_amt = list2float(line[32:47])
|
||||
if line[61]=='1':
|
||||
st_line['toreconcile'] = True
|
||||
st_line['name']=line[65:77]
|
||||
else:
|
||||
st_line['toreconcile'] = False
|
||||
st_line['name']=line[62:115]
|
||||
|
||||
st_line['free_comm'] = st_line['name']
|
||||
st_line['val_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[47:53]),"%y/%m/%d")),
|
||||
st_line['entry_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")),
|
||||
st_line['partner_id']=0
|
||||
if line[31] == '1':
|
||||
st_line_amt = - st_line_amt
|
||||
st_line['account_id'] = def_pay_acc
|
||||
else:
|
||||
st_line['account_id'] = def_rec_acc
|
||||
st_line['amount'] = st_line_amt
|
||||
bank_statement_lines[line[2:6]]=st_line
|
||||
bank_statement["bank_statement_line"]=bank_statement_lines
|
||||
elif line[1] == '2':
|
||||
st_line_name = line[2:6]
|
||||
bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']})
|
||||
|
||||
elif line[1] == '3':
|
||||
# movement data record 3.1
|
||||
st_line_name = line[2:6]
|
||||
st_line_partner_acc = str(line[10:47]).strip()
|
||||
cntry_number=line[10:47].strip()
|
||||
contry_name=line[47:125].strip()
|
||||
bank_ids = pool.get('res.partner.bank').search(cr,uid,[('acc_number','=',st_line_partner_acc)])
|
||||
bank_statement_lines[st_line_name].update({'cntry_number': cntry_number, 'contry_name': contry_name})
|
||||
if bank_ids:
|
||||
bank = pool.get('res.partner.bank').browse(cr,uid,bank_ids[0],context)
|
||||
if line and bank.partner_id:
|
||||
bank_statement_lines[st_line_name].update({'partner_id': bank.partner_id.id})
|
||||
if bank_statement_lines[st_line_name]['amount'] < 0 :
|
||||
bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_payable.id})
|
||||
else :
|
||||
bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_receivable.id})
|
||||
else:
|
||||
nb_err += 1
|
||||
err_log += _('The bank account %s is not defined for the partner %s.\n')%(cntry_number,contry_name)
|
||||
bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']})
|
||||
|
||||
bank_statement["bank_statement_line"]=bank_statement_lines
|
||||
elif line[0]=='3':
|
||||
if line[1] == '1':
|
||||
st_line_name = line[2:6]
|
||||
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[40:113]
|
||||
elif line[1] == '2':
|
||||
st_line_name = line[2:6]
|
||||
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:115]
|
||||
elif line[1] == '3':
|
||||
st_line_name = line[2:6]
|
||||
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:100]
|
||||
elif line[0]=='8':
|
||||
# new balance record
|
||||
bal_end = list2float(line[42:57])
|
||||
if line[41] == '1':
|
||||
bal_end = - bal_end
|
||||
bank_statement["balance_end_real"]= bal_end
|
||||
|
||||
elif line[0]=='9':
|
||||
# footer record
|
||||
bank_statements.append(bank_statement)
|
||||
#end for
|
||||
bkst_list=[]
|
||||
for statement in bank_statements:
|
||||
try:
|
||||
bk_st_id = pool.get('account.bank.statement').create(cr,uid,{
|
||||
'journal_id': statement['journal_id'],
|
||||
'date':time.strftime('%Y-%m-%d',time.strptime(statement['date'],"%y/%m/%d")),
|
||||
'period_id':statement['period_id'],
|
||||
'balance_start': statement["balance_start"],
|
||||
'balance_end_real': statement["balance_end_real"],
|
||||
'state': 'draft',
|
||||
'name': statement['name'],
|
||||
})
|
||||
lines=statement["bank_statement_line"]
|
||||
for value in lines:
|
||||
line=lines[value]
|
||||
reconcile_id = False
|
||||
if line['toreconcile']:
|
||||
name = line['name'][:3] + '/' + line['name'][3:7] + '/' + line['name'][7:]
|
||||
rec_id = pool.get('account.move.line').search(cr, uid, [('name','=', name),('reconcile_id','=',False),('account_id.reconcile','=',True)])
|
||||
if rec_id:
|
||||
reconcile_id = pool.get('account.bank.statement.reconcile').create(cr, uid, {
|
||||
'line_ids': [(6, 0, rec_id)]
|
||||
}, context=context)
|
||||
mv = pool.get('account.move.line').browse(cr, uid, rec_id[0], context=context)
|
||||
if mv.partner_id:
|
||||
line['partner_id'] = mv.partner_id.id
|
||||
if line['amount'] < 0 :
|
||||
line['account_id'] = mv.partner_id.property_account_payable.id
|
||||
else :
|
||||
line['account_id'] = mv.partner_id.property_account_receivable.id
|
||||
str_not1 = ''
|
||||
if line.has_key('contry_name') and line.has_key('cntry_number'):
|
||||
str_not1="Partner name:%s \n Partner Account Number:%s \n Communication:%s \n Value Date:%s \n Entry Date:%s \n"%(line["contry_name"],line["cntry_number"],line["free_comm"]+line['extra_note'],line["val_date"][0],line["entry_date"][0])
|
||||
id=pool.get('account.bank.statement.line').create(cr,uid,{
|
||||
'name':line['name'],
|
||||
'date': line['date'],
|
||||
'type':line['amount']>0 and 'customer' or 'supplier',
|
||||
'amount': line['amount'],
|
||||
'partner_id':line['partner_id'] or 0,
|
||||
'account_id':line['account_id'],
|
||||
'statement_id': bk_st_id,
|
||||
'reconcile_id': reconcile_id,
|
||||
'note':str_not1,
|
||||
'ref':line['ref'],
|
||||
})
|
||||
|
||||
str_not= "\n \n Account Number: %s \n Account Holder Name: %s " %(statement["acc_number"],statement["acc_holder"])
|
||||
std_log += "\nStatement : %s , Date : %s, Starting Balance : %.2f , Ending Balance : %.2f \n"\
|
||||
%(statement['name'], statement['date'], float(statement["balance_start"]), float(statement["balance_end_real"]))
|
||||
bkst_list.append(bk_st_id)
|
||||
|
||||
except osv.except_osv, e:
|
||||
cr.rollback()
|
||||
nb_err+=1
|
||||
err_log += '\n Application Error : ' + str(e)
|
||||
raise # REMOVEME
|
||||
|
||||
except Exception, e:
|
||||
cr.rollback()
|
||||
nb_err+=1
|
||||
err_log += '\n System Error : '+str(e)
|
||||
raise # REMOVEME
|
||||
except :
|
||||
cr.rollback()
|
||||
nb_err+=1
|
||||
err_log += '\n Unknown Error'
|
||||
raise
|
||||
err_log += '\n\nNumber of statements : '+ str(len(bkst_list))
|
||||
err_log += '\nNumber of error :'+ str(nb_err) +'\n'
|
||||
|
||||
pool.get('account.coda').create(cr, uid,{
|
||||
'name':codafile,
|
||||
'statement_ids': [(6, 0, bkst_list,)],
|
||||
'note':str_log1+str_not+std_log+err_log,
|
||||
'journal_id':data['form']['journal_id'],
|
||||
'date':time.strftime("%Y-%m-%d"),
|
||||
'user_id':uid,
|
||||
})
|
||||
|
||||
return {'note':str_log1 + std_log + err_log ,'journal_id': data['form']['journal_id'], 'coda': data['form']['coda'],'statment_ids':bkst_list}
|
||||
|
||||
|
||||
def str2date(date_str):
|
||||
return time.strftime("%y/%m/%d",time.strptime(date_str,"%d%m%y"))
|
||||
|
||||
def str2float(str):
|
||||
try:
|
||||
return float(str)
|
||||
except:
|
||||
return 0.0
|
||||
|
||||
def list2float(lst):
|
||||
try:
|
||||
return str2float((lambda s : s[:-3] + '.' + s[-3:])(lst))
|
||||
except:
|
||||
return 0.0
|
||||
|
||||
class coda_import(wizard.interface):
|
||||
def _action_open_window(self, cr, uid, data, context):
|
||||
form=data['form']
|
||||
return {
|
||||
'domain':"[('id','in',%s)]"%(form['statment_ids']),
|
||||
'name': 'Statement',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'account.bank.statement',
|
||||
'view_id': False,
|
||||
'type': 'ir.actions.act_window',
|
||||
}
|
||||
states = {
|
||||
'init' : {
|
||||
'actions' : [],
|
||||
'result' : {'type' : 'form',
|
||||
'arch' : codawiz_form,
|
||||
'fields' : codawiz_fields,
|
||||
'state' : [('end', '_Close'),('extraction', '_Ok') ]}
|
||||
},
|
||||
'extraction' : {
|
||||
'actions' : [_coda_parsing],
|
||||
'result' : {'type' : 'form',
|
||||
'arch' : result_form,
|
||||
'fields' : result_fields,
|
||||
'state' : [('end', '_Close'),('open', '_Open Statement')]}
|
||||
},
|
||||
'open': {
|
||||
'actions': [],
|
||||
'result': {'type': 'action', 'action': _action_open_window, 'state': 'end'}
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
coda_import("account.coda_import")
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -88,7 +88,7 @@ class payment_order_create(osv.osv_memory):
|
||||
'date': date_to_pay,
|
||||
'currency': line.invoice and line.invoice.currency_id.id or False,
|
||||
}, context=context)
|
||||
return {'nodestroy':True,}
|
||||
return {}
|
||||
|
||||
def search_entries(self, cr, uid, ids, context=None):
|
||||
order_obj = self.pool.get('payment.order')
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="inherit_id" ref="account.board_account_form"/>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/vpaned/child1" position="inside">
|
||||
<xpath expr="/form/hpaned/child2/action[@string='Aged receivables']" position="before">
|
||||
<button colspan="4" icon="terp-purchase" name="%(account_report.action_account_report_tree_view_indicator)d" string="My indicators" type="action"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
import time
|
||||
from osv import fields
|
||||
from osv import osv
|
||||
from tools.translate import _
|
||||
|
||||
journal2type = {
|
||||
'cash':'rec_voucher',
|
||||
@@ -367,7 +368,7 @@ class account_voucher(osv.osv):
|
||||
'move_ids':[(6, 0,line_ids)]
|
||||
}
|
||||
|
||||
message = _('Voucher ') + " '" + inv.name + "' "+ _("is confirm")
|
||||
message = _('Voucher ') + " '" + inv.name + "' "+ _("is confirmed")
|
||||
self.log(cr, uid, inv.id, message)
|
||||
|
||||
self.write(cr, uid, [inv.id], rec)
|
||||
|
||||
@@ -139,12 +139,24 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_cash_statement_graph" model="ir.ui.view">
|
||||
<field name="name">account.voucher.graph</field>
|
||||
<field name="model">account.voucher</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Voucher Statistics" type="bar">
|
||||
<field name="date"/>
|
||||
<field name="amount" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Receipt Vouchers -->
|
||||
<record model="ir.actions.act_window" id="action_receipt_vou_voucher_list">
|
||||
<field name="name">Receivable Vouchers</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('journal_id.type','=','sale')]</field>
|
||||
<field name="context">{'type':'sale'}</field>
|
||||
@@ -158,7 +170,7 @@
|
||||
<field name="name">Payable Vouchers</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('journal_id.type','=','purchase')]</field>
|
||||
<field name="context">{'type':'purchase'}</field>
|
||||
@@ -172,7 +184,7 @@
|
||||
<field name="name">Journal Vouchers</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="context">{'type':'general'}</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="search_view_id" ref="view_voucher_filter"/>
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
# Estonian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2010-06-18 10:59+0000\n"
|
||||
"PO-Revision-Date: 2010-07-22 20:10+0000\n"
|
||||
"Last-Translator: lyyser <logard.1961@gmail.com>\n"
|
||||
"Language-Team: Estonian <et@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-07-23 04:08+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,child_ids:0
|
||||
msgid "Child Accounts"
|
||||
msgstr "Alamkontod"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,amount_currency:0
|
||||
msgid ""
|
||||
"The amount expressed in the related account currency if not equal to the "
|
||||
"company one."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
"Objekti nimi peab algama x_'ga ja ei tohi sisaldada ühtegi erisümbolit !"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,name:0
|
||||
msgid "Account Name"
|
||||
msgstr "Konto nimi"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,unit_amount:0
|
||||
msgid "Specifies the amount of quantity to count."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,currency_id:0
|
||||
msgid "The related account currency if not equal to the company one."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: model:ir.module.module,description:analytic.module_meta_information
|
||||
msgid ""
|
||||
"Module for defining analytic accounting object.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,state:0
|
||||
msgid "State"
|
||||
msgstr "Riik/Osariik"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,user_id:0
|
||||
msgid "Account Manager"
|
||||
msgstr "Konto haldur"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Draft"
|
||||
msgstr "Mustand"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Closed"
|
||||
msgstr "Suletud"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,debit:0
|
||||
msgid "Debit"
|
||||
msgstr "Deebet"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.account,state:0
|
||||
msgid ""
|
||||
"* When an account is created its in 'Draft' state. "
|
||||
" \n"
|
||||
"* If any associated partner is there, it can be in 'Open' state. "
|
||||
" \n"
|
||||
"* If any pending balance is there it can be in 'Pending'. "
|
||||
" \n"
|
||||
"* And finally when all the transactions are over, it can be in 'Close' "
|
||||
"state. \n"
|
||||
"* The project can be in either if the states 'Template' and 'Running'.\n"
|
||||
" If it is template then we can make projects based on the template projects. "
|
||||
"If its in 'Running' state it is a normal project. "
|
||||
" \n"
|
||||
" If it is to be reviewed then the state is 'Pending'.\n"
|
||||
" When the project is completed the state is set to 'Done'."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,type:0
|
||||
msgid "Account Type"
|
||||
msgstr "Konto tüüp"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Template"
|
||||
msgstr "Mall"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Pending"
|
||||
msgstr "Ootel"
|
||||
|
||||
#. module: analytic
|
||||
#: model:ir.model,name:analytic.model_account_analytic_line
|
||||
msgid "Analytic Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,description:0
|
||||
#: field:account.analytic.line,name:0
|
||||
msgid "Description"
|
||||
msgstr "Kirjeldus"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,amount:0
|
||||
msgid ""
|
||||
"Calculated by multiplying the quantity and the price given in the Product's "
|
||||
"cost price."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,company_id:0
|
||||
#: field:account.analytic.line,company_id:0
|
||||
msgid "Company"
|
||||
msgstr "Ettevõte"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,quantity_max:0
|
||||
msgid "Maximum Quantity"
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,user_id:0
|
||||
msgid "User"
|
||||
msgstr "Kasutaja"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,parent_id:0
|
||||
msgid "Parent Analytic Account"
|
||||
msgstr "Ülem analüütiline konto"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,date:0
|
||||
msgid "Date"
|
||||
msgstr "Kuupäev"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,currency_id:0
|
||||
#: field:account.analytic.line,currency_id:0
|
||||
msgid "Account currency"
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,type:0
|
||||
msgid "View"
|
||||
msgstr "Vaade"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.account,quantity_max:0
|
||||
msgid "Sets the higher limit of quantity of hours."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,credit:0
|
||||
msgid "Credit"
|
||||
msgstr "Krediit"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,amount:0
|
||||
msgid "Amount"
|
||||
msgstr "Kogus"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,contact_id:0
|
||||
msgid "Contact"
|
||||
msgstr "Kontakt"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Cancelled"
|
||||
msgstr "Katkestatud"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,balance:0
|
||||
msgid "Balance"
|
||||
msgstr "Balanss"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,date_start:0
|
||||
msgid "Date Start"
|
||||
msgstr "Alguskuupäev"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,quantity:0
|
||||
#: field:account.analytic.line,unit_amount:0
|
||||
msgid "Quantity"
|
||||
msgstr "Kvantiteet"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,date:0
|
||||
msgid "Date End"
|
||||
msgstr "Lõppkuupäev"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,code:0
|
||||
msgid "Account Code"
|
||||
msgstr "Konto kood"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,type:0
|
||||
msgid "Normal"
|
||||
msgstr "Normaalne"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,complete_name:0
|
||||
msgid "Full Account Name"
|
||||
msgstr "Täielik konto nimi"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,account_id:0
|
||||
#: model:ir.model,name:analytic.model_account_analytic_account
|
||||
#: model:ir.module.module,shortdesc:analytic.module_meta_information
|
||||
msgid "Analytic Account"
|
||||
msgstr "Analüütiline konto"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,company_currency_id:0
|
||||
msgid "Currency"
|
||||
msgstr "Rahaühik"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,amount_currency:0
|
||||
msgid "Amount currency"
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,partner_id:0
|
||||
msgid "Associated Partner"
|
||||
msgstr "Seotud partner"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Open"
|
||||
msgstr "Ava"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,line_ids:0
|
||||
msgid "Analytic Entries"
|
||||
msgstr "Analüütilised kirjed"
|
||||
@@ -0,0 +1,270 @@
|
||||
# Polish translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2010-06-18 10:59+0000\n"
|
||||
"PO-Revision-Date: 2010-07-26 10:16+0000\n"
|
||||
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\n"
|
||||
"Language-Team: Polish <pl@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-07-27 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,child_ids:0
|
||||
msgid "Child Accounts"
|
||||
msgstr "Konta podrzędne"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,amount_currency:0
|
||||
msgid ""
|
||||
"The amount expressed in the related account currency if not equal to the "
|
||||
"company one."
|
||||
msgstr ""
|
||||
"Kwota wyrażona w walucie konta, jeśli waluta jest inna niż waluta firmy."
|
||||
|
||||
#. module: analytic
|
||||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
"Nazwa obiektu musi zaczynać się od x_ oraz nie może zawierać znaków "
|
||||
"specjalnych !"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,name:0
|
||||
msgid "Account Name"
|
||||
msgstr "Nazwa konta"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,unit_amount:0
|
||||
msgid "Specifies the amount of quantity to count."
|
||||
msgstr "Określa ilość do obliczeń."
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,currency_id:0
|
||||
msgid "The related account currency if not equal to the company one."
|
||||
msgstr "Waluta konta, jeśli waluta jest inna niż firmy."
|
||||
|
||||
#. module: analytic
|
||||
#: model:ir.module.module,description:analytic.module_meta_information
|
||||
msgid ""
|
||||
"Module for defining analytic accounting object.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"Moduł do definiowania obiektów księgowości analitycznej.\n"
|
||||
" "
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,state:0
|
||||
msgid "State"
|
||||
msgstr "Stan"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,user_id:0
|
||||
msgid "Account Manager"
|
||||
msgstr "Główna(y) księgowa(y)"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Draft"
|
||||
msgstr "Projekt"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Closed"
|
||||
msgstr "Zamknięte"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,debit:0
|
||||
msgid "Debit"
|
||||
msgstr "Winien"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.account,state:0
|
||||
msgid ""
|
||||
"* When an account is created its in 'Draft' state. "
|
||||
" \n"
|
||||
"* If any associated partner is there, it can be in 'Open' state. "
|
||||
" \n"
|
||||
"* If any pending balance is there it can be in 'Pending'. "
|
||||
" \n"
|
||||
"* And finally when all the transactions are over, it can be in 'Close' "
|
||||
"state. \n"
|
||||
"* The project can be in either if the states 'Template' and 'Running'.\n"
|
||||
" If it is template then we can make projects based on the template projects. "
|
||||
"If its in 'Running' state it is a normal project. "
|
||||
" \n"
|
||||
" If it is to be reviewed then the state is 'Pending'.\n"
|
||||
" When the project is completed the state is set to 'Done'."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,type:0
|
||||
msgid "Account Type"
|
||||
msgstr "Typ Konta"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Template"
|
||||
msgstr "Szablon"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Pending"
|
||||
msgstr "Oczekujące"
|
||||
|
||||
#. module: analytic
|
||||
#: model:ir.model,name:analytic.model_account_analytic_line
|
||||
msgid "Analytic Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,description:0
|
||||
#: field:account.analytic.line,name:0
|
||||
msgid "Description"
|
||||
msgstr "Opis"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.line,amount:0
|
||||
msgid ""
|
||||
"Calculated by multiplying the quantity and the price given in the Product's "
|
||||
"cost price."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,company_id:0
|
||||
#: field:account.analytic.line,company_id:0
|
||||
msgid "Company"
|
||||
msgstr "Firma"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,quantity_max:0
|
||||
msgid "Maximum Quantity"
|
||||
msgstr "Ilość maksymalna"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,user_id:0
|
||||
msgid "User"
|
||||
msgstr "Użytkownik"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,parent_id:0
|
||||
msgid "Parent Analytic Account"
|
||||
msgstr "Nadrzędne konto analityczne"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,date:0
|
||||
msgid "Date"
|
||||
msgstr "Data"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,currency_id:0
|
||||
#: field:account.analytic.line,currency_id:0
|
||||
msgid "Account currency"
|
||||
msgstr "Waluta konta"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,type:0
|
||||
msgid "View"
|
||||
msgstr "Widok"
|
||||
|
||||
#. module: analytic
|
||||
#: help:account.analytic.account,quantity_max:0
|
||||
msgid "Sets the higher limit of quantity of hours."
|
||||
msgstr ""
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,credit:0
|
||||
msgid "Credit"
|
||||
msgstr "Ma"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,amount:0
|
||||
msgid "Amount"
|
||||
msgstr "Kwota"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,contact_id:0
|
||||
msgid "Contact"
|
||||
msgstr "Kontakt"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Cancelled"
|
||||
msgstr "Anulowano"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,balance:0
|
||||
msgid "Balance"
|
||||
msgstr "Saldo"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,date_start:0
|
||||
msgid "Date Start"
|
||||
msgstr "Data rozpoczęcia"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,quantity:0
|
||||
#: field:account.analytic.line,unit_amount:0
|
||||
msgid "Quantity"
|
||||
msgstr "Ilość"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,date:0
|
||||
msgid "Date End"
|
||||
msgstr "Data końcowa"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,code:0
|
||||
msgid "Account Code"
|
||||
msgstr "Kod konta"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,type:0
|
||||
msgid "Normal"
|
||||
msgstr "Normalne"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,complete_name:0
|
||||
msgid "Full Account Name"
|
||||
msgstr "Pełna nazwa konta"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,account_id:0
|
||||
#: model:ir.model,name:analytic.model_account_analytic_account
|
||||
#: model:ir.module.module,shortdesc:analytic.module_meta_information
|
||||
msgid "Analytic Account"
|
||||
msgstr "Konto analityczne"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,company_currency_id:0
|
||||
msgid "Currency"
|
||||
msgstr "Waluta"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.line,amount_currency:0
|
||||
msgid "Amount currency"
|
||||
msgstr "Waluta kwoty"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,partner_id:0
|
||||
msgid "Associated Partner"
|
||||
msgstr "Przypisany partner"
|
||||
|
||||
#. module: analytic
|
||||
#: selection:account.analytic.account,state:0
|
||||
msgid "Open"
|
||||
msgstr "Otwarte"
|
||||
|
||||
#. module: analytic
|
||||
#: field:account.analytic.account,line_ids:0
|
||||
msgid "Analytic Entries"
|
||||
msgstr "Zapisy analityczne"
|
||||
@@ -1540,7 +1540,7 @@ Object encoded
|
||||
<field name="model">report.unclassified.objects</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state in ('draft','unsold');black:state in ('sold');gray:state in ('paid')"string="Unclassified objects">
|
||||
<tree colors="blue:state in ('draft','unsold');black:state in ('sold');gray:state in ('paid')" string="Unclassified objects">
|
||||
<field name="obj_num" string="Ref" select="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="ach_login"/>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<field name="usage">menu</field>
|
||||
<field name="view_id" ref="board_auction_manager_form"/>
|
||||
</record>
|
||||
<menuitem icon="terp-graph" name="Dashboard" id="menu_board_auction" parent="auction_report_menu" sequence="0"/>
|
||||
<menuitem name="Dashboard" id="menu_board_auction" parent="auction_report_menu" sequence="0"/>
|
||||
<menuitem
|
||||
name="Auction Member"
|
||||
action="open_board_auction"
|
||||
|
||||
@@ -60,7 +60,8 @@ class base_action_rule(osv.osv):
|
||||
return [('', '')]
|
||||
|
||||
_columns = {
|
||||
'name': fields.many2one('ir.model', 'Object', required=True),
|
||||
'name': fields.char('Rule Name', size=64, required=True),
|
||||
'model_id': fields.many2one('ir.model', 'Object', required=True),
|
||||
'create_date': fields.datetime('Create Date', readonly=1),
|
||||
'active': fields.boolean('Active', help="If the active field is set to False,\
|
||||
it will allow you to hide the rule without removing it."),
|
||||
@@ -125,6 +126,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
||||
_order = 'sequence'
|
||||
|
||||
def onchange_model_id(self, cr, uid, ids, name):
|
||||
#This is not a good solution as it will affect the domain only on onchange
|
||||
res = {'domain':{'filter_id':[]}}
|
||||
if name:
|
||||
model_name = self.pool.get('ir.model').read(cr, uid, [name], ['model'])
|
||||
@@ -138,7 +140,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
||||
def pre_action(self, cr, uid, ids, model, context=None):
|
||||
# Searching for action rules
|
||||
cr.execute("SELECT model.model, rule.id FROM base_action_rule rule \
|
||||
LEFT JOIN ir_model model on (model.id = rule.name) \
|
||||
LEFT JOIN ir_model model on (model.id = rule.model_id) \
|
||||
where active")
|
||||
res = cr.fetchall()
|
||||
# Check if any rule matching with current object
|
||||
@@ -175,7 +177,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
||||
if not context:
|
||||
context = {}
|
||||
for action_rule in self.browse(cr, uid, ids, context=context):
|
||||
model = action_rule.name.model
|
||||
model = action_rule.model_id.model
|
||||
obj_pool = self.pool.get(model)
|
||||
obj_pool.__setattr__('create', self._create(obj_pool.create, model, context=context))
|
||||
obj_pool.__setattr__('write', self._write(obj_pool.write, model, context=context))
|
||||
@@ -257,7 +259,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
||||
@param context: A standard dictionary for contextual values """
|
||||
ok = True
|
||||
if action.filter_id:
|
||||
if action.name.model == action.filter_id.model_id:
|
||||
if action.model_id.model == action.filter_id.model_id:
|
||||
context.update(eval(action.filter_id.context))
|
||||
obj_ids = obj._table.search(cr, uid, eval(action.filter_id.domain), context=context)
|
||||
if not obj.id in obj_ids:
|
||||
@@ -355,24 +357,24 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
||||
if not scrit:
|
||||
scrit = []
|
||||
for action in self.browse(cr, uid, ids):
|
||||
model_obj = self.pool.get(action.name.model)
|
||||
model_obj = self.pool.get(action.model_id.model)
|
||||
for obj in objects:
|
||||
ok = self.do_check(cr, uid, action, obj, context=context)
|
||||
if not ok:
|
||||
continue
|
||||
|
||||
base = False
|
||||
if hasattr(obj, 'create_date') and action.trg_date_type=='create':
|
||||
if action.trg_date_type=='create' and hasattr(obj, 'create_date'):
|
||||
base = datetime.strptime(obj.create_date[:19], '%Y-%m-%d %H:%M:%S')
|
||||
elif hasattr(obj, 'create_date') and action.trg_date_type=='action_last':
|
||||
elif action.trg_date_type=='action_last' and hasattr(obj, 'create_date'):
|
||||
if hasattr(obj, 'date_action_last') and obj.date_action_last:
|
||||
base = datetime.strptime(obj.date_action_last, '%Y-%m-%d %H:%M:%S')
|
||||
else:
|
||||
base = datetime.strptime(obj.create_date[:19], '%Y-%m-%d %H:%M:%S')
|
||||
elif hasattr(obj, 'date_deadline') and action.trg_date_type=='deadline' \
|
||||
elif action.trg_date_type=='deadline' and hasattr(obj, 'date_deadline') \
|
||||
and obj.date_deadline:
|
||||
base = datetime.strptime(obj.date_deadline, '%Y-%m-%d %H:%M:%S')
|
||||
elif hasattr(obj, 'date') and action.trg_date_type=='date' and obj.date:
|
||||
elif action.trg_date_type=='date' and hasattr(obj, 'date') and obj.date:
|
||||
base = datetime.strptime(obj.date, '%Y-%m-%d %H:%M:%S')
|
||||
if base:
|
||||
fnct = {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record id="ir_cron_crm_action" model="ir.cron">
|
||||
|
||||
<record id="ir_cron_crm_action" model="ir.cron">
|
||||
<field name="name">Check Action Rules</field>
|
||||
<field name="interval_number">4</field>
|
||||
<field name="interval_type">hours</field>
|
||||
@@ -10,10 +11,7 @@
|
||||
<field eval="'base.action.rule'" name="model"/>
|
||||
<field eval="'_check'" name="function"/>
|
||||
<field eval="'()'" name="args"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Action Rule">
|
||||
<field name="name" select="1" on_change="onchange_model_id(name)"/>
|
||||
<field name="active"/>
|
||||
<field name="name"/>
|
||||
<field name="model_id" select="1" on_change="onchange_model_id(model_id)"/>
|
||||
<field name="filter_id" />
|
||||
<field name="sequence"/>
|
||||
<field name="filter_id"/>
|
||||
<field name="active"/>
|
||||
<notebook colspan="4">
|
||||
<page string="Conditions">
|
||||
<group col="2" colspan="2" name="model">
|
||||
|
||||
@@ -1147,7 +1147,6 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
|
||||
'active': fields.boolean('Active', help="If the active field is set to \
|
||||
true, it will allow you to hide the event alarm information without removing it.")
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'state': 'tentative',
|
||||
'class': 'public',
|
||||
|
||||
@@ -25,41 +25,44 @@ from osv import fields, osv
|
||||
class base_contact_installer(osv.osv_memory):
|
||||
_name = 'base.contact.installer'
|
||||
_inherit = 'res.config.installer'
|
||||
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=64),
|
||||
'migrate': fields.boolean('Migrate', help="If you select this, all addresses will be migrated."),
|
||||
'name': fields.char('Name', size=64),
|
||||
'migrate': fields.boolean('Migrate', help="If you select this, all addresses will be migrated."),
|
||||
'nomigrate': fields.boolean('NoMigrate', help="If you select this, all addresses will be not migrated."),
|
||||
}
|
||||
|
||||
def execute(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
This function is used to create contact and address from existing partner address
|
||||
This function is used to create contact and address from existing partner address
|
||||
"""
|
||||
cr.execute("""DROP TRIGGER IF EXISTS contactjob on res_partner_contact;
|
||||
DROP LANGUAGE IF EXISTS plpgsql CASCADE;
|
||||
CREATE LANGUAGE plpgsql ;
|
||||
CREATE OR REPLACE FUNCTION add_to_job() RETURNS TRIGGER AS $contactjob$
|
||||
DECLARE
|
||||
new_name varchar;
|
||||
new_phonenum varchar;
|
||||
BEGIN
|
||||
IF(TG_OP='INSERT') THEN
|
||||
INSERT INTO res_partner_job(contact_id, address_id, function, state) VALUES(NEW.id, NEW.website::integer,NEW.first_name, 'current');
|
||||
UPDATE res_partner_contact set first_name=Null, website=Null, active=True where id=NEW.id;
|
||||
END IF;
|
||||
RETURN NEW;
|
||||
END;
|
||||
$contactjob$ LANGUAGE plpgsql;
|
||||
CREATE TRIGGER contactjob AFTER INSERT ON res_partner_contact FOR EACH ROW EXECUTE PROCEDURE add_to_job();""")
|
||||
cr.commit()
|
||||
obj = self.pool.get("base.contact.installer").browse(cr, uid, uid)
|
||||
if obj.migrate:
|
||||
cr.execute("""DROP TRIGGER IF EXISTS contactjob on res_partner_contact;
|
||||
DROP LANGUAGE IF EXISTS plpgsql CASCADE;
|
||||
CREATE LANGUAGE plpgsql ;
|
||||
CREATE OR REPLACE FUNCTION add_to_job() RETURNS TRIGGER AS $contactjob$
|
||||
DECLARE
|
||||
new_name varchar;
|
||||
new_phonenum varchar;
|
||||
BEGIN
|
||||
IF(TG_OP='INSERT') THEN
|
||||
INSERT INTO res_partner_job(contact_id, address_id, function, state) VALUES(NEW.id, NEW.website::integer,NEW.first_name, 'current');
|
||||
UPDATE res_partner_contact set first_name=Null, website=Null, active=True where id=NEW.id;
|
||||
END IF;
|
||||
RETURN NEW;
|
||||
END;
|
||||
$contactjob$ LANGUAGE plpgsql;
|
||||
CREATE TRIGGER contactjob AFTER INSERT ON res_partner_contact FOR EACH ROW EXECUTE PROCEDURE add_to_job();""")
|
||||
cr.commit()
|
||||
|
||||
cr.execute("INSERT into res_partner_contact (name, title, email, first_name, website) (SELECT coalesce(name, 'Noname'), title, email, function , to_char(id, '99999999') from res_partner_address)")
|
||||
cr.commit()
|
||||
cr.execute("INSERT into res_partner_contact (name, title, email, first_name, website) (SELECT coalesce(name, 'Noname'), title, email, function , to_char(id, '99999999') from res_partner_address)")
|
||||
cr.commit()
|
||||
|
||||
cr.execute("DROP TRIGGER IF EXISTS contactjob on res_partner_contact")
|
||||
cr.execute("DROP LANGUAGE IF EXISTS plpgsql CASCADE;")
|
||||
cr.execute("DROP FUNCTION IF EXISTS add_to_job()")
|
||||
cr.commit()
|
||||
cr.execute("DROP TRIGGER IF EXISTS contactjob on res_partner_contact")
|
||||
cr.execute("DROP LANGUAGE IF EXISTS plpgsql CASCADE;")
|
||||
cr.execute("DROP FUNCTION IF EXISTS add_to_job()")
|
||||
cr.commit()
|
||||
|
||||
base_contact_installer()
|
||||
|
||||
|
||||
@@ -23,14 +23,18 @@
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<attribute name="string">Migrate</attribute>
|
||||
<attribute name="string">Configure</attribute>
|
||||
</xpath>
|
||||
<group colspan="8">
|
||||
<group colspan="2" col="2">
|
||||
<label string="Due to changes in Address and Partner's relation, some of the details from address are needed to migrated into contact information." colspan="4"/>
|
||||
<label string="Otherwise these details will not be visible from address/contact." colspan="4"/>
|
||||
<label string="Do you want to migrate your Address data in Contact Data?" colspan="4" />
|
||||
<field name="migrate" string="Yes/No" />
|
||||
<group colspan="6">
|
||||
<label string="Migrate:" colspan="1"/>
|
||||
<field name="migrate" string="Yes" colspan="1"/>
|
||||
<field name="nomigrate" string="No" colspan="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</data>
|
||||
|
||||
@@ -43,7 +43,9 @@
|
||||
'init_xml': ['base_setup_data.xml'],
|
||||
'update_xml': ['security/ir.model.access.csv',
|
||||
'base_setup_installer.xml',
|
||||
'base_setup_todo.xml','gtk_contact_form.xml'],
|
||||
'base_setup_todo.xml',
|
||||
# 'gtk_contact_form.xml'
|
||||
],
|
||||
'demo_xml': ['base_setup_demo.xml'],
|
||||
'installable': True,
|
||||
'active': True,
|
||||
|
||||
@@ -7,25 +7,25 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Setup">
|
||||
<group colspan="4" col="8">
|
||||
<group colspan="3" width="220">
|
||||
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
|
||||
<newline/>
|
||||
<label align="0.0" string="You can start configuring the system or connect directly to the database as an administrator." width="200" colspan="2"/>
|
||||
</group>
|
||||
<separator string="" position="vertical" colspan="1" rowspan="8"/>
|
||||
<group colspan="4" width="400">
|
||||
<separator string="Installation Done" colspan="4"/>
|
||||
<label align="0.0" string="Your database is now created." colspan="4"/>
|
||||
<field name="installed_users" nolabel= "1" colspan="4"/>
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="8" col="8">
|
||||
<separator string="" colspan="8"/>
|
||||
<label string="" colspan="6"/>
|
||||
<button name="menu" icon="gtk-ok" type="object" string="Use Directly" colspan="1"/>
|
||||
<button name="config" icon="gtk-go-forward" type="object" string="Start Configuration" colspan="1"/>
|
||||
</group>
|
||||
<group colspan="4" col="8">
|
||||
<group colspan="3" width="220">
|
||||
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
|
||||
<newline/>
|
||||
<label align="0.0" string="You can start configuring the system or connect directly to the database as an administrator." width="200" colspan="2"/>
|
||||
</group>
|
||||
<separator string="" orientation="vertical" colspan="1" rowspan="8"/>
|
||||
<group colspan="4" width="400">
|
||||
<separator string="Installation Done" colspan="4"/>
|
||||
<label align="0.0" string="Your database is now created." colspan="4"/>
|
||||
<field name="installed_users" nolabel= "1" colspan="4"/>
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="8" col="8">
|
||||
<separator string="" colspan="8"/>
|
||||
<label string="" colspan="6"/>
|
||||
<button name="menu" icon="gtk-ok" type="object" string="Use Directly" colspan="1"/>
|
||||
<button name="config" icon="gtk-go-forward" type="object" string="Start Configuration" colspan="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<attribute name="string">Main Company Setup</attribute>
|
||||
</form>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">Information of your company will be used to custiomise your documents like Invoices, Sale Orders and many more.</attribute>
|
||||
<attribute name="string">Information of your company will be used to customize your documents like Invoices, Sale Orders and many more.</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="title"]' position='attributes'>
|
||||
<attribute name='string'>Configure Your Company</attribute>
|
||||
|
||||
@@ -88,7 +88,7 @@ class base_setup_company(osv.osv_memory):
|
||||
'city':fields.char('City', size=128),
|
||||
'state_id':fields.selection(_get_all_states, 'State'),
|
||||
'country_id':fields.selection(_get_all_countries, 'Country'),
|
||||
'email':fields.char('E-mail', size=64, required=True),
|
||||
'email':fields.char('E-mail', size=64),
|
||||
'phone':fields.char('Phone', size=64),
|
||||
'currency':fields.many2one('res.currency', 'Currency', required=True),
|
||||
'rml_header1':fields.char('Report Header', size=200,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<data>
|
||||
<menuitem icon="terp-graph" id="base.reporting_menu"
|
||||
name="Reporting" sequence="30" />
|
||||
<menuitem icon="terp-graph" id="menu_dasboard"
|
||||
<menuitem id="menu_dasboard"
|
||||
name="Dashboard" sequence="30" />
|
||||
<!--Board Note Search View -->
|
||||
<record id="view_board_note_search" model="ir.ui.view">
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
<field name="view_id" ref="board_crm_statistical_form"/>
|
||||
</record>
|
||||
|
||||
<menuitem icon="terp-graph" id="board.menu_dasboard" name="Dashboard" sequence="0" parent="base.next_id_64"/>
|
||||
<menuitem id="board.menu_dasboard" name="Dashboard" sequence="0" parent="base.next_id_64"/>
|
||||
|
||||
<menuitem
|
||||
name="Statistics Dashboard" parent="board.menu_dasboard"
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
<field name="usage">menu</field>
|
||||
<field name="view_id" ref="board_crm_form"/>
|
||||
</record>
|
||||
<menuitem icon="terp-graph" id="board.menu_dasboard" name="Dashboard" sequence="0" parent="base.next_id_64"/>
|
||||
<menuitem id="board.menu_dasboard" name="Dashboard" sequence="0" parent="base.next_id_64"/>
|
||||
<menuitem
|
||||
name="Connecting Dashboard" parent="board.menu_dasboard"
|
||||
action="open_board_crm"
|
||||
|
||||
+8
-1
@@ -301,6 +301,13 @@ class crm_case(object):
|
||||
self.write(cr, uid, ids, {'state': 'cancel',
|
||||
'active': True})
|
||||
self._action(cr, uid, cases, 'cancel')
|
||||
for case in cases:
|
||||
message = "The " + self._description + " '" + case.name + "' has been Cancelled."
|
||||
#TODO: Need to differentiate lead and opportunity
|
||||
# if hasattr(case, 'type'):
|
||||
# #TO CHECK: hasattr gives warning for other crm objects that don't have field 'type'
|
||||
# message = "The " + (case.type or 'Case').title() + " '" + case.name + "' has been Cancelled."
|
||||
self.log(cr, uid, case.id, message)
|
||||
return True
|
||||
|
||||
def case_pending(self, cr, uid, ids, *args):
|
||||
@@ -422,7 +429,7 @@ class crm_case(object):
|
||||
rule_obj = self.pool.get('base.action.rule')
|
||||
model_obj = self.pool.get('ir.model')
|
||||
model_ids = model_obj.search(cr, uid, [('model','=',self._name)])
|
||||
rule_ids = rule_obj.search(cr, uid, [('name','=',model_ids[0])])
|
||||
rule_ids = rule_obj.search(cr, uid, [('model_id','=',model_ids[0])])
|
||||
return rule_obj._action(cr, uid, rule_ids, cases, scrit=scrit, context=context)
|
||||
|
||||
def format_body(self, body):
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<form position="attributes">
|
||||
<attribute name="string">CRM Modules Installation</attribute>
|
||||
<attribute name="string">CRM Modules Configuration</attribute>
|
||||
</form>
|
||||
|
||||
<separator string="title" position="attributes">
|
||||
@@ -41,7 +41,7 @@
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Plugins" colspan="4" />
|
||||
<field name="thunderbird" />
|
||||
<label string="*Outlook*" />
|
||||
<!-- <label string="*Outlook*" />-->
|
||||
<!-- TODO <field name="outlook" />-->
|
||||
</group>
|
||||
</group>
|
||||
|
||||
@@ -198,8 +198,8 @@ class crm_lead(osv.osv, crm_case):
|
||||
self.write(cr, uid, ids, value)
|
||||
|
||||
for (id, name) in self.name_get(cr, uid, ids):
|
||||
type = self.browse(cr, uid, id).type
|
||||
message = (_('The ') + type.title() or 'Lead') + " '" + name + "' "+ _("has been written as Open.")
|
||||
type = self.browse(cr, uid, id).type or 'Lead'
|
||||
message = (_('The ') + type.title()) + " '" + name + "' "+ _("has been Opened.")
|
||||
self.log(cr, uid, id, message)
|
||||
return res
|
||||
|
||||
@@ -216,7 +216,7 @@ class crm_lead(osv.osv, crm_case):
|
||||
for (id, name) in self.name_get(cr, uid, ids):
|
||||
lead = self.browse(cr, uid, id)
|
||||
if lead.type == 'lead':
|
||||
message = _('The Lead') + " '" + name + "' "+ _("has been written as Closed.")
|
||||
message = _('The Lead') + " '" + name + "' "+ _("has been Closed.")
|
||||
self.log(cr, uid, id, message)
|
||||
return res
|
||||
|
||||
|
||||
@@ -122,7 +122,21 @@ class crm_meeting(osv.osv, crm_case):
|
||||
}
|
||||
|
||||
return value
|
||||
|
||||
|
||||
def case_open(self, cr, uid, ids, *args):
|
||||
"""Confirms meeting
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of Meeting Ids
|
||||
@param *args: Tuple Value for additional Params
|
||||
"""
|
||||
res = super(crm_meeting, self).case_open(cr, uid, ids, args)
|
||||
for (id, name) in self.name_get(cr, uid, ids):
|
||||
message = _('The Meeting') + " '" + name + "' "+ _("has been Confirmed.")
|
||||
self.log(cr, uid, id, message)
|
||||
return res
|
||||
|
||||
crm_meeting()
|
||||
|
||||
class calendar_attendee(osv.osv):
|
||||
|
||||
@@ -36,8 +36,6 @@ AVAILABLE_STATES = [
|
||||
|
||||
class crm_opportunity(osv.osv):
|
||||
""" Opportunity Cases """
|
||||
_name = "crm.lead"
|
||||
_description = "Opportunity"
|
||||
_order = "priority,date_action,id desc"
|
||||
_inherit = 'crm.lead'
|
||||
_columns = {
|
||||
@@ -72,8 +70,10 @@ class crm_opportunity(osv.osv):
|
||||
|
||||
self.write(cr, uid, ids, value)
|
||||
for (id, name) in self.name_get(cr, uid, ids):
|
||||
message = _('The Opportunity') + " '" + name + "' "+ _("has been written as Won.")
|
||||
self.log(cr, uid, id, message)
|
||||
opp = self.browse(cr, uid, id)
|
||||
if opp.type == 'opportunity':
|
||||
message = _('The Opportunity') + " '" + name + "' "+ _("has been Won.")
|
||||
self.log(cr, uid, id, message)
|
||||
return res
|
||||
|
||||
def case_mark_lost(self, cr, uid, ids, *args):
|
||||
@@ -95,7 +95,7 @@ class crm_opportunity(osv.osv):
|
||||
for (id, name) in self.name_get(cr, uid, ids):
|
||||
opp = self.browse(cr, uid, id)
|
||||
if opp.type == 'opportunity':
|
||||
message = _('The Opportunity') + " '" + name + "' "+ _("has been written as Lost.")
|
||||
message = _('The Opportunity') + " '" + name + "' "+ _("has been Lost.")
|
||||
self.log(cr, uid, id, message)
|
||||
return res
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
"Partner: %s" % (lead.partner_id and lead.partner_id.name_get()[0][1]),
|
||||
"Contact: %s" % (pa.name or ''),
|
||||
"Title: %s" % (pa.title or ''),
|
||||
"Function: %s" % (pa.function and pa.function.name_get()[0][1] or ''),
|
||||
"Function: %s" % (pa.function or ''),
|
||||
"Street: %s" % (pa.street or ''),
|
||||
"Street2: %s" % (pa.street2 or ''),
|
||||
"Zip: %s" % (pa.zip or ''),
|
||||
@@ -244,6 +244,8 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
"Phone: %s" % (pa.phone or ''),
|
||||
"Fax: %s" % (pa.fax or ''),
|
||||
"Mobile: %s" % (pa.mobile or ''),
|
||||
"Lead Category: %s" % (lead.categ_id and lead.categ_id.name or ''),
|
||||
"Details: %s" % (lead.description or ''),
|
||||
]
|
||||
return "\n".join(body + ['---'])
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ class crm_send_new_email(osv.osv_memory):
|
||||
if 'email_from' in fields:
|
||||
res.update({'email_from': user_mail_from and tools.ustr(user_mail_from) or ''})
|
||||
if 'reply_to' in fields:
|
||||
res.update({'reply_to': case.section_id.reply_to})
|
||||
res.update({'reply_to': case.section_id and case.section_id.reply_to or False})
|
||||
if 'subject' in fields:
|
||||
res.update({'subject': tools.ustr(context.get('subject', case.name) or '')})
|
||||
if 'email_cc' in fields:
|
||||
|
||||
@@ -28,7 +28,7 @@ class crm_claim(osv.osv, crm.crm_case):
|
||||
Crm claim
|
||||
"""
|
||||
_name = "crm.claim"
|
||||
_description = "Claim Cases"
|
||||
_description = "Claim"
|
||||
_order = "id desc"
|
||||
_inherit = ['mailgate.thread']
|
||||
_columns = {
|
||||
|
||||
@@ -26,7 +26,7 @@ class crm_fundraising(osv.osv, crm.crm_case):
|
||||
""" Fund Raising Cases """
|
||||
|
||||
_name = "crm.fundraising"
|
||||
_description = "Fund Raising Cases"
|
||||
_description = "Fund Raising"
|
||||
_order = "id desc"
|
||||
_inherit = ['mailgate.thread']
|
||||
_columns = {
|
||||
|
||||
@@ -27,7 +27,7 @@ class crm_helpdesk(osv.osv, crm.crm_case):
|
||||
""" Helpdesk Cases """
|
||||
|
||||
_name = "crm.helpdesk"
|
||||
_description = "Helpdesk Cases"
|
||||
_description = "Helpdesk"
|
||||
_order = "id desc"
|
||||
_inherit = ['mailgate.thread']
|
||||
_columns = {
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
id="menu_reports_document"
|
||||
parent="menu_reporting"
|
||||
sequence="0"
|
||||
icon="terp-graph"
|
||||
groups="document.group_document_manager"/>
|
||||
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ class email_template_send_wizard(osv.osv_memory):
|
||||
return template
|
||||
|
||||
def _get_template_value(self, cr, uid, field, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
template = self._get_template(cr, uid, context)
|
||||
if not template:
|
||||
return False
|
||||
@@ -119,6 +121,8 @@ class email_template_send_wizard(osv.osv_memory):
|
||||
}
|
||||
|
||||
def fields_get(self, cr, uid, fields=None, context=None, write_access=True):
|
||||
if context is None:
|
||||
context = {}
|
||||
result = super(email_template_send_wizard, self).fields_get(cr, uid, fields, context, write_access)
|
||||
if 'attachment_ids' in result and 'src_model' in context:
|
||||
result['attachment_ids']['domain'] = [('res_model','=',context['src_model']),('res_id','=',context['active_id'])]
|
||||
@@ -165,6 +169,8 @@ class email_template_send_wizard(osv.osv_memory):
|
||||
else:
|
||||
return value
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
mail_ids = []
|
||||
template = self._get_template(cr, uid, context)
|
||||
for id in context['src_rec_ids']:
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="board_associations_manager_form"/>
|
||||
</record>
|
||||
<menuitem id="board_associations" icon="terp-graph" name="Dashboard" parent="base.menu_report_association" sequence="0"/>
|
||||
<menuitem id="board_associations" name="Dashboard" parent="base.menu_report_association" sequence="0"/>
|
||||
<menuitem
|
||||
name="Associations" parent="board_associations"
|
||||
action="open_board_associations_manager"
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2009-11-17 07:25+0000\n"
|
||||
"PO-Revision-Date: 2010-07-27 18:36+0000\n"
|
||||
"Last-Translator: Henrique Fernandes Monteiro <henriquefiles@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-06-22 03:53+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-28 03:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: google_map
|
||||
@@ -24,7 +24,7 @@ msgstr "Executar o Google Map"
|
||||
#. module: google_map
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Invalido XML para Arquitetura da View"
|
||||
msgstr "XML inválido para a arquitetura de exibição"
|
||||
|
||||
#. module: google_map
|
||||
#: view:res.partner:0
|
||||
@@ -40,7 +40,8 @@ msgid ""
|
||||
"url widget."
|
||||
msgstr ""
|
||||
"O módulo adiciona um campo Google Map no endereço do parceiro\n"
|
||||
"de modo que possamos abrir o Google Maps diretamente da URL do widget."
|
||||
"de modo que possamos abrir o Google Maps diretamente da\n"
|
||||
"URL do widget."
|
||||
|
||||
#. module: google_map
|
||||
#: view:res.partner:0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<menuitem icon="terp-graph" id="base.dashboard" name="Dashboards" sequence="2" parent="base.reporting_menu"/>
|
||||
<menuitem id="base.dashboard" name="Dashboards" sequence="2" parent="base.reporting_menu"/>
|
||||
<menuitem
|
||||
id="menu_hr_deshboard"
|
||||
name="Human Resources"
|
||||
@@ -33,7 +33,7 @@
|
||||
<field name="view_id" ref="board_hr_form"/>
|
||||
</record>
|
||||
<menuitem id="menu_hr_reporting" name="Reporting" parent="hr.menu_hr_root" sequence="10"/>
|
||||
<menuitem icon="terp-graph" id="menu_hr_dasboard" name="Dashboard" parent="menu_hr_reporting" sequence="0"/>
|
||||
<menuitem id="menu_hr_dasboard" name="Dashboard" parent="menu_hr_reporting" sequence="0"/>
|
||||
<menuitem
|
||||
action="open_board_hr"
|
||||
icon="terp-graph"
|
||||
|
||||
@@ -34,6 +34,8 @@ class hr_employee_category(osv.osv):
|
||||
}
|
||||
|
||||
def _check_recursion(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
level = 100
|
||||
while len(ids):
|
||||
cr.execute('select distinct parent_id from hr_employee_category where id IN %s', (tuple(ids), ))
|
||||
@@ -62,6 +64,8 @@ hr_employee_marital_status()
|
||||
class hr_job(osv.osv):
|
||||
|
||||
def _no_of_employee(self, cr, uid, ids, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
res = {}
|
||||
for emp in self.browse(cr, uid, ids):
|
||||
res[emp.id] = len(emp.employee_ids or [])
|
||||
@@ -133,6 +137,8 @@ class hr_employee(osv.osv):
|
||||
}
|
||||
|
||||
def _get_photo(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
return open(os.path.join(
|
||||
tools.config['addons_path'], 'hr/image', 'photo.png'),
|
||||
'rb') .read().encode('base64')
|
||||
|
||||
+24
-11
@@ -29,7 +29,7 @@ class hr_department(osv.osv):
|
||||
context = {}
|
||||
if not len(ids):
|
||||
return []
|
||||
reads = self.read(cr, uid, ids, ['name','parent_id'], context)
|
||||
reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
|
||||
res = []
|
||||
for record in reads:
|
||||
name = record['name']
|
||||
@@ -39,6 +39,8 @@ class hr_department(osv.osv):
|
||||
return res
|
||||
|
||||
def _dept_name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
res = self.name_get(cr, uid, ids, context=context)
|
||||
return dict(res)
|
||||
|
||||
@@ -59,7 +61,9 @@ class hr_department(osv.osv):
|
||||
}
|
||||
|
||||
def _get_members(self,cr, uid, context=None):
|
||||
mids = self.search(cr, uid, [('manager_id', '=', uid)])
|
||||
if context is None:
|
||||
context = {}
|
||||
mids = self.search(cr, uid, [('manager_id', '=', uid)], context=context)
|
||||
result = {uid: 1}
|
||||
for m in self.browse(cr, uid, mids, context=context):
|
||||
for user in m.member_ids:
|
||||
@@ -67,6 +71,8 @@ class hr_department(osv.osv):
|
||||
return result.keys()
|
||||
|
||||
def _check_recursion(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
level = 100
|
||||
while len(ids):
|
||||
cr.execute('select distinct parent_id from hr_department where id IN %s',(tuple(ids),))
|
||||
@@ -89,6 +95,7 @@ class ir_action_window(osv.osv):
|
||||
def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'):
|
||||
if context is None:
|
||||
context = {}
|
||||
obj_dept = self.pool.get('hr.department')
|
||||
select = ids
|
||||
if isinstance(ids, (int, long)):
|
||||
select = [ids]
|
||||
@@ -96,7 +103,7 @@ class ir_action_window(osv.osv):
|
||||
for r in res:
|
||||
mystring = 'department_users_get()'
|
||||
if mystring in (r.get('domain', '[]') or ''):
|
||||
r['domain'] = r['domain'].replace(mystring, str(self.pool.get('hr.department')._get_members(cr, uid)))
|
||||
r['domain'] = r['domain'].replace(mystring, str(obj_dept._get_members(cr, uid)))
|
||||
if isinstance(ids, (int, long)):
|
||||
if res:
|
||||
return res[0]
|
||||
@@ -111,18 +118,22 @@ class res_users(osv.osv):
|
||||
_description = 'User'
|
||||
|
||||
def _parent_compute(self, cr, uid, ids, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
result = {}
|
||||
obj_dept = self.pool.get('hr.department')
|
||||
for user_id in ids:
|
||||
ids_dept = obj_dept.search(cr, uid, [('member_ids', 'in', [user_id])])
|
||||
ids_dept = obj_dept.search(cr, uid, [('member_ids', 'in', [user_id])], context=context)
|
||||
parent_ids = []
|
||||
if ids_dept:
|
||||
data_dept = obj_dept.read(cr, uid, ids_dept, ['manager_id'])
|
||||
data_dept = obj_dept.read(cr, uid, ids_dept, ['manager_id'], context=context)
|
||||
parent_ids = map(lambda x: x['manager_id'][0], data_dept)
|
||||
result[user_id] = parent_ids
|
||||
return result
|
||||
|
||||
def _parent_search(self, cr, uid, obj, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
parent = []
|
||||
for arg in args:
|
||||
if arg[0] == 'parent_id':
|
||||
@@ -133,20 +144,20 @@ class res_users(osv.osv):
|
||||
return [('id', 'in', child_ids.get(uid,[]))]
|
||||
|
||||
def _child_compute(self, cr, uid, ids, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
obj_dept = self.pool.get('hr.department')
|
||||
obj_user = self.pool.get('res.users')
|
||||
result = {}
|
||||
if context is None:
|
||||
context = {}
|
||||
for manager_id in ids:
|
||||
child_ids = []
|
||||
mgnt_dept_ids = obj_dept.search(cr, uid, [('manager_id', '=', manager_id)])
|
||||
ids_dept = obj_dept.search(cr, uid, [('id', 'child_of', mgnt_dept_ids)])
|
||||
mgnt_dept_ids = obj_dept.search(cr, uid, [('manager_id', '=', manager_id)], context=context)
|
||||
ids_dept = obj_dept.search(cr, uid, [('id', 'child_of', mgnt_dept_ids)], context=context)
|
||||
if ids_dept:
|
||||
data_dept = obj_dept.read(cr, uid, ids_dept, ['member_ids'])
|
||||
data_dept = obj_dept.read(cr, uid, ids_dept, ['member_ids'], context=context)
|
||||
childs = map(lambda x: x['member_ids'], data_dept)
|
||||
childs = tools.flatten(childs)
|
||||
childs = obj_user.search(cr, uid, [('id', 'in', childs),('active', '=', True)])
|
||||
childs = obj_user.search(cr, uid, [('id', 'in', childs),('active', '=', True)], context=context)
|
||||
if manager_id in childs:
|
||||
childs.remove(manager_id)
|
||||
child_ids.extend(tools.flatten(childs))
|
||||
@@ -159,6 +170,8 @@ class res_users(osv.osv):
|
||||
return result
|
||||
|
||||
def _child_search(self, cr, uid, obj, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
parent = []
|
||||
for arg in args:
|
||||
if arg[0] == 'child_ids':
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<field name="inherit_id" ref="base.view_users_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Departements Informations" groups="base.group_extended">
|
||||
<page string="Departments" groups="base.group_extended">
|
||||
<field name="context_department_id" completion="1" widget="selection" string="Department"/>
|
||||
<separator string="Managers" colspan="4"/>
|
||||
<field name="parent_id" nolabel="1" colspan="4"/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<form position="attributes">
|
||||
<attribute name="string">Select Human Resources Modules To Install</attribute>
|
||||
<attribute name="string">Human Resources Modules Configuration</attribute>
|
||||
</form>
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string">Select Human Resources Modules To Install</attribute>
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
|
||||
<menuitem id="menu_hr_root" icon="terp-hr" name="Human Resources" sequence="15"/>
|
||||
<menuitem id="menu_hr_main" parent="menu_hr_root" name="Human Resources" sequence="0"/>
|
||||
<menuitem id="menu_hr_configuration" name="Configuration" parent="hr.menu_hr_root" groups="group_hr_manager" sequence="50" />
|
||||
<menuitem id="menu_hr_management" name="Human Resources" parent="hr.menu_hr_configuration" groups="group_hr_manager" sequence="1" />
|
||||
<menuitem id="menu_view_employee_category_configuration_form" parent="hr.menu_hr_management" name="Employees"
|
||||
sequence="1"/>
|
||||
<menuitem id="menu_hr_configuration" name="Configuration" parent="hr.menu_hr_root" groups="group_hr_manager" sequence="50"/>
|
||||
<menuitem id="menu_hr_management" name="Human Resources" parent="hr.menu_hr_configuration" groups="group_hr_manager" sequence="1"/>
|
||||
<menuitem id="menu_view_employee_category_configuration_form" parent="hr.menu_hr_management" name="Employees" sequence="1"/>
|
||||
|
||||
<!--
|
||||
==========
|
||||
|
||||
@@ -46,9 +46,9 @@ class hr_installer(osv.osv_memory):
|
||||
"performance review of employees."),
|
||||
'hr_attendance': fields.boolean('Attendances (Sign In/Out)',
|
||||
help="Simplifies the management of employee attendances."),
|
||||
'hr_payroll': fields.boolean('Payroll' ,
|
||||
'hr_payroll': fields.boolean('Payroll',
|
||||
help="Generic Payroll system"),
|
||||
'hr_payroll_account': fields.boolean('Payroll with Accounting',
|
||||
'hr_payroll_account': fields.boolean('Payroll Accounting',
|
||||
help="Generic Payroll system Integrated with Accountings."),
|
||||
}
|
||||
_defaults = {
|
||||
|
||||
@@ -37,7 +37,9 @@ class hr_action_reason(osv.osv):
|
||||
hr_action_reason()
|
||||
|
||||
def _employee_get(obj, cr, uid, context=None):
|
||||
ids = obj.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)])
|
||||
if context is None:
|
||||
context = {}
|
||||
ids = obj.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)], context=context)
|
||||
if ids:
|
||||
return ids[0]
|
||||
return False
|
||||
@@ -47,6 +49,8 @@ class hr_attendance(osv.osv):
|
||||
_description = "Attendance"
|
||||
|
||||
def _day_compute(self, cr, uid, ids, fieldnames, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
res = dict.fromkeys(ids, '')
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
res[obj.id] = time.strftime('%Y-%m-%d', time.strptime(obj.name, '%Y-%m-%d %H:%M:%S'))
|
||||
@@ -89,6 +93,8 @@ class hr_employee(osv.osv):
|
||||
_description = "Employee"
|
||||
|
||||
def _state(self, cr, uid, ids, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
result = {}
|
||||
for id in ids:
|
||||
result[id] = 'absent'
|
||||
@@ -112,11 +118,16 @@ class hr_employee(osv.osv):
|
||||
}
|
||||
|
||||
def _action_check(self, cr, uid, emp_id, dt=False, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
cr.execute('select max(name) from hr_attendance where employee_id=%s', (emp_id,))
|
||||
res = cr.fetchone()
|
||||
return not (res and (res[0]>=(dt or time.strftime('%Y-%m-%d %H:%M:%S'))))
|
||||
|
||||
def attendance_action_change(self, cr, uid, ids, type='action', context=None, dt=False, *args):
|
||||
obj_attendance = self.pool.get('hr.attendance')
|
||||
if context is None:
|
||||
context = {}
|
||||
id = False
|
||||
warning_sign = 'sign'
|
||||
res = {}
|
||||
@@ -136,7 +147,7 @@ class hr_employee(osv.osv):
|
||||
|
||||
if dt:
|
||||
res['name'] = dt
|
||||
id = self.pool.get('hr.attendance').create(cr, uid, res, context=context)
|
||||
id = obj_attendance.create(cr, uid, res, context=context)
|
||||
|
||||
if type != 'action':
|
||||
return id
|
||||
|
||||
@@ -74,8 +74,6 @@
|
||||
<field name="help">Time Tracking functionality aims to manage employee's attendances on the basis of the actions (Sign in/Sign out) performed by them. You can also link this to an attndance machine using OpenERP's webservices features.</field>
|
||||
</record>
|
||||
|
||||
<!--<menuitem id="menu_hr_attendance" name="Attendances" parent="hr.menu_hr_root"
|
||||
groups="group_hr_attendance"/>-->
|
||||
<menuitem id="menu_hr_time_tracking" name="Time Tracking" parent="hr.menu_hr_root" sequence="3"/>
|
||||
<menuitem action="open_view_attendance" id="menu_open_view_attendance" parent="menu_hr_time_tracking" groups="hr.group_hr_manager" sequence="3"/>
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ class hr_attendance_byweek(osv.osv_memory):
|
||||
}
|
||||
|
||||
def print_report(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
datas = {
|
||||
'ids': [],
|
||||
'model': 'hr.employee',
|
||||
|
||||
@@ -42,14 +42,14 @@ class hr_attendance_error(osv.osv_memory):
|
||||
if context is None:
|
||||
context = {}
|
||||
emp_ids = []
|
||||
data_error = self.read(cr, uid, ids)[0]
|
||||
data_error = self.read(cr, uid, ids, context=context)[0]
|
||||
date_from = data_error['init_date']
|
||||
date_to = data_error['end_date']
|
||||
cr.execute("select id from hr_attendance where employee_id IN %s and to_char(name,'YYYY-mm-dd')<=%s and to_char(name,'YYYY-mm-dd')>=%s and action IN %s order by name" ,(tuple(context['active_ids']), date_to, date_from, tuple(['sign_in','sign_out'])))
|
||||
attendance_ids = [x[0] for x in cr.fetchall()]
|
||||
if not attendance_ids:
|
||||
raise osv.except_osv(_('No Data Available'), _('No records found for your selection!'))
|
||||
attendance_records = self.pool.get('hr.attendance').browse(cr, uid, attendance_ids)
|
||||
attendance_records = self.pool.get('hr.attendance').browse(cr, uid, attendance_ids, context=context)
|
||||
|
||||
for rec in attendance_records:
|
||||
if rec.employee_id.id not in emp_ids:
|
||||
|
||||
@@ -53,11 +53,15 @@ class hr_si_so_ask(osv.osv_memory):
|
||||
}
|
||||
|
||||
def sign_in(self, cr, uid, ids, context=None):
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, [], context=context)[0]
|
||||
return self.pool.get('hr.sign.in.out').sign_in(cr, uid, data, context)
|
||||
|
||||
def sign_out(self, cr, uid, ids, context=None):
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, [], context=context)[0]
|
||||
return self.pool.get('hr.sign.in.out').sign_out(cr, uid, data, context)
|
||||
|
||||
hr_si_so_ask()
|
||||
@@ -74,6 +78,8 @@ class hr_sign_in_out(osv.osv_memory):
|
||||
}
|
||||
|
||||
def _get_empid(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
emp_id = self.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)], context=context)
|
||||
if emp_id:
|
||||
employee = self.pool.get('hr.employee').browse(cr, uid, emp_id, context=context)[0]
|
||||
@@ -81,6 +87,8 @@ class hr_sign_in_out(osv.osv_memory):
|
||||
return {}
|
||||
|
||||
def default_get(self, cr, uid, fields_list, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
res = super(hr_sign_in_out, self).default_get(cr, uid, fields_list, context=context)
|
||||
res_emp = self._get_empid(cr, uid, context=context)
|
||||
res.update(res_emp)
|
||||
@@ -89,10 +97,12 @@ class hr_sign_in_out(osv.osv_memory):
|
||||
def si_check(self, cr, uid, ids, context=None):
|
||||
obj_model = self.pool.get('ir.model.data')
|
||||
att_obj = self.pool.get('hr.attendance')
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, [], context=context)[0]
|
||||
emp_id = data['emp_id']
|
||||
att_id = att_obj.search(cr, uid, [('employee_id', '=', emp_id)], limit=1, order='name desc')
|
||||
last_att = att_obj.browse(cr, uid, att_id)
|
||||
last_att = att_obj.browse(cr, uid, att_id, context=context)
|
||||
if last_att:
|
||||
last_att = last_att[0]
|
||||
cond = not last_att or last_att.action == 'sign_out'
|
||||
@@ -113,8 +123,10 @@ class hr_sign_in_out(osv.osv_memory):
|
||||
|
||||
def so_check(self, cr, uid, ids, context=None):
|
||||
obj_model = self.pool.get('ir.model.data')
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
att_obj = self.pool.get('hr.attendance')
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, [], context=context)[0]
|
||||
emp_id = data['emp_id']
|
||||
att_id = att_obj.search(cr, uid, [('employee_id', '=', emp_id),('action', '!=', 'action')], limit=1, order='name desc')
|
||||
last_att = att_obj.browse(cr, uid, att_id, context=context)
|
||||
@@ -137,8 +149,8 @@ class hr_sign_in_out(osv.osv_memory):
|
||||
if cond:
|
||||
return self.sign_out(cr, uid, data, context)
|
||||
else:
|
||||
model_data_ids = self.pool.get('ir.model.data').search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_hr_attendance_si_ask')], context=context)
|
||||
resource_id = self.pool.get('ir.model.data').read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
model_data_ids = att_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_hr_attendance_si_ask')], context=context)
|
||||
resource_id = att_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
return {
|
||||
'name': _('Sign in / Sign out'),
|
||||
'view_type': 'form',
|
||||
@@ -150,12 +162,14 @@ class hr_sign_in_out(osv.osv_memory):
|
||||
}
|
||||
|
||||
def sign_in(self, cr, uid, data, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
emp_id = data['emp_id']
|
||||
if 'last_time' in data:
|
||||
if data['last_time'] > time.strftime('%Y-%m-%d %H:%M:%S'):
|
||||
raise osv.except_osv(_('UserError'), _('The sign-out date must be in the past'))
|
||||
self.pool.get('hr.attendance').create(cr, uid, {'name': data['last_time'], 'action': 'sign_out',
|
||||
'employee_id': emp_id})
|
||||
'employee_id': emp_id}, context=context)
|
||||
try:
|
||||
success = self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_in')
|
||||
except:
|
||||
@@ -163,11 +177,13 @@ class hr_sign_in_out(osv.osv_memory):
|
||||
return {} # To do: Return Success message
|
||||
|
||||
def sign_out(self, cr, uid, data, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
emp_id = data['emp_id']
|
||||
if 'last_time' in data:
|
||||
if data['last_time'] > time.strftime('%Y-%m-%d %H:%M:%S'):
|
||||
raise osv.except_osv(_('UserError'), _('The Sign-in date must be in the past'))
|
||||
self.pool.get('hr.attendance').create(cr, uid, {'name':data['last_time'], 'action':'sign_in', 'employee_id':emp_id})
|
||||
self.pool.get('hr.attendance').create(cr, uid, {'name':data['last_time'], 'action':'sign_in', 'employee_id':emp_id}, context=context)
|
||||
try:
|
||||
success = self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_out')
|
||||
except:
|
||||
|
||||
@@ -104,18 +104,22 @@ class hr_employee(osv.osv):
|
||||
}
|
||||
|
||||
def run_employee_evaluation(self, cr, uid, automatic=False, use_new_cursor=False, context=None):
|
||||
obj_evaluation = self.pool.get('hr_evaluation.evaluation')
|
||||
if context is None:
|
||||
context = {}
|
||||
for id in self.browse(cr, uid, self.search(cr, uid, [], context=context), context=context):
|
||||
if id.evaluation_plan_id and id.evaluation_date:
|
||||
if (dt.ISO.ParseAny(id.evaluation_date) + dt.RelativeDateTime(months = int(id.evaluation_plan_id.month_next))).strftime('%Y-%m-%d') <= time.strftime("%Y-%m-%d"):
|
||||
self.write(cr, uid, id.id, {'evaluation_date' : (dt.ISO.ParseAny(id.evaluation_date) + dt.RelativeDateTime(months =+ int(id.evaluation_plan_id.month_next))).strftime('%Y-%m-%d')}, context=context)
|
||||
self.pool.get("hr_evaluation.evaluation").create(cr, uid, {'employee_id' : id.id, 'plan_id': id.evaluation_plan_id}, context)
|
||||
obj_evaluation.create(cr, uid, {'employee_id' : id.id, 'plan_id': id.evaluation_plan_id}, context=context)
|
||||
return True
|
||||
|
||||
def onchange_evaluation_plan_id(self, cr, uid, ids, evaluation_plan_id, evaluation_date, context=None):
|
||||
evaluation_date = evaluation_date or False
|
||||
evaluation_plan_obj=self.pool.get('hr_evaluation.plan')
|
||||
obj_evaluation = self.pool.get('hr_evaluation.evaluation')
|
||||
if context is None:
|
||||
context = {}
|
||||
if evaluation_plan_id:
|
||||
flag = False
|
||||
evaluation_plan = evaluation_plan_obj.browse(cr, uid, [evaluation_plan_id], context=context)[0]
|
||||
@@ -131,9 +135,11 @@ class hr_employee(osv.osv):
|
||||
return {'value': {'evaluation_date': evaluation_date}}
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
id = super(hr_employee, self).create(cr, uid, vals, context=context)
|
||||
if vals.get('evaluation_plan_id', False):
|
||||
self.pool.get("hr_evaluation.evaluation").create(cr, uid, {'employee_id' : id, 'plan_id': vals['evaluation_plan_id']}, context=context)
|
||||
obj_evaluation.create(cr, uid, {'employee_id' : id, 'plan_id': vals['evaluation_plan_id']}, context=context)
|
||||
return id
|
||||
|
||||
hr_employee()
|
||||
@@ -173,10 +179,12 @@ class hr_evaluation(osv.osv):
|
||||
'state' : lambda *a: 'draft',
|
||||
}
|
||||
|
||||
def name_get(self, cr, uid, ids, context={}):
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if not len(ids):
|
||||
return []
|
||||
reads = self.browse(cr, uid, ids, context)
|
||||
reads = self.browse(cr, uid, ids, context=context)
|
||||
res = []
|
||||
for record in reads:
|
||||
name = record.plan_id.name
|
||||
@@ -185,6 +193,8 @@ class hr_evaluation(osv.osv):
|
||||
|
||||
def onchange_employee_id(self, cr, uid, ids, employee_id, context=None):
|
||||
employee_obj=self.pool.get('hr.employee')
|
||||
if context is None:
|
||||
context = {}
|
||||
evaluation_plan_id=''
|
||||
if employee_id:
|
||||
for employee in employee_obj.browse(cr, uid, [employee_id], context=context):
|
||||
@@ -194,8 +204,11 @@ class hr_evaluation(osv.osv):
|
||||
return {'value': {'plan_id':evaluation_plan_id}}
|
||||
|
||||
def button_plan_in_progress(self, cr, uid, ids, context=None):
|
||||
hr_eval_inter_obj = self.pool.get('hr.evaluation.interview')
|
||||
if context is None:
|
||||
context = {}
|
||||
apprai_id = []
|
||||
for evaluation in self.browse(cr, uid, ids, context):
|
||||
for evaluation in self.browse(cr, uid, ids, context=context):
|
||||
wait = False
|
||||
for phase in evaluation.plan_id.phase_ids:
|
||||
childs = []
|
||||
@@ -210,7 +223,6 @@ class hr_evaluation(osv.osv):
|
||||
if not child.user_id:
|
||||
continue
|
||||
|
||||
hr_eval_inter_obj = self.pool.get('hr.evaluation.interview')
|
||||
int_id = hr_eval_inter_obj.create(cr, uid, {
|
||||
'evaluation_id': evaluation.id,
|
||||
'survey_id': phase.survey_id.id,
|
||||
@@ -235,18 +247,24 @@ class hr_evaluation(osv.osv):
|
||||
return True
|
||||
|
||||
def button_final_validation(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, {'state':'progress'})
|
||||
request_obj = self.pool.get('hr.evaluation.interview')
|
||||
for id in self.browse(cr, uid ,ids,context=context):
|
||||
if len(id.survey_request_ids) != len(request_obj.search(cr, uid, [('evaluation_id', '=', id.id),('state', '=', 'done')],context=context)):
|
||||
if context is None:
|
||||
context = {}
|
||||
self.write(cr, uid, ids, {'state':'progress'}, context=context)
|
||||
for id in self.browse(cr, uid ,ids, context=context):
|
||||
if len(id.survey_request_ids) != len(request_obj.search(cr, uid, [('evaluation_id', '=', id.id),('state', '=', 'done')], context=context)):
|
||||
raise osv.except_osv(_('Warning !'),_("You cannot change state, because some appraisal in waiting answer or draft state"))
|
||||
return True
|
||||
|
||||
def button_done(self,cr, uid, ids, context=None):
|
||||
self.write(cr,uid,ids,{'state':'done', 'date_close': time.strftime('%Y-%m-%d')}, context=context)
|
||||
if context is None:
|
||||
context = {}
|
||||
self.write(cr, uid, ids,{'state':'done', 'date_close': time.strftime('%Y-%m-%d')}, context=context)
|
||||
return True
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
self.write(cr, uid, ids,{'state':'cancel'}, context=context)
|
||||
return True
|
||||
|
||||
@@ -277,20 +295,22 @@ class hr_evaluation_interview(osv.osv):
|
||||
}
|
||||
|
||||
def survey_req_waiting_answer(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, { 'state' : 'waiting_answer'})
|
||||
if context is None:
|
||||
context = {}
|
||||
self.write(cr, uid, ids, { 'state' : 'waiting_answer'}, context=context)
|
||||
return True
|
||||
|
||||
def survey_req_done(self, cr, uid, ids, context=None):
|
||||
hr_eval_obj = self.pool.get('hr_evaluation.evaluation')
|
||||
if context is None:
|
||||
context = {}
|
||||
hr_eval_obj = self.pool.get('hr_evaluation.evaluation')
|
||||
for id in self.browse(cr, uid, ids, context=context):
|
||||
flag = False
|
||||
wating_id = 0
|
||||
tot_done_req = 0
|
||||
if not id.evaluation_id.id:
|
||||
raise osv.except_osv(_('Warning !'),_("You cannot start evaluation without Evaluation."))
|
||||
records = hr_eval_obj.browse(cr, uid, [id.evaluation_id.id],context=context)[0].survey_request_ids
|
||||
records = hr_eval_obj.browse(cr, uid, [id.evaluation_id.id], context=context)[0].survey_request_ids
|
||||
for child in records:
|
||||
if child.state == "draft" :
|
||||
wating_id = child.id
|
||||
@@ -300,16 +320,20 @@ class hr_evaluation_interview(osv.osv):
|
||||
else :
|
||||
tot_done_req += 1
|
||||
if not flag and wating_id:
|
||||
self.survey_req_waiting_answer(cr, uid, [wating_id], context)
|
||||
self.survey_req_waiting_answer(cr, uid, [wating_id], context=context)
|
||||
hr_eval_obj.write(cr, uid, [id.evaluation_id.id], {'progress': tot_done_req * 100 / len(records)}, context=context)
|
||||
self.write(cr, uid, ids, { 'state': 'done'})
|
||||
self.write(cr, uid, ids, { 'state': 'done'}, context=context)
|
||||
return True
|
||||
|
||||
def survey_req_draft(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
self.write(cr, uid, ids, { 'state': 'draft'}, context=context)
|
||||
return True
|
||||
|
||||
def survey_req_cancel(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
self.write(cr, uid, ids, { 'state': 'cancel'}, context=context)
|
||||
return True
|
||||
|
||||
@@ -326,7 +350,7 @@ class hr_evaluation_interview(osv.osv):
|
||||
"""
|
||||
if not context:
|
||||
context = {}
|
||||
record = self.browse(cr, uid, ids, context)
|
||||
record = self.browse(cr, uid, ids, context=context)
|
||||
record = record and record[0]
|
||||
context.update({'survey_id': record.survey_id.id, 'response_id': [record.response.id], 'response_no':0,})
|
||||
value = self.pool.get("survey").action_print_survey(cr, uid, ids, context)
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
<filter icon="terp-go-week" string="7 Days" help="Evaluations to close within the next 7 days"
|
||||
domain="[('date', '>=', (datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]" />
|
||||
<filter icon="terp-gnome-cpu-frequency-applet+" string="Overpassed"
|
||||
help="Evaluations that overpassed the deadline" domain="[('date','>=',(datetime.date.today()))]" />
|
||||
help="Evaluations that overpassed the deadline" domain="[('date','>=',str(datetime.date.today()))]" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="employee_id" />
|
||||
<field name="plan_id" widget="selection" />
|
||||
|
||||
@@ -8,13 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-25 12:18+0000\n"
|
||||
"PO-Revision-Date: 2010-06-29 22:34+0000\n"
|
||||
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
|
||||
"PO-Revision-Date: 2010-07-23 19:03+0000\n"
|
||||
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
|
||||
"<jesteve@zikzakmedia.com>\n"
|
||||
"Language-Team: Spanish <es@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-07-01 03:45+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-24 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: hr_evaluation
|
||||
@@ -84,7 +85,7 @@ msgstr "Datos informales"
|
||||
#. module: hr_evaluation
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Nombre de modelo inválido en la definición de acción."
|
||||
msgstr "Nombre de modelo no válido en la definición de la acción."
|
||||
|
||||
#. module: hr_evaluation
|
||||
#: field:hr_evaluation.evaluation,employee_id:0
|
||||
|
||||
@@ -30,6 +30,8 @@ class hr_evaluation_reminder(osv.osv_memory):
|
||||
|
||||
def send_mail(self, cr, uid, ids, context=None):
|
||||
hr_evaluation_obj = self.pool.get('hr_evaluation.evaluation')
|
||||
if context is None:
|
||||
context = {}
|
||||
evaluation_data = self.read(cr, uid, ids, context=context)[0]
|
||||
for waiting_id in hr_evaluation_obj.browse(cr, uid, evaluation_data['evaluation_id'], context=context).survey_request_ids:
|
||||
if waiting_id.state == "waiting_answer" and waiting_id.user_to_review_id.work_email :
|
||||
|
||||
@@ -25,7 +25,9 @@ from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
def _employee_get(obj, cr, uid, context=None):
|
||||
ids = obj.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)])
|
||||
if context is None:
|
||||
context = {}
|
||||
ids = obj.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)], context=context)
|
||||
if ids:
|
||||
return ids[0]
|
||||
return False
|
||||
@@ -33,21 +35,27 @@ def _employee_get(obj, cr, uid, context=None):
|
||||
class hr_expense_expense(osv.osv):
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if not default: default = {}
|
||||
default.update({'invoice_id': False, 'date_confirm': False, 'date_valid': False, 'user_valid': False})
|
||||
return super(hr_expense_expense, self).copy(cr, uid, id, default, context)
|
||||
return super(hr_expense_expense, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def _amount(self, cr, uid, ids, field_name, arg, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
cr.execute("SELECT s.id,COALESCE(SUM(l.unit_amount*l.unit_quantity),0) AS amount FROM hr_expense_expense s LEFT OUTER JOIN hr_expense_line l ON (s.id=l.expense_id) WHERE s.id IN %s GROUP BY s.id ", (tuple(ids),))
|
||||
res = dict(cr.fetchall())
|
||||
return res
|
||||
|
||||
def _get_currency(self, cr, uid, context=None):
|
||||
user = self.pool.get('res.users').browse(cr, uid, [uid])[0]
|
||||
if context is None:
|
||||
context = {}
|
||||
user = self.pool.get('res.users').browse(cr, uid, [uid], context=context)[0]
|
||||
if user.company_id:
|
||||
return user.company_id.currency_id.id
|
||||
else:
|
||||
return self.pool.get('res.currency').search(cr, uid, [('rate','=',1.0)])[0]
|
||||
return self.pool.get('res.currency').search(cr, uid, [('rate','=',1.0)], context=context)[0]
|
||||
|
||||
_name = "hr.expense.expense"
|
||||
_description = "Expense"
|
||||
@@ -115,6 +123,8 @@ class hr_expense_expense(osv.osv):
|
||||
def action_invoice_create(self, cr, uid, ids):
|
||||
res = False
|
||||
invoice_obj = self.pool.get('account.invoice')
|
||||
property_obj = self.pool.get('ir.property')
|
||||
sequence_obj = self.pool.get('ir.sequence')
|
||||
for exp in self.browse(cr, uid, ids):
|
||||
lines = []
|
||||
for l in exp.line_ids:
|
||||
@@ -125,7 +135,7 @@ class hr_expense_expense(osv.osv):
|
||||
acc = l.product_id.categ_id.property_account_expense_categ
|
||||
tax_id = [x.id for x in l.product_id.supplier_taxes_id]
|
||||
else:
|
||||
acc = self.pool.get('ir.property').get(cr, uid, 'property_account_expense_categ', 'product.category')
|
||||
acc = property_obj.get(cr, uid, 'property_account_expense_categ', 'product.category')
|
||||
if not acc:
|
||||
raise osv.except_osv(_('Error !'), _('Please configure Default Expanse account for Product purchase, `property_account_expense_categ`'))
|
||||
|
||||
@@ -145,7 +155,7 @@ class hr_expense_expense(osv.osv):
|
||||
payment_term_id = exp.employee_id.address_id.partner_id.property_payment_term.id
|
||||
inv = {
|
||||
'name': exp.name,
|
||||
'reference': self.pool.get('ir.sequence').get(cr, uid, 'hr.expense.invoice'),
|
||||
'reference': sequence_obj.get(cr, uid, 'hr.expense.invoice'),
|
||||
'account_id': acc,
|
||||
'type': 'in_invoice',
|
||||
'partner_id': exp.employee_id.address_id.partner_id.id,
|
||||
@@ -184,6 +194,8 @@ class hr_expense_line(osv.osv):
|
||||
_description = "Expense Line"
|
||||
|
||||
def _amount(self, cr, uid, ids, field_name, arg, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if not len(ids):
|
||||
return {}
|
||||
cr.execute("SELECT l.id,COALESCE(SUM(l.unit_amount*l.unit_quantity),0) AS amount FROM hr_expense_line l WHERE id IN %s GROUP BY l.id ",(tuple(ids),))
|
||||
@@ -215,16 +227,16 @@ class hr_expense_line(osv.osv):
|
||||
context = {}
|
||||
v = {}
|
||||
if product_id:
|
||||
product=self.pool.get('product.product').browse(cr, uid, product_id, context=context)
|
||||
v['name']=product.name
|
||||
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
|
||||
v['name'] = product.name
|
||||
# Compute based on pricetype of employee company
|
||||
pricetype_id = self.pool.get('hr.employee').browse(cr, uid, employee_id).user_id.company_id.property_valuation_price_type.id
|
||||
context['currency_id']=self.pool.get('hr.employee').browse(cr, uid, employee_id).user_id.company_id.currency_id.id
|
||||
pricetype=self.pool.get('product.price.type').browse(cr, uid, pricetype_id)
|
||||
amount_unit=product.price_get(pricetype.field, context)[product.id]
|
||||
v['unit_amount']=amount_unit
|
||||
pricetype_id = self.pool.get('hr.employee').browse(cr, uid, employee_id, context=context).user_id.company_id.property_valuation_price_type.id
|
||||
context['currency_id'] = self.pool.get('hr.employee').browse(cr, uid, employee_id, context=context).user_id.company_id.currency_id.id
|
||||
pricetype = self.pool.get('product.price.type').browse(cr, uid, pricetype_id, context=context)
|
||||
amount_unit = product.price_get(pricetype.field, context)[product.id]
|
||||
v['unit_amount'] = amount_unit
|
||||
if not uom_id:
|
||||
v['uom_id']=product.uom_id.id
|
||||
v['uom_id'] = product.uom_id.id
|
||||
return {'value': v}
|
||||
|
||||
hr_expense_line()
|
||||
|
||||
@@ -33,8 +33,10 @@ class hr_holidays_status(osv.osv):
|
||||
_description = "Leave Type"
|
||||
|
||||
def get_days_cat(self, cr, uid, ids, category_id, return_false, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
res = {}
|
||||
for record in self.browse(cr, uid, ids, context):
|
||||
for record in self.browse(cr, uid, ids, context=context):
|
||||
res[record.id] = {}
|
||||
max_leaves = leaves_taken = 0
|
||||
if not return_false:
|
||||
@@ -50,6 +52,8 @@ class hr_holidays_status(osv.osv):
|
||||
return res
|
||||
|
||||
def get_days(self, cr, uid, ids, employee_id, return_false, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
res = {}
|
||||
for record in self.browse(cr, uid, ids, context=context):
|
||||
res[record.id] = {}
|
||||
@@ -67,16 +71,18 @@ class hr_holidays_status(osv.osv):
|
||||
return res
|
||||
|
||||
def _user_left_days(self, cr, uid, ids, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
return_false = False
|
||||
employee_id = False
|
||||
res = {}
|
||||
|
||||
|
||||
if context and context.has_key('employee_id'):
|
||||
if not context['employee_id']:
|
||||
return_false = True
|
||||
employee_id = context['employee_id']
|
||||
else:
|
||||
employee_ids = self.pool.get('hr.employee').search(cr, uid, [('user_id','=',uid)])
|
||||
employee_ids = self.pool.get('hr.employee').search(cr, uid, [('user_id','=',uid)], context=context)
|
||||
if employee_ids:
|
||||
employee_id = employee_ids[0]
|
||||
else:
|
||||
@@ -112,7 +118,9 @@ class hr_holidays(osv.osv):
|
||||
_order = "type desc, date_from asc"
|
||||
|
||||
def _employee_get(obj, cr, uid, context=None):
|
||||
ids = obj.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)])
|
||||
if context is None:
|
||||
context = {}
|
||||
ids = obj.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)], context=context)
|
||||
if ids:
|
||||
return ids[0]
|
||||
return False
|
||||
@@ -152,13 +160,17 @@ class hr_holidays(osv.osv):
|
||||
|
||||
def _create_resource_leave(self, cr, uid, vals, context=None):
|
||||
'''This method will create entry in resource calendar leave object at the time of holidays validated '''
|
||||
if context is None:
|
||||
context = {}
|
||||
obj_res_leave = self.pool.get('resource.calendar.leaves')
|
||||
return obj_res_leave.create(cr, uid, vals)
|
||||
return obj_res_leave.create(cr, uid, vals, context=context)
|
||||
|
||||
def _remove_resouce_leave(self, cr, uid, ids, context=None):
|
||||
'''This method will create entry in resource calendar leave object at the time of holidays cancel/removed'''
|
||||
obj_res_leave = self.pool.get('resource.calendar.leaves')
|
||||
leave_ids = obj_res_leave.search(cr, uid, [('holiday_id', 'in', ids)])
|
||||
if context is None:
|
||||
context = {}
|
||||
leave_ids = obj_res_leave.search(cr, uid, [('holiday_id', 'in', ids)], context=context)
|
||||
return obj_res_leave.unlink(cr, uid, leave_ids)
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
@@ -231,6 +243,8 @@ class hr_holidays(osv.osv):
|
||||
_constraints = [(_check_date, 'Start date should not be larger than end date!\nNumber of Days should be greater than 1!', ['number_of_days_temp'])]
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
self._update_user_holidays(cr, uid, ids)
|
||||
self._remove_resouce_leave(cr, uid, ids, context=context)
|
||||
return super(hr_holidays, self).unlink(cr, uid, ids, context)
|
||||
@@ -252,9 +266,11 @@ class hr_holidays(osv.osv):
|
||||
return self.onchange_date_from(cr, uid, ids, date_to, date_from)
|
||||
|
||||
def onchange_sec_id(self, cr, uid, ids, status, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
warning = {}
|
||||
if status:
|
||||
brows_obj = self.pool.get('hr.holidays.status').browse(cr, uid, [status])[0]
|
||||
brows_obj = self.pool.get('hr.holidays.status').browse(cr, uid, [status], context=context)[0]
|
||||
if brows_obj.categ_id and brows_obj.categ_id.section_id and not brows_obj.categ_id.section_id.allow_unlink:
|
||||
warning = {
|
||||
'title': "Warning for ",
|
||||
@@ -369,6 +385,9 @@ class hr_holidays(osv.osv):
|
||||
return True
|
||||
|
||||
def check_holidays(self, cr, uid, ids):
|
||||
holi_status_obj = self.pool.get('hr.holidays.status')
|
||||
emp_obj = self.pool.get('hr.employee')
|
||||
meeting_obj = self.pool.get('crm.meeting')
|
||||
for record in self.browse(cr, uid, ids):
|
||||
if not record.number_of_days:
|
||||
raise osv.except_osv(_('Warning!'), _('Wrong leave definition.'))
|
||||
@@ -376,14 +395,14 @@ class hr_holidays(osv.osv):
|
||||
leave_asked = record.number_of_days
|
||||
if leave_asked < 0.00:
|
||||
if not record.holiday_status_id.limit:
|
||||
leaves_rest = self.pool.get('hr.holidays.status').get_days(cr, uid, [record.holiday_status_id.id], record.employee_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
|
||||
leaves_rest = holi_status_obj.get_days(cr, uid, [record.holiday_status_id.id], record.employee_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
|
||||
if leaves_rest < -(leave_asked):
|
||||
raise osv.except_osv(_('Warning!'),_('You Cannot Validate leaves while available leaves are less than asked leaves.'))
|
||||
elif record.holiday_type == 'category' and record.category_id:
|
||||
leave_asked = record.number_of_days
|
||||
if leave_asked < 0.00:
|
||||
if not record.holiday_status_id.limit:
|
||||
leaves_rest = self.pool.get('hr.holidays.status').get_days_cat(cr, uid, [record.holiday_status_id.id], record.category_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
|
||||
leaves_rest = holi_status_obj.get_days_cat(cr, uid, [record.holiday_status_id.id], record.category_id.id, False)[record.holiday_status_id.id]['remaining_leaves']
|
||||
if leaves_rest < -(leave_asked):
|
||||
raise osv.except_osv(_('Warning!'),_('You Cannot Validate leaves while available leaves are less than asked leaves.'))
|
||||
else:# This condition will never meet!!
|
||||
@@ -401,10 +420,10 @@ class hr_holidays(osv.osv):
|
||||
'allocation_type': record.allocation_type,
|
||||
'parent_id': record.id,
|
||||
}
|
||||
employee_ids = self.pool.get('hr.employee').search(cr, uid, [])
|
||||
employee_ids = emp_obj.search(cr, uid, [])
|
||||
for employee in employee_ids:
|
||||
vals['employee_id'] = employee
|
||||
user_id = self.pool.get('hr.employee').search(cr, uid, [('user_id','=',uid)])
|
||||
user_id = emp_obj.search(cr, uid, [('user_id','=',uid)])
|
||||
if user_id:
|
||||
vals['user_id'] = user_id[0]
|
||||
holiday_ids.append(self.create(cr, uid, vals, context=None))
|
||||
@@ -435,7 +454,7 @@ class hr_holidays(osv.osv):
|
||||
'user_id' : record.user_id.id,
|
||||
'date' : record.date_from,
|
||||
}
|
||||
case_id = self.pool.get('crm.meeting').create(cr, uid, vals)
|
||||
case_id = meeting_obj.create(cr, uid, vals)
|
||||
self.write(cr, uid, ids, {'case_id': case_id})
|
||||
|
||||
return True
|
||||
|
||||
@@ -41,7 +41,7 @@ class hr_holidays_summary_dept(osv.osv_memory):
|
||||
def print_report(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
data = self.read(cr, uid, ids, [], context=context)[0]
|
||||
if not data['depts']:
|
||||
raise osv.except_osv(_('Error'), _('You have to select at least 1 Department. And try again'))
|
||||
datas = {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user