bzr revid: pap@tinyerp.co.in-20100727051921-y7ha4u0krmy73i3d
This commit is contained in:
pap (openerp)
2010-07-27 10:49:21 +05:30
203 changed files with 10122 additions and 3956 deletions
+93 -76
View File
@@ -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()
@@ -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,10 +694,13 @@ class account_journal(osv.osv):
res.update({
'sequence_id':seq_id
})
if not journal.invoice_sequence_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':seq_id
'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]
+27
View File
@@ -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
+41 -32
View File
@@ -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(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',
+14 -3
View File
@@ -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">
+25 -16
View File
@@ -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>
+37 -8
View File
@@ -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
@@ -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\',\'&lt;&gt;\',\'view\'), (\'type\',\'&lt;&gt;\',\'closed\')]" on_change="onchange_account_id(account_id, partner_id)"')
elif field == 'partner_id':
attrs.append('on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"')
# elif field == '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()
+200 -116
View File
@@ -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
@@ -414,18 +428,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 +453,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 +473,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 +498,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 +552,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 +578,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 +679,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 +915,69 @@
<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','&lt;&gt;','view'),('type','&lt;&gt;','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','&lt;&gt;','view'),('type','&lt;&gt;','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>
<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 colspan="4" string="State"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="reconcile_id"/>
<field name="reconcile_partial_id"/>
<field name="state"/>
</page>
<page string="Analytic Lines">
<field colspan="4" name="analytic_lines" nolabel="1" 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>
@@ -1001,8 +1055,11 @@
<search string="Search Entry Lines">
<group col='10' colspan='4'>
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Entry Lines"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','valid')]" help="Posted Entry Lines"/>
<separator orientation="vertical"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','valid')]" help="Posted Entry Lines"/>
<filter icon="terp-stock_symbol-selection" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Entry Lines"/>
<separator orientation="vertical"/>
<filter icon="terp-stock_symbol-selection" string="Unreconciled" domain="[('reconcile_id','=',False), ('account_id.type','in',['receivable', 'payable'])]" help="Unreconciled Entry Lines"/>
<field name="date" select='1'/>
<field name="account_id" select='1'/>
<field name="partner_id" select='1'>
@@ -1012,8 +1069,8 @@
</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}"/>
</group>
</search>
</field>
@@ -1043,6 +1100,17 @@
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 +1122,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,15 +1139,18 @@
<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"/>
@@ -1125,20 +1195,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>
@@ -1155,28 +1218,34 @@
<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"/>
<separator orientation="vertical"/>
<field name="date" select='1'/>
<field name="name" select='1'/>
<field name="journal_id" select='1'/>
<field name="partner_id" 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 +1274,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 +1307,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 +1319,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"/>
@@ -2272,7 +2339,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 +2353,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 +2420,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 +2434,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 +2455,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 +2478,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 +2512,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>
+6 -10
View File
@@ -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>
+12 -12
View File
@@ -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
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff
+762 -261
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -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-07-18 14:54+0000\n"
"PO-Revision-Date: 2010-07-21 07:21+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <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-07-21 03:43+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -3719,7 +3719,7 @@ msgstr "Wprowadzanie zapisów"
#: wizard_view:account.invoice.refund,init:0
#: model:ir.actions.wizard,name:account.wizard_invoice_refund
msgid "Credit Note"
msgstr "Nota kredytowa"
msgstr "Korekta"
#. module: account
#: model:ir.actions.todo,note:account.config_fiscalyear
@@ -4426,7 +4426,7 @@ msgstr "Zaksięgowano"
#: view:account.tax:0
#: view:account.tax.template:0
msgid "Credit Notes"
msgstr "Nota kredytowa"
msgstr "Korekty"
#. module: account
#: field:account.config.wizard,date2:0
+18 -18
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-07-16 01:13+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.com>\n"
"PO-Revision-Date: 2010-07-22 01:32+0000\n"
"Last-Translator: digitalsatori <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-07-17 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-07-23 04:08+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -35,7 +35,7 @@ msgstr "未支付的采购发票"
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_entries
msgid "Entries Encoding"
msgstr "录入的记录"
msgstr "分录录入"
#. module: account
#: model:ir.actions.todo,note:account.config_wizard_account_base_setup_form
@@ -55,7 +55,7 @@ msgstr "资产"
#. module: account
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "在动作定义使用了无效的模块名。"
msgstr "在动作定义使用了无效的模式名称。"
#. module: account
#: help:account.journal,currency:0
@@ -87,14 +87,14 @@ msgstr "对账结果"
#. module: account
#: model:ir.actions.act_window,name:account.act_account_acount_move_line_open_unreconciled
msgid "Unreconciled entries"
msgstr "取消核销"
msgstr "未对账分录"
#. module: account
#: field:account.invoice.tax,base_code_id:0
#: field:account.tax,base_code_id:0
#: field:account.tax.template,base_code_id:0
msgid "Base Code"
msgstr "基于的税务"
msgstr ""
#. module: account
#: view:account.account:0
@@ -115,7 +115,7 @@ msgstr "上级科目"
#. module: account
#: selection:account.move,type:0
msgid "Journal Voucher"
msgstr "原始凭证集合"
msgstr ""
#. module: account
#: field:account.invoice,residual:0
@@ -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
+8 -4
View File
@@ -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:
+4 -2
View File
@@ -235,7 +235,7 @@ class account_invoice(osv.osv):
'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'),
@@ -890,7 +890,9 @@ class account_invoice(osv.osv):
new_move_name = self.pool.get('account.move').browse(cr, uid, move_id).name
# make the invoice point to that move
self.write(cr, uid, [inv.id], {'move_id': move_id,'period_id':period_id, 'move_name':new_move_name})
self.pool.get('account.move').post(cr, uid, [move_id])
# Pass invoice in context in method post: used if you want to get the same
# account move reference when creating the same invoice after a cancelled one:
self.pool.get('account.move').post(cr, uid, [move_id], context={'invoice':inv})
self._log_event(cr, uid, ids)
return True
@@ -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>
@@ -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>
@@ -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()
@@ -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"/>
+1
View File
@@ -20,6 +20,7 @@
##############################################################################
import account_coda_import
import coda_import
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -208,7 +208,8 @@ class account_coda_import(osv.osv_memory):
line=lines[value]
reconcile_id = False
if line['toreconcile']:
rec_id = move_line_obj.search(cr, uid, [('name', '=', line['name']), ('reconcile_id', '=', False), ('account_id.reconcile', '=', True)])
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 = statement_reconcile_obj.create(cr, uid, {
'line_ids': [(6, 0, rec_id)]
@@ -296,4 +297,4 @@ class account_coda_import(osv.osv_memory):
account_coda_import()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+347
View File
@@ -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:
@@ -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>
+2 -1
View File
@@ -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)
+15 -3
View File
@@ -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"/>
+266
View File
@@ -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"
+270
View File
@@ -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"
+1 -1
View File
@@ -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"/>
+1 -1
View File
@@ -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"
+22 -9
View File
@@ -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."),
@@ -124,10 +125,22 @@ 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'])
if model_name:
mod_name = model_name[0]['model']
res['domain'] = {'filter_id': [('model_id','=',mod_name)]}
else:
res['value'] = {'filter_id':False}
return res
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
@@ -164,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))
@@ -246,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:
@@ -344,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"/>
<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">
-1
View File
@@ -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',
+46 -46
View File
@@ -1,43 +1,43 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_contact
#
# * base_contact
# Giedrius Slavinskas <giedrius.slavinskas@gmail.com>, 2010.
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Project-Id-Version: OpenERP Server 5.0.1\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-07-20 21:26+0000\n"
"PO-Revision-Date: 2010-07-21 07:52+0000\n"
"Last-Translator: Giedrius Slavinskas <giedrius.slavinskas@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-21 03:43+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"Language: lt\n"
#. module: base_contact
#: field:res.partner.job,sequence_contact:0
msgid "Contact Seq."
msgstr "Kontaktų seka"
msgstr "Kontakto seka"
#. module: base_contact
#: model:ir.model,name:base_contact.model_res_partner_contact
msgid "res.partner.contact"
msgstr "res.partner.contact"
msgstr "Partnerių kontaktai"
#. module: base_contact
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Objekto pavadinimas turi prasidėti su x_ ir jame negali būti specialių "
"simbolių!"
"Objekto pavadinimas turi prasidėti x_ ir neturėti jokių specialių simbolių !"
#. module: base_contact
#: field:res.partner.job,function_id:0
msgid "Partner Function"
msgstr ""
msgstr "Partnerio pareigos"
#. module: base_contact
#: model:ir.actions.act_window,name:base_contact.action_partner_contact_form
@@ -52,7 +52,7 @@ msgstr "Kontaktai"
#. module: base_contact
#: field:res.partner.job,sequence_partner:0
msgid "Partner Seq."
msgstr "Partnerių seka"
msgstr "Partnerio seka"
#. module: base_contact
#: selection:res.partner.job,state:0
@@ -92,22 +92,22 @@ msgstr ""
#. module: base_contact
#: view:res.partner.address:0
msgid "# of Contacts"
msgstr ""
msgstr "Kontaktai"
#. module: base_contact
#: help:res.partner.job,other:0
msgid "Additional phone field"
msgstr ""
msgstr "Papildomos informacijos laukas"
#. module: base_contact
#: model:process.node,name:base_contact.process_node_function0
msgid "Function"
msgstr "Funkcija"
msgstr "Adresas"
#. module: base_contact
#: field:res.partner.job,fax:0
msgid "Fax"
msgstr ""
msgstr "Faksas"
#. module: base_contact
#: field:res.partner.contact,lang_id:0
@@ -117,7 +117,7 @@ msgstr "Kalba"
#. module: base_contact
#: field:res.partner.job,phone:0
msgid "Phone"
msgstr "Tel. Nr."
msgstr "Telefonas"
#. module: base_contact
#: model:process.transition,note:base_contact.process_transition_contacttofunction0
@@ -127,12 +127,12 @@ msgstr ""
#. module: base_contact
#: field:res.partner.contact,title:0
msgid "Title"
msgstr ""
msgstr "Antraštė"
#. module: base_contact
#: view:res.partner.job:0
msgid "Contact Functions"
msgstr ""
msgstr "Kontaktų pareigos"
#. module: base_contact
#: model:ir.module.module,shortdesc:base_contact.module_meta_information
@@ -144,7 +144,7 @@ msgstr ""
msgid ""
"Order of importance of this job title in the list of job title of the linked "
"partner"
msgstr ""
msgstr "Pareigos pagal svarbumą susijusiam partneriui."
#. module: base_contact
#: field:res.partner.contact,email:0
@@ -155,7 +155,7 @@ msgstr "El. paštas"
#. module: base_contact
#: field:res.partner.job,date_stop:0
msgid "Date Stop"
msgstr ""
msgstr "Pabaigos data"
#. module: base_contact
#: view:res.partner:0
@@ -167,25 +167,25 @@ msgstr "Adresas"
#: model:ir.actions.act_window,name:base_contact.action_res_partner_job
#: model:ir.ui.menu,name:base_contact.menu_action_res_partner_job
msgid "Contact's Jobs"
msgstr ""
msgstr "Kontaktų pareigos"
#. module: base_contact
#: field:res.partner.contact,country_id:0
msgid "Nationality"
msgstr ""
msgstr "Tautybė"
#. module: base_contact
#: help:res.partner.job,sequence_contact:0
msgid ""
"Order of importance of this address in the list of addresses of the linked "
"contact"
msgstr ""
msgstr "Adresai pagal svarbumą sąraše."
#. module: base_contact
#: field:res.partner.address,job_id:0
#: field:res.partner.contact,job_id:0
msgid "Main Job"
msgstr ""
msgstr "Pagrindinės pareigos"
#. module: base_contact
#: view:res.partner:0
@@ -195,17 +195,17 @@ msgstr "Kategorijos"
#. module: base_contact
#: field:res.partner.contact,function_id:0
msgid "Main Function"
msgstr ""
msgstr "Pagrindinė funkcija"
#. module: base_contact
#: model:process.transition,note:base_contact.process_transition_partnertoaddress0
msgid "Define partners and their addresses."
msgstr ""
msgstr "Pasirinkite partnerius ir jų adresus"
#. module: base_contact
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "Netinkamas XML peržiūros struktūrai!"
#. module: base_contact
#: model:process.process,name:base_contact.process_process_basecontactprocess0
@@ -215,58 +215,58 @@ msgstr ""
#. module: base_contact
#: view:res.partner.contact:0
msgid "Seq."
msgstr ""
msgstr "Seka"
#. module: base_contact
#: field:res.partner.job,extension:0
msgid "Extension"
msgstr ""
msgstr "Papildomas telefonas"
#. module: base_contact
#: field:res.partner.contact,mobile:0
msgid "Mobile"
msgstr "Mob. tel."
msgstr "Mobilus telefonas"
#. module: base_contact
#: help:res.partner.job,extension:0
msgid "Internal/External extension phone number"
msgstr ""
msgstr "Vidinis/išorinis papildomas telefono numeris"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_contacts0
msgid "People you work with."
msgstr ""
msgstr "Bendradarbiai"
#. module: base_contact
#: view:res.partner.contact:0
msgid "Extra Information"
msgstr ""
msgstr "Papildoma informacija"
#. module: base_contact
#: view:res.partner.contact:0
#: field:res.partner.contact,job_ids:0
msgid "Functions and Addresses"
msgstr ""
msgstr "Pareigos ir adresai"
#. module: base_contact
#: field:res.partner.contact,active:0
msgid "Active"
msgstr ""
msgstr "Aktyvus"
#. module: base_contact
#: field:res.partner.job,contact_id:0
msgid "Contact"
msgstr "Kontaktai"
msgstr "Kontaktas"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_partners0
msgid "Companies you work with."
msgstr ""
msgstr "Įmonė kurioje jūs dirbate."
#. module: base_contact
#: field:res.partner.contact,partner_id:0
msgid "Main Employer"
msgstr ""
msgstr "Pagrindinis darbdavys"
#. module: base_contact
#: model:process.transition,name:base_contact.process_transition_functiontoaddress0
@@ -281,7 +281,7 @@ msgstr "Partnerių kontaktai"
#. module: base_contact
#: view:res.partner.contact:0
msgid "Partner Contact"
msgstr "Partnerio kontaktas"
msgstr "Partnerio kontaktai"
#. module: base_contact
#: model:process.node,name:base_contact.process_node_partners0
@@ -297,12 +297,12 @@ msgstr "Adresai"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_addresses0
msgid "Working and private addresses."
msgstr ""
msgstr "Darbo ir asmeninis adresai."
#. module: base_contact
#: field:res.partner.contact,name:0
msgid "Last Name"
msgstr ""
msgstr "Pavardė"
#. module: base_contact
#: field:res.partner.job,state:0
@@ -313,22 +313,22 @@ msgstr "Būsena"
#: view:res.partner.contact:0
#: view:res.partner.job:0
msgid "General"
msgstr "Bendras"
msgstr "Bendrasis"
#. module: base_contact
#: selection:res.partner.job,state:0
msgid "Past"
msgstr ""
msgstr "Buvęs"
#. module: base_contact
#: view:res.partner.contact:0
msgid "General Information"
msgstr "Bendra informacija"
msgstr "Bendroji informacija"
#. module: base_contact
#: model:process.node,note:base_contact.process_node_function0
msgid "Jobs at a same partner address."
msgstr ""
msgstr "Darbai su to paties partnerio adresu."
#. module: base_contact
#: field:res.partner.job,name:0
@@ -348,7 +348,7 @@ msgstr ""
#. module: base_contact
#: field:res.partner.contact,website:0
msgid "Website"
msgstr "Interneto svetainė"
msgstr "Svetainė"
#. module: base_contact
#: field:res.partner.contact,birthdate:0
+3 -1
View File
@@ -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,
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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">
+1 -1
View File
@@ -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-21 03:43+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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
View File
@@ -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):
+1 -1
View File
@@ -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>
+3 -3
View File
@@ -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
+15 -1
View File
@@ -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):
+5 -5
View File
@@ -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
+360 -330
View File
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -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 + ['---'])
+1 -1
View File
@@ -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 = {
+1 -1
View File
@@ -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 = {
+1 -1
View File
@@ -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 = {
-1
View File
@@ -56,7 +56,6 @@
id="menu_reports_document"
parent="menu_reporting"
sequence="0"
icon="terp-graph"
groups="document.group_document_manager"/>
+1 -1
View File
@@ -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-21 03:43+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document
+1 -1
View File
@@ -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"
+3 -3
View File
@@ -48,9 +48,9 @@
],
'demo_xml': [
'hr_demo.xml',
'hr_department_demo.xml'
],
'test': ['test/test_hr.yml'],
'hr_department_demo.xml',
],
'test': ['test/test_hr.yml'],
'installable': True,
'active': False,
'certificate': '0086710558965',
+2 -2
View File
@@ -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"
+39 -4
View File
@@ -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 [])
@@ -78,7 +82,7 @@ class hr_job(osv.osv):
'requirements': fields.text('Requirements'),
'department_id': fields.many2one('hr.department', 'Department'),
'company_id': fields.many2one('res.company', 'Company'),
'state': fields.selection([('open', 'Open'),('old', 'Old'),('recruit', 'In Recruitement')], 'State', required=True),
'state': fields.selection([('open', 'Open'),('old', 'Old'),('recruit', 'In Recruitement')], 'State', readonly=True, required=True),
}
_defaults = {
'expected_employees': 1,
@@ -86,6 +90,18 @@ class hr_job(osv.osv):
'state': 'open'
}
def job_old(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state': 'old'})
return True
def job_recruitement(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state': 'recruit'})
return True
def job_open(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state': 'open'})
return True
hr_job()
class hr_employee(osv.osv):
@@ -102,7 +118,7 @@ class hr_employee(osv.osv):
'marital': fields.many2one('hr.employee.marital.status', 'Marital Status'),
'bank_account': fields.char('Bank Account', size=64),
'partner_id': fields.related('company_id', 'partner_id', type='many2one', relation='res.partner', readonly=True),
'department_id':fields.many2one('hr.department','Department'),
'department_id':fields.many2one('hr.department', 'Department'),
'address_id': fields.many2one('res.partner.address', 'Working Address'),
'address_home_id': fields.many2one('res.partner.address', 'Home Address'),
'work_phone': fields.related('address_id', 'phone', type='char', string='Work Phone', readonly=True),
@@ -110,15 +126,19 @@ class hr_employee(osv.osv):
'work_location': fields.char('Office Location', size=32),
'notes': fields.text('Notes'),
'parent_id': fields.many2one('hr.employee', 'Manager', select=True),
'category_id': fields.many2one('hr.employee.category', 'Category'),
# 'parent_id': fields.related('department_id', 'manager_id', string='Manager', type='many2one'),
# 'category_id': fields.many2one('hr.employee.category', 'Category'),
'category_ids': fields.many2many('hr.employee.category', 'employee_category_rel','category_id','emp_id','Category'),
'child_ids': fields.one2many('hr.employee', 'parent_id', 'Subordinates'),
'resource_id': fields.many2one('resource.resource', 'Resource', ondelete='cascade'),
'coach_id': fields.many2one('res.users', 'Coach'),
'coach_id': fields.many2one('hr.employee', 'Coach'),
'job_id': fields.many2one('hr.job', 'Job'),
'photo': fields.binary('Photo')
}
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')
@@ -129,6 +149,8 @@ class hr_employee(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 where id IN %s',(tuple(ids),))
@@ -144,4 +166,17 @@ class hr_employee(osv.osv):
hr_employee()
class hr_department(osv.osv):
_description = "Department"
_inherit = 'hr.department'
_columns = {
'manager_id': fields.many2one('hr.employee', 'Manager'),
# 'member_ids': fields.many2many('hr.employee', 'hr_department_user_rel', 'department_id', 'user_id', 'Members'),
'member_ids': fields.one2many('hr.employee', 'department_id', 'Members'),
# finding problem to implement one2many field as "hr_departmen_user_rel" is used in another module query
}
hr_department()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+15 -14
View File
@@ -4,38 +4,38 @@
<!-- Employee Category -->
<record id="category1" model="hr.employee.category">
<record id="category_ceo" model="hr.employee.category">
<field name="name">CEO</field>
</record>
<record id="category2" model="hr.employee.category">
<record id="category_cto" model="hr.employee.category">
<field name="name">CTO</field>
<field name="parent_id" ref="category1"/>
<field name="parent_id" ref="category_ceo"/>
</record>
<record id="category3" model="hr.employee.category">
<record id="category_managers" model="hr.employee.category">
<field name="name">Managers(Tech. Heads)</field>
<field name="parent_id" ref="category2"/>
<field name="parent_id" ref="category_cto"/>
</record>
<record id="category4" model="hr.employee.category">
<record id="category_project_managers" model="hr.employee.category">
<field name="name">Project Managers</field>
<field name="parent_id" ref="category3"/>
<field name="parent_id" ref="category_managers"/>
</record>
<record id="category5" model="hr.employee.category">
<record id="category_sr_exec" model="hr.employee.category">
<field name="name">Sr. Executives(Team Leads)</field>
<field name="parent_id" ref="category4"/>
<field name="parent_id" ref="category_project_managers"/>
</record>
<record id="category6" model="hr.employee.category">
<record id="category_jr_exec" model="hr.employee.category">
<field name="name">Jr. Executives(Developers)</field>
<field name="parent_id" ref="category5"/>
<field name="parent_id" ref="category_sr_exec"/>
</record>
<record id="category7" model="hr.employee.category">
<record id="category_trainee" model="hr.employee.category">
<field name="name">Trainee(Intership)</field>
<field name="parent_id" ref="category6"/>
<field name="parent_id" ref="category_jr_exec"/>
</record>
@@ -46,9 +46,10 @@
<field name="calendar_id" ref="resource.timesheet_group1"/>
<!--<field name="regime">45</field>-->
<field name="user_id" ref="base.user_root"/>
<field name="category_id" ref="hr.category1"/>
<field name="category_id" ref="hr.category_ceo"/>
<!--<field name="holiday_max">25</field>-->
</record>
</data>
</openerp>
+26 -13
View File
@@ -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)
@@ -50,8 +52,8 @@ class hr_department(osv.osv):
'parent_id': fields.many2one('hr.department', 'Parent Department', select=True),
'child_ids': fields.one2many('hr.department', 'parent_id', 'Child Departments'),
'note': fields.text('Note'),
'manager_id': fields.many2one('res.users', 'Manager', required=True),
'member_ids': fields.many2many('res.users', 'hr_department_user_rel', 'department_id', 'user_id', 'Members'),
# 'manager_id': fields.many2one('res.users', 'Manager'),
# 'member_ids': fields.many2many('res.users', 'hr_department_user_rel', 'department_id', 'user_id', 'Members'),
}
_defaults = {
@@ -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':
+56 -8
View File
@@ -5,57 +5,105 @@
<record id="dep_management" model="hr.department">
<field name="name">Management</field>
<field name="company_id" ref="base.main_company"/>
<field name="manager_id" ref="base.user_root"/>
<field name="manager_id" ref="employee1"/>
</record>
<record id="dep_administration" model="hr.department">
<field name="name">Administration</field>
<field name="parent_id" ref="dep_management"/>
<field name="company_id" ref="base.main_company"/>
<field name="manager_id" ref="base.user_root"/>
<field name="manager_id" ref="employee1"/>
</record>
<record id="dep_technical" model="hr.department">
<field name="name">Technical department</field>
<field name="parent_id" ref="dep_management"/>
<field name="company_id" ref="base.main_company"/>
<field name="manager_id" ref="base.user_root"/>
<field name="manager_id" ref="employee1"/>
</record>
<record id="dep_it" model="hr.department">
<field name="name">IT</field>
<field name="parent_id" ref="dep_technical"/>
<field name="company_id" ref="base.main_company"/>
<field name="manager_id" ref="base.user_root"/>
<field name="manager_id" ref="employee1"/>
</record>
<record id="dep_marketing" model="hr.department">
<field name="name">Marketing</field>
<field name="parent_id" ref="dep_management"/>
<field name="company_id" ref="base.main_company"/>
<field name="manager_id" ref="base.user_root"/>
<field name="manager_id" ref="employee1"/>
</record>
<record id="dep_sales" model="hr.department">
<field name="name">Sales</field>
<field name="company_id" ref="base.main_company"/>
<field name="manager_id" ref="base.user_root"/>
<field name="manager_id" ref="employee1"/>
<field name="parent_id" ref="dep_management"/>
</record>
<record id="dep_sales_europe" model="hr.department">
<field name="name">Sales Europe</field>
<field name="company_id" ref="base.main_company"/>
<field name="manager_id" ref="base.user_root"/>
<field name="manager_id" ref="employee1"/>
<field name="parent_id" ref="dep_sales"/>
</record>
<record id="dep_sales_america" model="hr.department">
<field name="name">Sales America</field>
<field name="company_id" ref="base.main_company"/>
<field name="manager_id" ref="base.user_root"/>
<field name="manager_id" ref="employee1"/>
<field name="parent_id" ref="dep_sales"/>
</record>
<!-- HR Jobs -->
<record id="job_ceo" model="hr.job">
<field name="name">CEO</field>
<field name="department_id" ref="dep_management"/>
</record>
<record id="job_cto" model="hr.job">
<field name="name">CTO</field>
<field name="department_id" ref="dep_technical"/>
</record>
<record id="job_hr_manager" model="hr.job">
<field name="name">HR Manager</field>
<field name="department_id" ref="dep_management"/>
</record>
<record id="job_project_managers" model="hr.job">
<field name="name">Project Managers</field>
<field name="department_id" ref="dep_it"/>
</record>
<record id="job_sr_appli" model="hr.job">
<field name="name">Senior Application Analyst</field>
<field name="department_id" ref="dep_it"/>
</record>
<record id="job_jr_appli" model="hr.job">
<field name="name">Junior Application Analyst</field>
<field name="department_id" ref="dep_it"/>
</record>
<record id="job_sr_developers" model="hr.job">
<field name="name">Senior Developers</field>
<field name="department_id" ref="dep_it"/>
</record>
<record id="job_jr_developers" model="hr.job">
<field name="name">Junior Developers</field>
<field name="department_id" ref="dep_it"/>
</record>
<record id="job_trainee" model="hr.job">
<field name="name">Trainee</field>
<field name="department_id" ref="dep_it"/>
</record>
</data>
</openerp>
+1 -1
View File
@@ -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"/>
+9 -3
View File
@@ -62,12 +62,14 @@
<separator string="Position" colspan="2"/>
<field name="job_id" widget="selection"/>
<field name="department_id" widget="selection"/>
<field name="category_id" widget="selection"/>
<!--<separator string="Managers" colspan="2"/>
<field name="parent_id" />
<field name="coach_id" />-->
</group>
</page>
<page string="Categories">
<field name="category_ids" nolabel="1"/>
</page>
<page string="Notes">
<field colspan="4" nolabel="1" name="notes"/>
</page>
@@ -88,7 +90,6 @@
<field name="work_email"/>
<field name="department_id"/>
<field name="job_id"/>
<field name="category_id"/>
<field name="parent_id"/>
<field name="coach_id" invisible="1" />
</tree>
@@ -341,7 +342,12 @@
<field name="employee_ids" colspan='4' nolabel="1" mode="tree,form"/>
</page>
</notebook>
<field name="state"/>
<group col="6" colspan="4">
<field name="state"/>
<button name="job_recruitement" string="In Recruitement" states="open" type="object" icon="gtk-go-forward"/>
<button name="job_open" string="Open" states="old" type="object" icon="terp-camera_test"/>
<button name="job_old" string="Old" states="open,recruit" type="object" icon="gtk-cancel"/>
</group>
</form>
</field>
</record>
+10 -10
View File
@@ -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-02-14 11:31+0000\n"
"Last-Translator: Paulius Sladkevičius <Unknown>\n"
"PO-Revision-Date: 2010-07-21 07:35+0000\n"
"Last-Translator: Giedrius Slavinskas <giedrius.slavinskas@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 04:15+0000\n"
"X-Launchpad-Export-Date: 2010-07-22 03:56+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr
@@ -31,7 +31,7 @@ msgstr "Darbo laiko kategorijos"
#. module: hr
#: constraint:hr.department:0
msgid "Error! You can not create recursive departments."
msgstr "Klaida ! Jūs negalite sukurti pasikartojančių padalinių"
msgstr "Klaida! Negalima sukurti pasikartojančių padalinių."
#. module: hr
#: field:hr.employee,sinid:0
@@ -179,7 +179,7 @@ msgstr "Pavaldiniai"
#. module: hr
#: model:ir.ui.menu,name:hr.menu_hr_reporting
msgid "Reporting"
msgstr "Ataskaitos"
msgstr ""
#. module: hr
#: field:hr.department,member_ids:0
@@ -199,7 +199,7 @@ msgstr "Užpildyti kontaktine informaciją"
#. module: hr
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "Netinkamas XML peržiūros architektūrai!"
#. module: hr
#: selection:hr.employee,marital:0
@@ -242,7 +242,7 @@ msgstr "Vyras"
#. module: hr
#: model:process.transition,note:hr.process_transition_employeeuser0
msgid "Create openerp user"
msgstr "Sukurti OpenERP vartotoją"
msgstr "Sukurti OpenERP naudotoją"
#. module: hr
#: view:hr.employee.category:0
@@ -366,7 +366,7 @@ msgstr "Darbovietės adresas"
#. module: hr
#: field:hr.employee,marital:0
msgid "Marital Status"
msgstr "Šeiminė padėtis"
msgstr "Šeimyninė padėtis"
#. module: hr
#: model:ir.model,name:hr.model_hr_timesheet
@@ -383,8 +383,8 @@ msgstr "Asmeninė informacija"
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Objekto pavadinimas turi prasidėti su x_ ir jame negali būti specialių "
"simbolių!"
"Objekto pavadinimas turi prasidėti su x_ ir jame negali būti specialiųjų "
"ženklų!"
#. module: hr
#: view:hr.timesheet:0
+2 -2
View File
@@ -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',
help="Generic Payroll system Integrated with Accountings."),
}
_defaults = {
+31 -36
View File
@@ -1,68 +1,63 @@
- |
-
In order to test hr module in OpenERP, I will create new Employee , Department and Job Position.
-
|
I create "R & D" Department in Department form.
-
I create "R&D Department" in Department form.
-
!record {model: hr.department, id: hr_department_rd0}:
manager_id: base.user_root
name: 'R & D '
-
|
Now, I create a new employee “Mark Johnson”.
select "R & D" Department which I had created.
name: 'R & D'
-
!record {model: hr.employee, id: hr_employee_employee0}:
Now, I create a new employee “Mark Johnson”, and select department as "R&D Department".
-
!record {model: hr.employee, id: hr_employee_mark}:
address_home_id: base.res_partner_address_1
company_id: base.main_company
gender: male
marital: hr.hr_employee_marital_status_single
name: employee1
name: Mark Johnson
user_id: base.user_root
department_id: 'hr_department_rd0'
- |
In order to check the wizard “Employee Hierarchy” , I will create new employee “Phil Graves ” and select "Mark Johnson" as
Manager.
-
!record {model: hr.employee, id: hr_employee_employee1}:
-
In order to check the wizard “Employee Hierarchy” , I will create new employee “Phil Graves ” and select "Mark Johnson" as
Manager.
-
!record {model: hr.employee, id: hr_employee_phil}:
address_home_id: base.res_partner_address_3000
company_id: base.main_company
gender: male
name: employee2
name: Phil Graves
user_id: base.user_demo
parent_id: 'hr_employee_employee0'
- |
parent_id: 'hr_employee_mark'
-
I will open up form view of “Mark Johnson” and test the wizard “Employee Hierarchy” so it display the employee
hierarchy starting from “Mark Johnson”.
- |
hierarchy starting from “Mark Johnson”.
-
I will create new Job Position. I will check successfull creation of new Job Position by adding the information.
-
-
!record {model: hr.job, id: hr_job_jea0}:
department_id: 'hr_department_rd0'
description: 'Position of Junier Application Engineer '
description: 'Position of Junior Application Engineer'
expected_employees: 5
name: 'JEA '
- |
name: 'JAE'
-
I check that Employee form is in "Open" state.
-
!assert {model: hr.job, id: hr_job_jea0}:
- state == 'open'
- |
- state == 'open'
-
I create Employee for job position.
-
-
!record {model: hr.job, id: hr_job_jea0}:
employee_ids:
- address_home_id: base.res_partner_address_1
name: Manuel Lehba
department_id: 'hr_department_rd0'
gender: male
parent_id: 'hr_employee_employee0'
- |
I check that "Number of Employees" field have some value.
parent_id: 'hr_employee_mark'
-
I check that "Number of Employees" field have some value.
-
!assert {model: hr.job, id: hr_job_jea0}:
- no_of_employee != False
- no_of_employee != False
+13 -2
View File
@@ -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
@@ -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:
+5 -4
View File
@@ -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
@@ -88,6 +88,8 @@ def emp_create_xml(self, cr, uid, dept, holiday_type, row_id, empid, name, som,
class report_custom(report_rml):
def create_xml(self, cr, uid, ids, data, context):
obj_dept = pooler.get_pool(cr.dbname).get('hr.department')
obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
depts=[]
emp_id={}
# done={}
@@ -211,31 +213,24 @@ class report_custom(report_rml):
if data['model']=='hr.employee':
for id in data['form']['emp']:
items = pooler.get_pool(cr.dbname).get('hr.employee').read(cr, uid, id, ['id','name'])
items = obj_emp.read(cr, uid, id, ['id','name'])
emp_xml += emp_create_xml(self, cr, uid, 0, holiday_type, row_id, items['id'], items['name'], som, eom)
row_id = row_id +1
elif data['model']=='ir.ui.menu':
for id in data['form']['depts']:
dept = pooler.get_pool(cr.dbname).get('hr.department').browse(cr, uid, id, context.copy())
depts.append(dept)
dept_ids = tuple(data['form']['depts'])
cr.execute("""select dept_user.user_id \
from hr_department_user_rel dept_user \
where dept_user.department_id = %s\
union\
select dept.manager_id from hr_department dept\
where dept.id = %s""", (id, id))
dept = obj_dept.browse(cr, uid, id, context=context)
cr.execute("""select dept.manager_id from hr_department dept\
where dept.id = %s""", (id,))
result=cr.fetchall()
if result==[]:
continue
dept_done=0
for d in range(0,len(result)):
emp_id[d]=pooler.get_pool(cr.dbname).get('hr.employee').search(cr, uid, [('user_id', '=', result[d][0])])
items = pooler.get_pool(cr.dbname).get('hr.employee').read(cr, uid, emp_id[d], ['id', 'name'])
emp_id[d] = obj_emp.search(cr, uid, [('user_id', '=', result[d][0])])
items = obj_emp.read(cr, uid, emp_id[d], ['id', 'name'])
for item in items:
# if item['id'] in done:
# continue
@@ -244,11 +239,9 @@ class report_custom(report_rml):
emp_xml += emp_create_xml(self, cr, uid, 1, holiday_type, row_id, dept.id, dept.name, som, eom)
row_id = row_id +1
dept_done=1
# done[item['id']] = 1
emp_xml += emp_create_xml(self, cr, uid, 0, holiday_type, row_id, item['id'], item['name'], som, eom)
row_id = row_id +1
# Computing the xml
xml='''<?xml version="1.0" encoding="UTF-8" ?>
<report>
@@ -39,6 +39,8 @@ 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]
if not data['depts']:
raise osv.except_osv(_('Error'), _('You have to select at least 1 Department. And try again'))
@@ -51,7 +53,6 @@ class hr_holidays_summary_dept(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'holidays.summary',
'datas': datas,
'nodestroy': True,
}
hr_holidays_summary_dept()
@@ -38,6 +38,8 @@ class hr_holidays_summary_employee(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['emp'] = context['active_ids']
datas = {
+1 -2
View File
@@ -1,4 +1,3 @@
#!/usr/bin/env python
#-*- coding:utf-8 -*-
##############################################################################
#
@@ -25,4 +24,4 @@ import hr_payroll
import report
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+3 -5
View File
@@ -53,13 +53,11 @@
'wizard/hr_payroll_create_analytic.xml',
'wizard/hr_payroll_employees_detail.xml',
'wizard/hr_payroll_year_salary.xml',
],
'test': [
'test/payslip.yml',
'test/payment_advice.yml',
'test/payroll_register.yml',
'test/payslip.yml',
'test/payment_advice.yml',
'test/payroll_register.yml',
],
'demo_xml': [
'hr_payroll_demo.xml'
-21
View File
@@ -1145,27 +1145,6 @@ class hr_payslip_line(osv.osv):
_name = 'hr.payslip.line'
_description = 'Payslip Line'
# def _calculate(self, cr, uid, ids, field_names, arg, context):
# res = {}
# obj = {}
# for line in self.browse(cr, uid, ids, context):
# obj['basic'] = line.slip_id.basic
# amount = 0.0
#
# if line.amount_type == 'per' and line.base:
# print 'XXXXXXXXXXXXXXXX : ', obj
# amount = line.amount * eval(line.base, obj)
# elif line.amount_type in ('fix', 'func'):
# amount = line.amount
# cd = line.category_id.code.lower()
# obj[cd] = amount
# print 'XXXXXXXXXXXXXXXXXX : ', cd
#
# res[line.id] = amount
# print 'XXXXXXXXXXXX : ', obj
# return res
def onchange_category(self, cr, uid, ids, category_id):
seq = 0
res = {
+19 -1
View File
@@ -1,112 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<data noupdate="1">
<record id="HRA" model="hr.allounce.deduction.categoty">
<field name="code">HRA</field>
<field name="type">allowance</field>
<field name="name">House Rant Allowance</field>
<field name="sequence" eval="5"/>
</record>
<record id="CA" model="hr.allounce.deduction.categoty">
<field name="code">CA</field>
<field name="type">allowance</field>
<field name="name">Convance Allowance</field>
<field name="sequence" eval="10"/>
</record>
<record id="MA" model="hr.allounce.deduction.categoty">
<field name="code">MA</field>
<field name="type">allowance</field>
<field name="name">Meducal Allowance</field>
<field name="sequence" eval="15"/>
</record>
<record id="TELA" model="hr.allounce.deduction.categoty">
<field name="code">TELA</field>
<field name="type">allowance</field>
<field name="name">Telephone Allowance</field>
<field name="sequence" eval="20"/>
</record>
<record id="LTA" model="hr.allounce.deduction.categoty">
<field name="code">LTA</field>
<field name="type">allowance</field>
<field name="name">Leave Travel Allowance</field>
<field name="sequence" eval="25"/>
</record>
<record id="NA" model="hr.allounce.deduction.categoty">
<field name="code">NA</field>
<field name="type">allowance</field>
<field name="name">Newspaper Allowance</field>
<field name="sequence" eval="30"/>
</record>
<record id="TA" model="hr.allounce.deduction.categoty">
<field name="code">TA</field>
<field name="type">allowance</field>
<field name="name">Traveling Allowance</field>
<field name="sequence" eval="35"/>
</record>
<record id="FA" model="hr.allounce.deduction.categoty">
<field name="code">FA</field>
<field name="type">allowance</field>
<field name="name">Food Allowance</field>
<field name="sequence" eval="40"/>
</record>
<record id="DA" model="hr.allounce.deduction.categoty">
<field name="code">DA</field>
<field name="type">allowance</field>
<field name="name">Dearness Allowance</field>
<field name="sequence" eval="45"/>
</record>
<record id="PF" model="hr.allounce.deduction.categoty">
<field name="code">PF</field>
<field name="type">deduction</field>
<field name="name">Provident Fund</field>
<field name="sequence" eval="50"/>
</record>
<record id="PT" model="hr.allounce.deduction.categoty">
<field name="code">PT</field>
<field name="type">deduction</field>
<field name="name">Professional Tax</field>
<field name="sequence" eval="55"/>
</record>
<record id="WF" model="hr.allounce.deduction.categoty">
<field name="code">WF</field>
<field name="type">deduction</field>
<field name="name">Welfare</field>
<field name="sequence" eval="60"/>
</record>
<record id="TDS" model="hr.allounce.deduction.categoty">
<field name="code">TDS</field>
<field name="type">deduction</field>
<field name="name">Tax Deduct at Source</field>
<field name="sequence" eval="65"/>
</record>
<record id="LWP" model="hr.allounce.deduction.categoty">
<field name="code">LWP</field>
<field name="type">deduction</field>
<field name="name">Leave without pay</field>
<field name="sequence" eval="70"/>
</record>
<record id="FC" model="hr.allounce.deduction.categoty">
<field name="code">FC</field>
<field name="type">deduction</field>
<field name="name">Food Coupons</field>
<field name="sequence" eval="75"/>
</record>
<record id="ESI" model="hr.allounce.deduction.categoty">
<field name="code">ESI</field>
<field name="type">deduction</field>
<field name="name">Employee's State Insurance</field>
<field name="sequence" eval="80"/>
</record>
<record id="OTHERD" model="hr.allounce.deduction.categoty">
<field name="code">OTHERD</field>
<field name="type">deduction</field>
<field name="name">Other Deduction</field>
<field name="sequence" eval="85"/>
</record>
<record id="OTHERA" model="hr.allounce.deduction.categoty">
<field name="code">OTHERA</field>
<field name="type">allowance</field>
<field name="name">Other Taxable Allowance</field>
<field name="sequence" eval="90"/>
</record>
</data>
</openerp>
+1 -1
View File
@@ -6,7 +6,6 @@
<menuitem id="payroll_configure" parent="hr.menu_hr_configuration" name="Payroll"/>
<menuitem id="menu_hr_payroll_reporting" parent="hr.menu_hr_reporting" name="Payroll"/>
<!-- Passport Views -->
<record id="hr_passport_form" model="ir.ui.view">
<field name="name">hr.passport.form</field>
@@ -508,6 +507,7 @@
<button string="Approve Sheet" icon="terp-camera_test" name="final_verify_sheet" states="hr_check"/>
<button string="Pay Salary" icon="terp-dolar_ok!" name="process_sheet" states="confirm"/>
<button string="Cancel" icon="terp-dialog-close" name="cancel_sheet" states="draft,hr_check,confirm"/>
<button string="Re-Open" icon="terp-stock_effects-object-colorize" name="set_to_draft" states="draft,hr_check,confirm"/>
<button string="Set to Draft" icon="terp-stock_effects-object-colorize" name="set_to_draft" states="cancel"/>
</group>
</form>
-11
View File
@@ -25,16 +25,5 @@
parent="menu_hr_payroll_reporting"
name="Employee Salary Statement"
type="wizard"/>
<!-- <wizard id="wizard_payroll_analysis"-->
<!-- menu="False" -->
<!-- model="account.analytic.account" -->
<!-- name="payroll.analysis" -->
<!-- string="Create Analytic Structure"/>-->
<!-- <menuitem id="menu_wizard_payroll_analysis" -->
<!-- action="wizard_payroll_analysis" -->
<!-- parent="payroll_configure" -->
<!-- name="Create Analytic Structure"-->
<!-- type="wizard"/>-->
</data>
</openerp>
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -36,6 +36,7 @@ system to store and search in your CV base.
'depends': ['hr','survey','crm'],
'update_xml': [
'wizard/hr_recruitment_phonecall_view.xml',
'wizard/hr_recruitment_create_partner_job_view.xml',
'hr_recruitment_view.xml',
'hr_recruitment_menu.xml',
# 'report_hr_recruitment_view.xml',
@@ -43,7 +44,6 @@ system to store and search in your CV base.
'security/ir.model.access.csv',
'board_hr_recruitment_statistical_view.xml',
'report/hr_recruitment_report_view.xml',
'wizard/hr_recruitment_create_partner_job_view.xml',
],
'init_xml': [
'hr_recruitment_data.xml'
+27 -12
View File
@@ -59,6 +59,19 @@ class hr_recruitment_stage(osv.osv):
}
hr_recruitment_stage()
class hr_recruitment_degree(osv.osv):
""" Degree of HR Recruitment """
_name = "hr.recruitment.degree"
_description = "Degree of Recruitment"
_columns = {
'name': fields.char('Name', size=64, required=True, translate=True),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of degrees."),
}
_defaults = {
'sequence': 1,
}
hr_recruitment_degree()
class hr_applicant(osv.osv, crm.crm_case):
_name = "hr.applicant"
_description = "Applicant"
@@ -88,6 +101,8 @@ class hr_applicant(osv.osv, crm.crm_case):
# Applicant Columns
'date_closed': fields.datetime('Closed', readonly=True),
'date': fields.datetime('Date'),
'date_action': fields.date('Next Action Date'),
'title_action': fields.char('Next Action', size=64),
'priority': fields.selection(AVAILABLE_PRIORITIES, 'Appreciation'),
'job_id': fields.many2one('hr.job', 'Applied Job'),
'salary_proposed': fields.float('Proposed Salary', help="Salary Proposed by the Organisation"),
@@ -96,7 +111,7 @@ class hr_applicant(osv.osv, crm.crm_case):
'partner_name': fields.char("Applicant's Name", size=64),
'partner_phone': fields.char('Phone', size=32),
'partner_mobile': fields.char('Mobile', size=32),
'type_id': fields.many2one('crm.case.resource.type', 'Degree', domain="[('object_id.model', '=', 'hr.applicant')]"),
'type_id': fields.many2one('hr.recruitment.degree', 'Degree'),
'department_id':fields.many2one('hr.department', 'Department'),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
'survey' : fields.related('job_id', 'survey_id', type='many2one', relation='survey', string='Survey'),
@@ -237,7 +252,7 @@ class hr_applicant(osv.osv, crm.crm_case):
def message_new(self, cr, uid, msg, context):
"""
Automatically calls when new email message arrives
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks
@@ -249,7 +264,7 @@ class hr_applicant(osv.osv, crm.crm_case):
body = msg.get('body')
msg_from = msg.get('from')
priority = msg.get('priority')
vals = {
'name': subject,
'email_from': msg_from,
@@ -259,15 +274,15 @@ class hr_applicant(osv.osv, crm.crm_case):
}
if msg.get('priority', False):
vals['priority'] = priority
res = mailgate_pool.get_partner(cr, uid, msg.get('from'))
if res:
vals.update(res)
res = self.create(cr, uid, vals, context)
message = _('A Job Request created') + " '" + subject + "' " + _("from Mailgate.")
self.log(cr, uid, res, message)
attachents = msg.get('attachments', [])
for attactment in attachents or []:
data_attach = {
@@ -283,16 +298,16 @@ class hr_applicant(osv.osv, crm.crm_case):
return res
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}):
"""
"""
@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 update mail’s IDs
@param ids: List of update mail’s IDs
"""
if isinstance(ids, (str, int, long)):
ids = [ids]
msg_from = msg['from']
vals.update({
'description': msg['body']
@@ -312,7 +327,7 @@ class hr_applicant(osv.osv, crm.crm_case):
if res and maps.get(res.group(1).lower(), False):
key = maps.get(res.group(1).lower())
vls[key] = res.group(2).lower()
vals.update(vls)
res = self.write(cr, uid, ids, vals)
return res
@@ -328,7 +343,7 @@ class hr_applicant(osv.osv, crm.crm_case):
@param **args: Return Dictionary of Keyword Value
"""
return True
def case_open(self, cr, uid, ids, *args):
"""
@param self: The object pointer
@@ -17,17 +17,17 @@
<!-- Resource(type_id) -->
<record model="crm.case.resource.type" id="type_job1">
<record model="hr.recruitment.degree" id="degree_graduate">
<field name="name">Graduate</field>
<field name="object_id" search="[('model','=','hr.applicant')]" model="ir.model"/>
<field name="sequence">1</field>
</record>
<record model="crm.case.resource.type" id="type_job2">
<record model="hr.recruitment.degree" id="degree_licenced">
<field name="name">Licenced</field>
<field name="object_id" search="[('model','=','hr.applicant')]" model="ir.model"/>
<field name="sequence">2</field>
</record>
<record model="crm.case.resource.type" id="type_job3">
<record model="hr.recruitment.degree" id="degree_bac5">
<field name="name"> > Bac +5</field>
<field name="object_id" search="[('model','=','hr.applicant')]" model="ir.model"/>
<field name="sequence">3</field>
</record>
<record model="hr.recruitment.stage" id="stage_job1">
@@ -9,7 +9,7 @@
<record id="hr_case_salesman0" model="hr.applicant">
<field eval="time.strftime('%Y-%m-01 10:35:50')" name="date"/>
<field eval="time.strftime('%Y-%m-03')" name="date_deadline"/>
<field name="type_id" ref="type_job1"/>
<field name="type_id" ref="degree_graduate"/>
<field name="partner_id" ref="base.res_partner_asus"/>
<field eval="'2'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
@@ -29,7 +29,7 @@
<field name="partner_address_id" ref="base.res_partner_address_14"/>
<field name="som" ref="base.som_fury"/>
<field eval="time.strftime('%Y-%m-10 18:15:00')" name="date"/>
<field name="type_id" ref="type_job3"/>
<field name="type_id" ref="degree_bac5"/>
<field name="partner_id" ref="base.res_partner_15"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
@@ -50,7 +50,7 @@
<field name="som" ref="base.som_happy"/>
<field eval="time.strftime('%Y-%m-15 16:10:00')" name="date"/>
<field eval="time.strftime('%Y-%m-18')" name="date_deadline"/>
<field name="type_id" ref="type_job2"/>
<field name="type_id" ref="degree_licenced"/>
<field name="partner_id" ref="base.res_partner_5"/>
<field eval="'1'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
@@ -68,7 +68,7 @@
<field eval="time.strftime('%Y-%m-25 16:25:52')" name="date"/>
<field eval="time.strftime('%Y-%m-28')" name="date_deadline"/>
<field name="categ_id" ref="categ_job2"/>
<field name="type_id" ref="type_job3"/>
<field name="type_id" ref="degree_bac5"/>
<field name="partner_id" ref="base.res_partner_10"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
@@ -83,7 +83,7 @@
<record id="hr_case_marketingjob0" model="hr.applicant">
<field eval="time.strftime('%Y-%m-26 17:15:32')" name="date"/>
<field eval="time.strftime('%Y-%m-28')" name="date_deadline"/>
<field name="type_id" ref="type_job2"/>
<field name="type_id" ref="degree_licenced"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="'4'" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
@@ -101,7 +101,7 @@
<record id="hr_case_financejob0" model="hr.applicant">
<field eval="time.strftime('%Y-%m-26 17:39:42')" name="date"/>
<field eval="time.strftime('%Y-%m-28')" name="date_deadline"/>
<field name="type_id" ref="type_job2"/>
<field name="type_id" ref="degree_licenced"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="'4'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
@@ -121,7 +121,7 @@
<field name="partner_address_id" ref="base.res_partner_address_14"/>
<field name="som" ref="base.som_fury"/>
<field eval="time.strftime('%Y-%m-12 17:49:19')" name="date"/>
<field name="type_id" ref="type_job3"/>
<field name="type_id" ref="degree_bac5"/>
<field name="partner_id" ref="base.res_partner_15"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
@@ -7,9 +7,9 @@
<record model="ir.actions.act_window" id="crm_case_categ0_act_job">
<field name="name">Applicants</field>
<field name="res_model">hr.applicant</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_mode">tree,form,graph,calendar</field>
<field name="view_id" ref="crm_case_tree_view_job"/>
<field name="context">{"search_default_user_id":uid}</field>
<field name="context">{"search_default_user_id":uid, 'search_default_current': 1}</field>
<field name="search_view_id" ref="view_crm_case_jobs_filter"/>
</record>
+86 -13
View File
@@ -55,6 +55,8 @@
<field name="stage_id"/>
<button name="stage_previous" string="Previous" states="open,pending" type="object" icon="gtk-go-back"/>
<button name="stage_next" string="Next" states="open,pending" type="object" icon="gtk-go-forward"/>
<field name="title_action" invisible="context.get('invisible_next_action', True)"/>
<field name="date_action" invisible="context.get('invisible_next_date', True)"/>
<field name="survey" invisible="1"/>
<field name="response" invisible="1"/>
<field name="priority"/>
@@ -67,7 +69,6 @@
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_close" string="Hired" states="open,draft,pending" type="object" icon="terp-partner"/>
<button name="case_cancel" string="Refused" states="draft,open,pending" type="object" icon="gtk-cancel"/>
</tree>
</field>
</record>
@@ -94,16 +95,23 @@
<field name="user_id"/>
<button name="action_print_survey" string="Print Interview" type="object" icon="gtk-print" attrs="{'readonly':[('survey','=',False)]}"/>
<button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" icon="gtk-execute" context="{'survey_id': survey, 'response_id': [response], 'response_no':0 ,'active' : response, 'object' : 'hr.applicant', 'cur_id' :active_id}" attrs="{'readonly':[('survey','=',False)]}" groups="base.group_extended"/>
<newline/>
<field name="date_action"/>
<field name="title_action"/>
</group>
<notebook colspan="4">
<page string="Job Info">
<group col="2" colspan="2">
<separator colspan="2" string="Contact"/>
<group col="3" colspan="2">
<separator colspan="3" string="Contact"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" />
<field name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)"/>
<field name="email_from"/>
<field name="partner_phone"/>
<field name="partner_mobile"/>
<button string="Create Partner"
name="%(action_hr_recruitment_partner_create)d"
icon="terp-mail-replied" type="action"/>
<newline/>
<field name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)" colspan="3"/>
<field name="email_from" colspan="3"/>
<field name="partner_phone" colspan="3"/>
<field name="partner_mobile" colspan="3"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Contract Data"/>
@@ -113,7 +121,8 @@
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Qualification"/>
<field name="type_id" domain="[('object_id.model', '=', 'hr.applicant')]"/>
<!-- <field name="type_id" domain="[('object_id.model', '=', 'hr.applicant')]"/>-->
<field name="type_id"/>
<field name="priority" string="Appreciation"/>
<field name="reference"/>
</group>
@@ -133,13 +142,13 @@
<button name="case_reset" string="Reset to New" states="done,cancel" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Internal Notes">
<page string="Notes">
<field name="description" nolabel="1" colspan="4"/>
</page>
<page string="History" groups="base.group_extended">
<!-- <page string="History" groups="base.group_extended">
<field name="id"/>
<field name="active"/>
</page>
</page> -->
<page string="Emails" groups="base.group_extended">
<group colspan="4">
<field colspan="4" name="email_cc" string="Global CC" widget="char"/>
@@ -176,10 +185,13 @@
icon="terp-mail-replied" type="action" />
</form>
</field>
<button colspan="4" string="Send New Email"
<button colspan="2" string="Send New Email"
name="%(crm.action_crm_send_mail)d"
context="{'mail':'new', 'model': 'hr.applicant'}"
icon="terp-mail-message-new" type="action" />
<button colspan="2" string="Forward"
name="%(crm.crm_lead_forward_to_partner_act)d"
icon="terp-mail-forward" type="action" />
</page>
</notebook>
</form>
@@ -210,6 +222,7 @@
domain="[('state','in',('draft','open'))]"
help="All new and in progress jobs"
default="1"
name="current"
/>
<filter icon="terp-document-new" string="New"
domain="[('state','=','draft')]"
@@ -224,10 +237,15 @@
help="Pending Jobs"
/>
<separator orientation="vertical"/>
<filter icon="terp-check" string="Next Actions"
context="{'invisible_next_action':False, 'invisible_next_date':False}"
domain="[]"
help="View Next Action and Date"/>
<separator orientation="vertical"/>
<field name="partner_name"/>
<field name="email_from"/>
<field name="job_id" widget="selection"/>
<field name="user_id" widget="selection">
<field name="user_id">
<filter domain="[('user_id','=',False)]" help="Unassigned Recruitements" icon="terp-personal-" separator="1"/>
</field>
<field name="department_id" widget="selection" string="Department" context="{'invisible_department': False}">
@@ -254,6 +272,24 @@
</field>
</record>
<!-- CRM Lead Calendar View -->
<record model="ir.ui.view" id="hr_applicant_calendar_view">
<field name="name">Hr Applicants Calendar</field>
<field name="model">hr.applicant</field>
<field name="type">calendar</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Applicants"
date_start="date_action" color="user_id">
<field name="name" />
<field name="partner_name" />
<field name="stage_id" />
</calendar>
</field>
</record>
# ------------------------------------------------------
# HR Job
# ------------------------------------------------------
@@ -321,5 +357,42 @@
action="hr_recruitment_stage_act"
sequence="1"/>
<!-- Degree Tree View -->
<record model="ir.ui.view" id="hr_recruitment_degree_tree">
<field name="name">hr.recruitment.degree.tree</field>
<field name="model">hr.recruitment.degree</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Degree">
<field name="sequence" invisible="1"/>
<field name="name"/>
</tree>
</field>
</record>
<!-- Degree Form View -->
<record model="ir.ui.view" id="hr_recruitment_degree_form">
<field name="name">hr.recruitment.degree.form</field>
<field name="model">hr.recruitment.degree</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Degree">
<field name="name" select="1"/>
<field name="sequence"/>
</form>
</field>
</record>
<!-- Degree Action -->
<record id="hr_recruitment_degree_action" model="ir.actions.act_window">
<field name="name">Degree</field>
<field name="res_model">hr.recruitment.degree</field>
<field name="view_type">form</field>
<field name="view_id" ref="hr_recruitment_degree_tree"/>
</record>
</data>
</openerp>
@@ -60,7 +60,7 @@
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Recruitment during last 7 days"/>
<separator orientation="vertical"/>
<filter string="Draft"
<filter string="New"
icon="terp-document-new"
domain="[('state','=','draft')]"
help = "Draft recruitment"/>
@@ -73,9 +73,9 @@
domain="[('state','=','pending')]"
help = "Pending recruitment"/>
<separator orientation="vertical"/>
<field name="partner_id"/>
<field name="job_id"/>
<field name="department_id" widget="selection"/>
<field name="user_id" widget="selection">
<field name="user_id">
<filter icon="terp-hr"
string="My Recruitment"
help="My Recruitment"
@@ -31,7 +31,7 @@
<field name="target">new</field>
</record>
<record model="ir.values" id="hr_recruitment_partner_create_values">
<!-- <record model="ir.values" id="hr_recruitment_partner_create_values">
<field name="model_id" ref="model_hr_applicant" />
<field name="object" eval="1" />
<field name="name">Create Partner</field>
@@ -39,7 +39,7 @@
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_hr_recruitment_partner_create'))" />
<field name="key">action</field>
<field name="model">hr.applicant</field>
</record>
</record> -->
</data>
</openerp>
+16 -8
View File
@@ -47,7 +47,9 @@ class hr_analytic_timesheet(osv.osv):
'partner_id': fields.related('account_id', 'partner_id', type='many2one', string='Partner Id', relation='account.analytic.account', store=True),
}
def unlink(self, cr, uid, ids, context={}):
def unlink(self, cr, uid, ids, context=None):
if context is None:
context = {}
toremove = {}
for obj in self.browse(cr, uid, ids, context=context):
toremove[obj.line_id.id] = True
@@ -55,7 +57,9 @@ class hr_analytic_timesheet(osv.osv):
return super(hr_analytic_timesheet, self).unlink(cr, uid, ids, context=context)
def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount, unit, context={}):
def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount, unit, context=None):
if context is None:
context = {}
res = {}
if prod_id and unit_amount:
# find company
@@ -63,9 +67,11 @@ class hr_analytic_timesheet(osv.osv):
res = self.pool.get('account.analytic.line').on_change_unit_amount(cr, uid, id, prod_id, unit_amount, company_id, unit, context=context)
return res
def _getEmployeeProduct(self, cr, uid, context={}):
def _getEmployeeProduct(self, cr, uid, context=None):
if context is None:
context = {}
emp_obj = self.pool.get('hr.employee')
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))])
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context)
if emp_id:
emp=emp_obj.browse(cr, uid, emp_id[0], context=context)
if emp.product_id:
@@ -76,7 +82,7 @@ class hr_analytic_timesheet(osv.osv):
emp_obj = self.pool.get('hr.employee')
if context is None:
context = {}
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))])
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context)
if emp_id:
emp=emp_obj.browse(cr, uid, emp_id[0], context=context)
if emp.product_id:
@@ -87,7 +93,7 @@ class hr_analytic_timesheet(osv.osv):
emp_obj = self.pool.get('hr.employee')
if context is None:
context = {}
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))])
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context)
if emp_id:
emp = emp_obj.browse(cr, uid, emp_id[0], context=context)
if bool(emp.product_id):
@@ -102,7 +108,7 @@ class hr_analytic_timesheet(osv.osv):
emp_obj = self.pool.get('hr.employee')
if context is None:
context = {}
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))])
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context)
if emp_id:
emp = emp_obj.browse(cr, uid, emp_id[0], context=context)
if emp.journal_id:
@@ -129,7 +135,9 @@ class hr_analytic_timesheet(osv.osv):
return {'value':{},'warning':warning}
return {'value':{}}
def create(self, cr, uid, vals, context={}):
def create(self, cr, uid, vals, context=None):
if context is None:
context = {}
emp_obj = self.pool.get('hr.employee')
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context)
ename = ''
+16 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="product_consultant" model="product.product">
<field name="default_code">DEV</field>
<field name="list_price">75.0</field>
@@ -15,11 +15,25 @@
<field name="procure_method">make_to_order</field>
<field eval="False" name="purchase_ok"/>
</record>
<!-- complete our example employee -->
<record id="hr.employee1" model="hr.employee">
<field name="product_id" ref="product_consultant"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
<record id="working_hours" model="hr.analytic.timesheet">
<field name="name">Working Hours For OpenERP SA</field>
<field name="user_id" ref="base.user_root"/>
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
<field eval="0.00" name="unit_amount"/>
<field name="product_id" ref="product_consultant"/>
<field name="product_uom_id" ref="product.uom_hour"/>
<field name="account_id" model="account.analytic.account" search="[('code','=','1')]"></field>
<field eval="0.00" name="amount"/>
<field name="general_account_id" model="account.account" ref="account.a_expense"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
</data>
</openerp>
@@ -83,6 +83,7 @@
<field name="view_mode">tree,form</field>
<field name="context">{"search_default_user_id":uid}</field>
<field name="search_view_id" ref="hr_timesheet_line_search"/>
<field name="help">This functionality gives you a list of work done by user, product and analytic account (or project). A search tool allows you to make fine-grained analysis.</field>
</record>
<menuitem id="menu_project_working_hours" parent="base.menu_project_management_time_tracking" action="act_hr_timesheet_line_evry1_all_form"/>

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