[MERGE] branch merged with lp:~openerp-dev/openobject-addons/trunk-dev-addons3
bzr revid: mtr@mtr-20100706091037-bfhj9vjfc63le5hg
This commit is contained in:
commit
eb0459c432
|
@ -21,7 +21,6 @@
|
|||
{
|
||||
"name" : "Accounting and Financial Management",
|
||||
"version" : "1.1",
|
||||
"depends" : ["product", "analytic", "process","board"],
|
||||
"author" : "Tiny",
|
||||
"category": 'Generic Modules/Accounting',
|
||||
"description": """Financial and accounting module that covers:
|
||||
|
@ -42,6 +41,7 @@ The processes like maintaining of general ledger is done through the defined fin
|
|||
grouping is maintained through journal) for a particular financial year and for preparation of vouchers there is a
|
||||
module named account_vouchers
|
||||
""",
|
||||
"depends" : ["product", "analytic", "process","board"],
|
||||
'website': 'http://www.openerp.com',
|
||||
'init_xml': [],
|
||||
'update_xml': [
|
||||
|
@ -119,7 +119,6 @@ module named account_vouchers
|
|||
"wizard/account_bs_report_view.xml"
|
||||
],
|
||||
'demo_xml': [
|
||||
#'demo/price_accuracy00.yml',
|
||||
'account_demo.xml',
|
||||
'project/project_demo.xml',
|
||||
'project/analytic_account_demo.xml',
|
||||
|
|
|
@ -1143,7 +1143,7 @@ class account_move(osv.osv):
|
|||
return amount
|
||||
|
||||
def _centralise(self, cr, uid, move, mode, context=None):
|
||||
assert(mode in ('debit', 'credit'), 'Invalid Mode') #to prevent sql injection
|
||||
assert mode in ('debit', 'credit'), 'Invalid Mode' #to prevent sql injection
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
|
@ -1230,13 +1230,7 @@ class account_move(osv.osv):
|
|||
if line.account_id.currency_id.id != line.currency_id.id and (line.account_id.currency_id.id != line.account_id.company_id.currency_id.id or line.currency_id):
|
||||
raise osv.except_osv(_('Error'), _("""Couldn't create move with currency different from the secondary currency of the account "%s - %s". Clear the secondary currency field of the account definition if you want to accept all currencies.""" % (line.account_id.code, line.account_id.name)))
|
||||
|
||||
# Check that the move balances, the tolerance for debit/credit must
|
||||
# be smaller than the smallest value according to price accuracy
|
||||
# (hence the +1 below)
|
||||
# Example:
|
||||
# difference == 0.01 is OK iff price_accuracy <= 1!
|
||||
# difference == 0.0001 is OK iff price_accuracy <= 3!
|
||||
if abs(amount) < 10 ** -(int(config['price_accuracy'])+1):
|
||||
if abs(amount) < 10 ** -4:
|
||||
if not len(line_draft_ids):
|
||||
continue
|
||||
self.pool.get('account.move.line').write(cr, uid, line_draft_ids, {
|
||||
|
|
|
@ -28,7 +28,7 @@ class res_company(osv.osv):
|
|||
}
|
||||
|
||||
_defaults = {
|
||||
'overdue_msg': lambda *a: 'Would your payment have been carried \
|
||||
'overdue_msg': 'Would your payment have been carried \
|
||||
out after this mail was sent, please consider the present one as \
|
||||
void. Do not hesitate to contact our accounting department'
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -45,11 +45,11 @@ class account_invoice(osv.osv):
|
|||
res[invoice.id]['amount_total'] = res[invoice.id]['amount_tax'] + res[invoice.id]['amount_untaxed']
|
||||
return res
|
||||
|
||||
def _get_journal(self, cr, uid, context):
|
||||
def _get_journal(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
type_inv = context.get('type', 'out_invoice')
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid)
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
company_id = context.get('company_id', user.company_id.id)
|
||||
type2journal = {'out_invoice': 'sale', 'in_invoice': 'purchase', 'out_refund': 'sale_refund', 'in_refund': 'purchase_refund'}
|
||||
refund_journal = {'out_invoice': False, 'in_invoice': False, 'out_refund': True, 'in_refund': True}
|
||||
|
@ -63,7 +63,7 @@ class account_invoice(osv.osv):
|
|||
else:
|
||||
return False
|
||||
|
||||
def _get_currency(self, cr, uid, context):
|
||||
def _get_currency(self, cr, uid, context=None):
|
||||
user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, [uid])[0]
|
||||
if user.company_id:
|
||||
return user.company_id.currency_id.id
|
||||
|
@ -81,10 +81,9 @@ class account_invoice(osv.osv):
|
|||
def _get_type(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
type = context.get('type', 'out_invoice')
|
||||
return type
|
||||
return context.get('type', 'out_invoice')
|
||||
|
||||
def _reconciled(self, cr, uid, ids, name, args, context):
|
||||
def _reconciled(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
for id in ids:
|
||||
res[id] = self.test_paid(cr, uid, [id])
|
||||
|
@ -95,8 +94,11 @@ class account_invoice(osv.osv):
|
|||
|
||||
def _amount_residual(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
data_inv = self.browse(cr, uid, ids)
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
data_inv = self.browse(cr, uid, ids)
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
for inv in data_inv:
|
||||
debit = credit = 0.0
|
||||
context.update({'date':inv.date_invoice})
|
||||
|
@ -188,7 +190,7 @@ class account_invoice(osv.osv):
|
|||
result[invoice.id] = lines
|
||||
return result
|
||||
|
||||
def _get_invoice_from_line(self, cr, uid, ids, context={}):
|
||||
def _get_invoice_from_line(self, cr, uid, ids, context=None):
|
||||
move = {}
|
||||
for line in self.pool.get('account.move.line').browse(cr, uid, ids):
|
||||
if line.reconcile_partial_id:
|
||||
|
@ -202,7 +204,7 @@ class account_invoice(osv.osv):
|
|||
invoice_ids = self.pool.get('account.invoice').search(cr, uid, [('move_id','in',move.keys())], context=context)
|
||||
return invoice_ids
|
||||
|
||||
def _get_invoice_from_reconcile(self, cr, uid, ids, context={}):
|
||||
def _get_invoice_from_reconcile(self, cr, uid, ids, context=None):
|
||||
move = {}
|
||||
for r in self.pool.get('account.move.reconcile').browse(cr, uid, ids):
|
||||
for line in r.line_partial_ids:
|
||||
|
@ -317,12 +319,12 @@ class account_invoice(osv.osv):
|
|||
_defaults = {
|
||||
'type': _get_type,
|
||||
#'date_invoice': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'state': lambda *a: 'draft',
|
||||
'state': 'draft',
|
||||
'journal_id': _get_journal,
|
||||
'currency_id': _get_currency,
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.invoice', context=c),
|
||||
'reference_type': lambda *a: 'none',
|
||||
'check_total': lambda *a: 0.0,
|
||||
'reference_type': 'none',
|
||||
'check_total': 0.0,
|
||||
'user_id': lambda s, cr, u, c: u,
|
||||
}
|
||||
|
||||
|
@ -339,7 +341,7 @@ class account_invoice(osv.osv):
|
|||
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name','=','account.invoice.form')])[0]
|
||||
return super(account_invoice,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
|
||||
def create(self, cr, uid, vals, context={}):
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
try:
|
||||
res = super(account_invoice, self).create(cr, uid, vals, context)
|
||||
return res
|
||||
|
@ -348,7 +350,6 @@ class account_invoice(osv.osv):
|
|||
raise orm.except_orm(_('Configuration Error!'),
|
||||
_('There is no Accounting Journal of type Sale/Purchase defined!'))
|
||||
else:
|
||||
raise
|
||||
raise orm.except_orm(_('UnknownError'), str(e))
|
||||
|
||||
def confirm_paid(self, cr, uid, ids, context=None):
|
||||
|
@ -1226,8 +1227,8 @@ class account_invoice_line(osv.osv):
|
|||
'partner_id': fields.related('invoice_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True)
|
||||
}
|
||||
_defaults = {
|
||||
'quantity': lambda *a: 1,
|
||||
'discount': lambda *a: 0.0,
|
||||
'quantity': 1,
|
||||
'discount': 0.0,
|
||||
'price_unit': _price_unit_default,
|
||||
}
|
||||
|
||||
|
@ -1570,4 +1571,7 @@ class res_partner(osv.osv):
|
|||
_columns = {
|
||||
'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices', readonly=True),
|
||||
}
|
||||
|
||||
res_partner()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -191,7 +191,4 @@ class res_partner(osv.osv):
|
|||
}
|
||||
res_partner()
|
||||
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -207,7 +207,6 @@
|
|||
<field name="date" select="1"/>
|
||||
<field name="user_id" widget="selection"/>
|
||||
</group>
|
||||
<separator orientation="vertical"/>
|
||||
<newline/>
|
||||
<group string="Group By..." expand="0">
|
||||
<filter string="General Account" context="{'group_by':'general_account_id'}"/>
|
||||
|
@ -342,7 +341,6 @@
|
|||
<field name="res_model">account.analytic.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('journal_id','=',active_id)]</field>
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_journal_open_form" id="account_analytic_journal_entries" parent="menu_finance_entries"/>
|
||||
<!-- <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
{
|
||||
'name' : 'report_account_analytic',
|
||||
'version': '1.0',
|
||||
'version' : '1.1',
|
||||
'category' : 'Generic Modules/Accounting',
|
||||
'description': """
|
||||
This module is for modifying account analytic view to show
|
||||
|
@ -32,12 +32,9 @@
|
|||
You can also view the report of account analytic summary
|
||||
user-wise as well as month wise.
|
||||
""",
|
||||
"version" : "1.1",
|
||||
"author" : "Camptocamp",
|
||||
"category" : "Generic Modules/Accounting",
|
||||
"module": "",
|
||||
"website" : "http://www.camptocamp.com/",
|
||||
"depends" : ["account","hr_timesheet","hr_timesheet_invoice","project"],
|
||||
"depends" : ["hr_timesheet_invoice"],
|
||||
"init_xml" : [],
|
||||
"update_xml": [
|
||||
"security/ir.model.access.csv",
|
||||
|
@ -49,4 +46,5 @@
|
|||
'active' : False,
|
||||
'certificate': '0042927202589',
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -19,18 +19,16 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import operator
|
||||
from osv import osv, fields
|
||||
from osv.orm import intersect
|
||||
import tools.sql
|
||||
from tools.translate import _
|
||||
|
||||
|
||||
class account_analytic_account(osv.osv):
|
||||
_name = "account.analytic.account"
|
||||
_inherit = "account.analytic.account"
|
||||
|
||||
def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context={}):
|
||||
def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
|
||||
if parent_ids:
|
||||
|
@ -46,7 +44,7 @@ class account_analytic_account(osv.osv):
|
|||
|
||||
return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, res, context)
|
||||
|
||||
def _ca_to_invoice_calc(self, cr, uid, ids, name, arg, context={}):
|
||||
def _ca_to_invoice_calc(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
res2 = {}
|
||||
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
|
||||
|
@ -92,7 +90,7 @@ class account_analytic_account(osv.osv):
|
|||
res[id] = round(res.get(id, 0.0),2) + round(res2.get(id, 0.0),2)
|
||||
return res
|
||||
|
||||
def _hours_qtt_non_invoiced_calc (self, cr, uid, ids, name, arg, context={}):
|
||||
def _hours_qtt_non_invoiced_calc (self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
|
||||
if parent_ids:
|
||||
|
@ -117,7 +115,7 @@ class account_analytic_account(osv.osv):
|
|||
res[id] = round(res.get(id, 0.0),2)
|
||||
return res
|
||||
|
||||
def _hours_quantity_calc(self, cr, uid, ids, name, arg, context={}):
|
||||
def _hours_quantity_calc(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
|
||||
if parent_ids:
|
||||
|
@ -141,7 +139,7 @@ class account_analytic_account(osv.osv):
|
|||
res[id] = round(res.get(id, 0.0),2)
|
||||
return res
|
||||
|
||||
def _total_cost_calc(self, cr, uid, ids, name, arg, context={}):
|
||||
def _total_cost_calc(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
|
||||
if parent_ids:
|
||||
|
@ -158,7 +156,7 @@ class account_analytic_account(osv.osv):
|
|||
return self._compute_currency_for_level_tree(cr, uid, ids, parent_ids, res, context)
|
||||
|
||||
# TODO Take care of pricelist and purchase !
|
||||
def _ca_theorical_calc(self, cr, uid, ids, name, arg, context={}):
|
||||
def _ca_theorical_calc(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
res2 = {}
|
||||
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
|
||||
|
@ -202,7 +200,7 @@ class account_analytic_account(osv.osv):
|
|||
res[id] = round(res.get(id, 0.0),2) + round(res2.get(id, 0.0),2)
|
||||
return res
|
||||
|
||||
def _last_worked_date_calc (self, cr, uid, ids, name, arg, context={}):
|
||||
def _last_worked_date_calc (self, cr, uid, ids, name, arg, context = None):
|
||||
res = {}
|
||||
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
|
||||
if parent_ids:
|
||||
|
@ -223,7 +221,7 @@ class account_analytic_account(osv.osv):
|
|||
res[id] = res.get(id, '')
|
||||
return res
|
||||
|
||||
def _last_invoice_date_calc (self, cr, uid, ids, name, arg, context={}):
|
||||
def _last_invoice_date_calc (self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
|
||||
if parent_ids:
|
||||
|
@ -247,7 +245,7 @@ class account_analytic_account(osv.osv):
|
|||
res[id] = res.get(id, '')
|
||||
return res
|
||||
|
||||
def _last_worked_invoiced_date_calc (self, cr, uid, ids, name, arg, context={}):
|
||||
def _last_worked_invoiced_date_calc (self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)]))
|
||||
if parent_ids:
|
||||
|
@ -268,7 +266,7 @@ class account_analytic_account(osv.osv):
|
|||
res[id] = res.get(id, '')
|
||||
return res
|
||||
|
||||
def _remaining_hours_calc(self, cr, uid, ids, name, arg, context={}):
|
||||
def _remaining_hours_calc(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
for account in self.browse(cr, uid, ids):
|
||||
if account.quantity_max != 0:
|
||||
|
@ -279,7 +277,7 @@ class account_analytic_account(osv.osv):
|
|||
res[id] = round(res.get(id, 0.0),2)
|
||||
return res
|
||||
|
||||
def _hours_qtt_invoiced_calc(self, cr, uid, ids, name, arg, context={}):
|
||||
def _hours_qtt_invoiced_calc(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
for account in self.browse(cr, uid, ids):
|
||||
res[account.id] = account.hours_quantity - account.hours_qtt_non_invoiced
|
||||
|
@ -289,7 +287,7 @@ class account_analytic_account(osv.osv):
|
|||
res[id] = round(res.get(id, 0.0),2)
|
||||
return res
|
||||
|
||||
def _revenue_per_hour_calc(self, cr, uid, ids, name, arg, context={}):
|
||||
def _revenue_per_hour_calc(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
for account in self.browse(cr, uid, ids):
|
||||
if account.hours_qtt_invoiced == 0:
|
||||
|
@ -300,7 +298,7 @@ class account_analytic_account(osv.osv):
|
|||
res[id] = round(res.get(id, 0.0),2)
|
||||
return res
|
||||
|
||||
def _real_margin_rate_calc(self, cr, uid, ids, name, arg, context={}):
|
||||
def _real_margin_rate_calc(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
for account in self.browse(cr, uid, ids):
|
||||
if account.ca_invoiced == 0:
|
||||
|
@ -313,7 +311,7 @@ class account_analytic_account(osv.osv):
|
|||
res[id] = round(res.get(id, 0.0),2)
|
||||
return res
|
||||
|
||||
def _remaining_ca_calc(self, cr, uid, ids, name, arg, context={}):
|
||||
def _remaining_ca_calc(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
for account in self.browse(cr, uid, ids):
|
||||
if account.amount_max != 0:
|
||||
|
@ -324,7 +322,7 @@ class account_analytic_account(osv.osv):
|
|||
res[id] = round(res.get(id, 0.0),2)
|
||||
return res
|
||||
|
||||
def _real_margin_calc(self, cr, uid, ids, name, arg, context={}):
|
||||
def _real_margin_calc(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
for account in self.browse(cr, uid, ids):
|
||||
res[account.id] = account.ca_invoiced + account.total_cost
|
||||
|
@ -332,7 +330,7 @@ class account_analytic_account(osv.osv):
|
|||
res[id] = round(res.get(id, 0.0),2)
|
||||
return res
|
||||
|
||||
def _theorical_margin_calc(self, cr, uid, ids, name, arg, context={}):
|
||||
def _theorical_margin_calc(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
for account in self.browse(cr, uid, ids):
|
||||
res[account.id] = account.ca_theorical + account.total_cost
|
||||
|
@ -426,6 +424,7 @@ class account_analytic_account_summary_user(osv.osv):
|
|||
string='Total Time'),
|
||||
'user' : fields.many2one('res.users', 'User'),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
tools.sql.drop_view_if_exists(cr, 'account_analytic_analysis_summary_user')
|
||||
cr.execute('CREATE OR REPLACE VIEW account_analytic_analysis_summary_user AS (' \
|
||||
|
@ -731,6 +730,5 @@ class account_analytic_account_summary_month(osv.osv):
|
|||
|
||||
account_analytic_account_summary_month()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<openerp>
|
||||
<data>
|
||||
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project" sequence="10"/>
|
||||
<!-- <menuitem id="next_id_71" name="Financial Project Management" parent="base.menu_main_pm" groups="account.group_account_invoice" sequence="20"/>-->
|
||||
<menuitem id="menu_invoicing" name="Billing" parent="base.menu_main_pm" sequence="4"/>
|
||||
|
||||
<record id="action_hr_tree_invoiced_all" model="ir.actions.act_window">
|
||||
|
@ -14,17 +13,6 @@
|
|||
</record>
|
||||
<menuitem action="action_hr_tree_invoiced_all" id="menu_action_hr_tree_invoiced_all" parent="menu_invoicing"/>
|
||||
|
||||
<record id="action_account_analytic_all" model="ir.actions.act_window">
|
||||
<field name="name">All Analytic Accounts</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="view_id" ref="account.view_account_analytic_account_list"/>
|
||||
<field name="search_view_id" ref="account.view_account_analytic_account_search"/>
|
||||
<field name="domain">[]</field>
|
||||
</record>
|
||||
<!-- <menuitem name="Analytic Accounts" action="action_account_analytic_all" id="menu_action_account_analytic_all" parent="next_id_71"/>-->
|
||||
|
||||
<record id="action_account_analytic_managed_overpassed" model="ir.actions.act_window">
|
||||
<field name="name">Overpassed Accounts</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
<field name="ca_invoiced"/>
|
||||
<field name="ca_theorical"/>
|
||||
<newline/>
|
||||
<!-- <field name="old"/> -->
|
||||
<field name="hours_quantity"/>
|
||||
<field name="hours_qtt_invoiced"/>
|
||||
<field name="remaining_hours"/>
|
||||
|
@ -38,13 +37,12 @@
|
|||
<separator colspan="4" string="Key dates"/>
|
||||
|
||||
<field name="last_invoice_date"/>
|
||||
|
||||
<field name="last_worked_invoiced_date"/>
|
||||
<field name="last_worked_date"/>
|
||||
<separator colspan="4" string="To be invoiced"/>
|
||||
|
||||
<field name="hours_qtt_non_invoiced"/>
|
||||
<field name="ca_to_invoice"/>
|
||||
|
||||
</page>
|
||||
<page string="Stats by month">
|
||||
<field colspan="4" name="month_ids" nolabel="1">
|
||||
|
@ -81,20 +79,18 @@
|
|||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_analytic_account_tree_c2c_3" model="ir.ui.view">
|
||||
<field name="name">account.analytic.account.tree</field>
|
||||
<field name="model">account.analytic.account</field>
|
||||
<field name="inherit_id" ref="account.view_account_analytic_account_list"/>
|
||||
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="date" position="before">
|
||||
<field name="last_invoice_date"/>
|
||||
<field name="ca_to_invoice"/>
|
||||
</field>
|
||||
|
||||
</field>
|
||||
|
||||
</record>
|
||||
|
||||
<record id="view_account_analytic_simplified" model="ir.ui.view">
|
||||
|
@ -110,7 +106,6 @@
|
|||
<field name="remaining_hours"/>
|
||||
<field name="ca_to_invoice"/>
|
||||
<field name="last_invoice_date"/>
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -8,13 +8,13 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2009-11-17 06:50+0000\n"
|
||||
"Last-Translator: Tor Syversen <sol-moe@online.no>\n"
|
||||
"PO-Revision-Date: 2010-07-03 18:41+0000\n"
|
||||
"Last-Translator: Mathias Bøhn Grytemark <Unknown>\n"
|
||||
"Language-Team: Norwegian Bokmal <nb@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-06-22 04:10+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-04 03:45+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
|
@ -32,7 +32,7 @@ msgstr "Timer, summert pr. bruker"
|
|||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,last_invoice_date:0
|
||||
msgid "Last Invoice Date"
|
||||
msgstr ""
|
||||
msgstr "Forrige fakturadato"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: help:account.analytic.account,remaining_ca:0
|
||||
|
@ -58,7 +58,7 @@ msgstr "Mine nåværende konti"
|
|||
#. module: account_analytic_analysis
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
msgstr "Ugyldig XML for visningsarkitektur!"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: help:account.analytic.account,last_invoice_date:0
|
||||
|
@ -84,7 +84,7 @@ msgstr ""
|
|||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
msgstr "Objektets navn må starte med x_ og ikke inneholde spesialkarakterer!"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_new
|
||||
|
@ -123,7 +123,7 @@ msgstr ""
|
|||
#. module: account_analytic_analysis
|
||||
#: model:ir.ui.menu,name:account_analytic_analysis.menu_invoicing
|
||||
msgid "Invoicing"
|
||||
msgstr ""
|
||||
msgstr "Fakturering"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,last_worked_date:0
|
||||
|
@ -145,7 +145,7 @@ msgstr ""
|
|||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,remaining_hours:0
|
||||
msgid "Remaining Hours"
|
||||
msgstr ""
|
||||
msgstr "Gjenværende timer"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: help:account.analytic.account,ca_theorical:0
|
||||
|
@ -159,7 +159,7 @@ msgstr ""
|
|||
#: field:account.analytic.account,user_ids:0
|
||||
#: field:account_analytic_analysis.summary.user,user:0
|
||||
msgid "User"
|
||||
msgstr ""
|
||||
msgstr "Bruker"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_managed_pending
|
||||
|
@ -182,7 +182,7 @@ msgstr ""
|
|||
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_managed
|
||||
#: model:ir.ui.menu,name:account_analytic_analysis.menu_analytic_account_managed
|
||||
msgid "My Accounts"
|
||||
msgstr ""
|
||||
msgstr "Mine kontoer"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: model:ir.module.module,description:account_analytic_analysis.module_meta_information
|
||||
|
@ -195,7 +195,7 @@ msgstr ""
|
|||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,hours_qtt_non_invoiced:0
|
||||
msgid "Uninvoiced Hours"
|
||||
msgstr ""
|
||||
msgstr "Ufakturerte timer"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,hours_quantity:0
|
||||
|
|
|
@ -20,4 +20,5 @@
|
|||
##############################################################################
|
||||
|
||||
import account_analytic_default
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name' : 'Account Analytic Default',
|
||||
'version' : '1.0',
|
||||
|
@ -42,4 +41,5 @@ Allows to automatically select analytic accounts based on criterions:
|
|||
'active': False,
|
||||
'certificate': '0074229833581',
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields,osv
|
||||
from osv import orm
|
||||
import time
|
||||
|
||||
from osv import fields,osv
|
||||
|
||||
class account_analytic_default(osv.osv):
|
||||
_name = 'account.analytic.default'
|
||||
_description = 'Analytic Distribution'
|
||||
|
@ -38,7 +38,7 @@ class account_analytic_default(osv.osv):
|
|||
'date_start': fields.date('Start Date'),
|
||||
'date_stop': fields.date('End Date'),
|
||||
}
|
||||
def account_get(self, cr, uid, product_id=None, partner_id=None, user_id=None, date=None, context={}):
|
||||
def account_get(self, cr, uid, product_id=None, partner_id=None, user_id=None, date=None, context=None):
|
||||
domain = []
|
||||
if product_id:
|
||||
domain += ['|',('product_id','=',product_id)]
|
||||
|
@ -71,7 +71,7 @@ class account_invoice_line(osv.osv):
|
|||
_inherit = 'account.invoice.line'
|
||||
_description = 'Invoice Line'
|
||||
|
||||
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition=False, price_unit=False, address_invoice_id=False, currency_id=False, context={}):
|
||||
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
|
||||
res_prod = super(account_invoice_line,self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition, price_unit, address_invoice_id, currency_id=currency_id, context=context)
|
||||
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context)
|
||||
if rec:
|
||||
|
@ -101,7 +101,7 @@ class sale_order_line(osv.osv):
|
|||
_inherit = 'sale.order.line'
|
||||
|
||||
# Method overridden to set the analytic account by default on criterion match
|
||||
def invoice_line_create(self, cr, uid, ids, context={}):
|
||||
def invoice_line_create(self, cr, uid, ids, context=None):
|
||||
create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context)
|
||||
if not ids:
|
||||
return create_ids
|
||||
|
@ -117,6 +117,4 @@ class sale_order_line(osv.osv):
|
|||
|
||||
sale_order_line()
|
||||
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_analytic_default_form" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Defaults</field>
|
||||
<field name="res_model">account.analytic.default</field>
|
||||
|
@ -59,10 +60,6 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_account_analytic_default_form_search"/>
|
||||
</record>
|
||||
<!-- <menuitem-->
|
||||
<!-- action="action_analytic_default_form"-->
|
||||
<!-- id="menu_analytic_defaul_form"-->
|
||||
<!-- parent="account.menu_analytic_accounting"/>-->
|
||||
|
||||
<act_window
|
||||
name="Entries"
|
||||
|
|
|
@ -22,5 +22,6 @@
|
|||
import account_analytic_plans
|
||||
import wizard
|
||||
import report
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -70,4 +70,5 @@ of distribution models.
|
|||
'active' : False,
|
||||
'certificate': '0036417675373',
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -19,15 +19,9 @@
|
|||
#
|
||||
##############################################################################
|
||||
from lxml import etree
|
||||
|
||||
from mx import DateTime
|
||||
from mx.DateTime import now
|
||||
import time
|
||||
|
||||
import netsvc
|
||||
from osv import fields, osv,orm
|
||||
import ir
|
||||
|
||||
from osv import fields, osv
|
||||
import tools
|
||||
from tools.translate import _
|
||||
|
||||
|
@ -64,6 +58,7 @@ account_analytic_plan()
|
|||
class account_analytic_plan_line(osv.osv):
|
||||
_name = "account.analytic.plan.line"
|
||||
_description = "Analytic Plan Line"
|
||||
_order = "sequence, id"
|
||||
_columns = {
|
||||
'plan_id':fields.many2one('account.analytic.plan','Analytic Plan'),
|
||||
'name': fields.char('Plan Name', size=64, required=True, select=True),
|
||||
|
@ -73,10 +68,9 @@ class account_analytic_plan_line(osv.osv):
|
|||
'max_required': fields.float('Maximum Allowed (%)'),
|
||||
}
|
||||
_defaults = {
|
||||
'min_required': lambda *args: 100.0,
|
||||
'max_required': lambda *args: 100.0,
|
||||
'min_required': 100.0,
|
||||
'max_required': 100.0,
|
||||
}
|
||||
_order = "sequence,id"
|
||||
account_analytic_plan_line()
|
||||
|
||||
class account_analytic_plan_instance(osv.osv):
|
||||
|
@ -116,7 +110,9 @@ class account_analytic_plan_instance(osv.osv):
|
|||
'account4_ids':False, 'account5_ids':False, 'account6_ids':False})
|
||||
return super(account_analytic_plan_instance, self).copy(cr, uid, id, default, context)
|
||||
|
||||
def _default_journal(self, cr, uid, context={}):
|
||||
def _default_journal(self, cr, uid, context=None):
|
||||
if not context:
|
||||
context = {}
|
||||
if context.has_key('journal_id') and context['journal_id']:
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, context['journal_id'])
|
||||
if journal.analytic_journal_id:
|
||||
|
@ -124,10 +120,10 @@ class account_analytic_plan_instance(osv.osv):
|
|||
return False
|
||||
|
||||
_defaults = {
|
||||
'plan_id': lambda *args: False,
|
||||
'plan_id': False,
|
||||
'journal_id': _default_journal,
|
||||
}
|
||||
def name_get(self, cr, uid, ids, context={}):
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
res = []
|
||||
for inst in self.browse(cr, uid, ids, context):
|
||||
name = inst.name or '/'
|
||||
|
@ -207,7 +203,7 @@ class account_analytic_plan_instance(osv.osv):
|
|||
|
||||
return super(account_analytic_plan_instance, self).create(cr, uid, vals, context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context={}, check=True, update_check=True):
|
||||
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
|
||||
this = self.browse(cr, uid, ids[0])
|
||||
if this.plan_id and not vals.has_key('plan_id'):
|
||||
#this instance is a model, so we have to create a new plan instance instead of modifying it
|
||||
|
@ -237,9 +233,9 @@ class account_analytic_plan_instance_line(osv.osv):
|
|||
'rate':fields.float('Rate (%)', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
'rate': lambda *args: 100.0
|
||||
'rate': 100.0
|
||||
}
|
||||
def name_get(self, cr, uid, ids, context={}):
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if not len(ids):
|
||||
return []
|
||||
reads = self.read(cr, uid, ids, ['analytic_account_id'], context)
|
||||
|
@ -297,7 +293,7 @@ class account_move_line(osv.osv):
|
|||
del(data['analytics_id'])
|
||||
return data
|
||||
|
||||
def create_analytic_lines(self, cr, uid, ids, context={}):
|
||||
def create_analytic_lines(self, cr, uid, ids, context=None):
|
||||
super(account_move_line, self).create_analytic_lines(cr, uid, ids, context)
|
||||
analytic_line_obj = self.pool.get('account.analytic.line')
|
||||
for line in self.browse(cr, uid, ids, context):
|
||||
|
@ -333,7 +329,7 @@ class account_invoice(osv.osv):
|
|||
_name = "account.invoice"
|
||||
_inherit="account.invoice"
|
||||
|
||||
def line_get_convert(self, cr, uid, x, part, date, context={}):
|
||||
def line_get_convert(self, cr, uid, x, part, date, context=None):
|
||||
res=super(account_invoice,self).line_get_convert(cr, uid, x, part, date, context)
|
||||
res['analytics_id']=x.get('analytics_id',False)
|
||||
return res
|
||||
|
@ -399,7 +395,7 @@ class sale_order_line(osv.osv):
|
|||
_inherit = 'sale.order.line'
|
||||
|
||||
# Method overridden to set the analytic account by default on criterion match
|
||||
def invoice_line_create(self, cr, uid, ids, context={}):
|
||||
def invoice_line_create(self, cr, uid, ids, context=None):
|
||||
create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context)
|
||||
if ids:
|
||||
sale_line_obj = self.browse(cr, uid, ids[0], context)
|
||||
|
|
|
@ -11,13 +11,6 @@
|
|||
auto="False"
|
||||
menu="False"/>
|
||||
|
||||
<!--<wizard
|
||||
id="account_analytic_account_inverted_balance_report"
|
||||
string="Crossovered Analytic"
|
||||
model="account.analytic.account"
|
||||
name="wizard.crossovered.analytic"
|
||||
keyword="client_print_multi"/>-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
|
|
@ -89,7 +89,11 @@
|
|||
<field name="code" select="1"/>
|
||||
<field name="plan_id" required="True"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="account_ids" string="Analytic Distribution" colspan="4">
|
||||
<field name="account_ids" nolabel="1" colspan="4">
|
||||
<form string="Analytic Distribution">
|
||||
<field name="rate"/>
|
||||
<field name="analytic_account_id"/>
|
||||
</form>
|
||||
<tree string="Analytic Distribution" editable="bottom">
|
||||
<field name="rate"/>
|
||||
<field name="analytic_account_id"/>
|
||||
|
@ -129,11 +133,6 @@
|
|||
src_model="account.analytic.plan"
|
||||
id="account_analytic_instance_model_open"/>
|
||||
|
||||
<!-- <menuitem-->
|
||||
<!-- name="Analytic Distribution's models" parent="account.account_def_analytic_journal"-->
|
||||
<!-- id="menu_account_analytic_plan_instance_action"-->
|
||||
<!-- action="account_analytic_plan_instance_action"/>-->
|
||||
|
||||
<record model="ir.ui.view" id="account_analytic_plan_instance_line_form">
|
||||
<field name="name">account.analytic.plan.instance.line.form</field>
|
||||
<field name="model">account.analytic.plan.instance.line</field>
|
||||
|
@ -234,7 +233,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- add property field on product -->
|
||||
<!-- add property field on default analytic account-->
|
||||
|
||||
<record model="ir.ui.view" id="view_default_inherit_form">
|
||||
<field name="name">account.analytic.default.form.plans</field>
|
||||
|
|
|
@ -20,5 +20,6 @@
|
|||
##############################################################################
|
||||
|
||||
import crossovered_analytic
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import pooler
|
||||
import time
|
||||
|
||||
from report import report_sxw
|
||||
|
||||
class crossovered_analytic(report_sxw.rml_parse):
|
||||
|
|
|
@ -21,5 +21,6 @@
|
|||
|
||||
import analytic_plan_create_model
|
||||
import account_crossovered_analytic
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Crossovered Analytic">
|
||||
<group height="280" width="300">
|
||||
<group col="4" colspan="6">
|
||||
<field name="date1"/>
|
||||
<field name="date2"/>
|
||||
|
@ -20,6 +21,7 @@
|
|||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="print_report" string="Print" colspan="1" type="object" icon="gtk-print"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -19,10 +19,9 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import followup
|
||||
import followup_report
|
||||
import account_followup
|
||||
import account_followup_report
|
||||
import wizard
|
||||
import report
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Accounting follow-ups management',
|
||||
'version': '1.0',
|
||||
|
@ -36,11 +35,10 @@
|
|||
|
||||
It will generate a PDF with all the letters according the the
|
||||
different levels of recall defined. You can define different policies
|
||||
for different companies.
|
||||
|
||||
for different companies. You can send also mail to the customer.
|
||||
|
||||
Note that if you want to change the followup level for a given partner/account entry, you can do it in the menu:
|
||||
Financial Management/Reporting/Follow-Ups/All receivable entries
|
||||
Accounting/Reporting/Follow-Ups/All receivable entries
|
||||
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
|
@ -50,13 +48,14 @@
|
|||
'update_xml': [
|
||||
'security/ir.model.access.csv',
|
||||
'wizard/account_followup_print_view.xml',
|
||||
'followup_report_view.xml',
|
||||
'followup_view.xml',
|
||||
'followup_data.xml'
|
||||
'account_followup_report.xml',
|
||||
'account_followup_view.xml',
|
||||
'account_followup_data.xml'
|
||||
],
|
||||
'demo_xml': ['followup_demo.xml'],
|
||||
'demo_xml': ['account_followup_demo.xml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0072481076453',
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -23,13 +23,17 @@ from osv import fields, osv
|
|||
|
||||
class followup(osv.osv):
|
||||
_name = 'account_followup.followup'
|
||||
_description = 'Follow-Up'
|
||||
_description = 'Account Follow Up'
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=64, required=True),
|
||||
'description': fields.text('Description'),
|
||||
'followup_line': fields.one2many('account_followup.followup.line', 'followup_id', 'Follow-Up'),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
}
|
||||
_defaults = {
|
||||
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'account_followup.followup', context=c),
|
||||
}
|
||||
|
||||
followup()
|
||||
|
||||
class followup_line(osv.osv):
|
||||
|
@ -43,15 +47,16 @@ class followup_line(osv.osv):
|
|||
'followup_id': fields.many2one('account_followup.followup', 'Follow Ups', required=True, ondelete="cascade"),
|
||||
'description': fields.text('Printed Message', translate=True),
|
||||
}
|
||||
|
||||
followup_line()
|
||||
|
||||
class account_move_line(osv.osv):
|
||||
_name = 'account.move.line'
|
||||
_inherit = 'account.move.line'
|
||||
_columns = {
|
||||
'followup_line_id': fields.many2one('account_followup.followup.line', 'Follow-up Level'),
|
||||
'followup_date': fields.date('Latest Follow-up'),
|
||||
}
|
||||
|
||||
account_move_line()
|
||||
|
||||
class res_company(osv.osv):
|
||||
|
@ -61,7 +66,7 @@ class res_company(osv.osv):
|
|||
}
|
||||
|
||||
_defaults = {
|
||||
'overdue_msg': lambda *a: '''
|
||||
'overdue_msg': '''
|
||||
Date : %(date)s
|
||||
|
||||
Dear %(partner_name)s,
|
||||
|
@ -76,7 +81,7 @@ Thanks,
|
|||
%(company_name)s
|
||||
'''
|
||||
}
|
||||
|
||||
res_company()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -22,18 +22,17 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Follow-Up Lines">
|
||||
<field name="sequence" select="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="delay" select="1"/>
|
||||
<field name="start" select="1"/>
|
||||
<field name="sequence"/>
|
||||
<field name="name" />
|
||||
<field name="delay" />
|
||||
<field name="start" />
|
||||
<newline/>
|
||||
<field colspan="4" name="description" select="1"/>
|
||||
<field colspan="4" name="description" />
|
||||
<separator string="Legend" colspan="4"/>
|
||||
|
||||
<label string="%%(partner_name)s: Partner name" colspan="2"/>
|
||||
<label string="%%(partner_name)s: Partner Name" colspan="2"/>
|
||||
<label string="%%(date)s: Current Date" colspan="2"/>
|
||||
<label string="%%(user_signature)s: User name" colspan="2"/>
|
||||
<label string="%%(company_name)s: User's Company name" colspan="2"/>
|
||||
<label string="%%(user_signature)s: User Name" colspan="2"/>
|
||||
<label string="%%(company_name)s: User's Company Name" colspan="2"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -44,11 +43,11 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Follow-Up">
|
||||
<field name="name" select="1"/>
|
||||
<field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="name" />
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<separator colspan="4" string="Description"/>
|
||||
<field colspan="4" name="description" nolabel="1" select="1"/>
|
||||
<separator colspan="4" string="Lines"/>
|
||||
<field colspan="4" name="description" nolabel="1" />
|
||||
<separator colspan="4" string="Followup Lines"/>
|
||||
<field colspan="4" name="followup_line" nolabel="1"/>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -66,17 +65,30 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_followup_filter" model="ir.ui.view">
|
||||
<field name="name">account.followup.select</field>
|
||||
<field name="model">account_followup.followup</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Followup">
|
||||
<group col="10" colspan="4">
|
||||
<field name="name"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_followup_definition_form" model="ir.actions.act_window">
|
||||
<field name="name">Follow-Ups</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account_followup.followup</field>
|
||||
<field name="search_view_id" ref="view_account_followup_filter"/>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
<menuitem action="action_account_followup_definition_form" id="account_followup_menu" parent="account.menu_finance_configuration"/>
|
||||
|
||||
<report auto="False" id="account_followup_followup_report" menu="False" model="account_followup.followup" name="account_followup.followup.print" rml="account_followup/report/rappel.rml" string="Followup Report"/>
|
||||
|
||||
|
||||
<record id="account_move_line_partner_tree" model="ir.ui.view">
|
||||
<field name="name">account.move.line.partner.tree</field>
|
||||
<field name="model">account.move.line</field>
|
||||
|
@ -146,5 +158,6 @@
|
|||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -91,10 +91,8 @@ class report_rappel(report_sxw.rml_parse):
|
|||
|
||||
return text
|
||||
|
||||
|
||||
report_sxw.report_sxw('report.account_followup.followup.print',
|
||||
'res.partner', 'addons/account_followup/report/rappel.rml',
|
||||
parser=report_rappel)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -34,18 +34,25 @@ class account_followup_print(osv.osv_memory):
|
|||
}
|
||||
|
||||
def _get_followup(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if context.get('active_model', 'ir.ui.menu') == 'account_followup.followup':
|
||||
return context.get('active_id', False)
|
||||
company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id
|
||||
tmp = self.pool.get('account_followup.followup').search(cr, uid, [('company_id', '=', company_id)])
|
||||
return tmp and tmp[0] or False
|
||||
followp_id = self.pool.get('account_followup.followup').search(cr, uid, [('company_id', '=', company_id)], context=context)
|
||||
return followp_id and followp_id[0] or False
|
||||
|
||||
def do_continue(self, cr, uid, ids, context=None):
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_followup_print_all')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
context.update({'followup_id': data['followup_id'], 'date':data['date']})
|
||||
return {
|
||||
'name': _('Select partners'),
|
||||
'name': _('Select Partners'),
|
||||
'view_type': 'form',
|
||||
'context': context,
|
||||
'view_mode': 'tree,form',
|
||||
|
@ -74,10 +81,12 @@ class account_followup_print_all(osv.osv_memory):
|
|||
'summary': fields.text('Summary', required=True, readonly=True)
|
||||
}
|
||||
def _get_summary(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
return context.get('summary', '')
|
||||
|
||||
def _get_partners(self, cr, uid, context=None):
|
||||
return self._get_partners_followp(cr, uid, [], context)['partner_ids']
|
||||
return self._get_partners_followp(cr, uid, [], context=context)['partner_ids']
|
||||
|
||||
def _get_msg(self, cr, uid, context=None):
|
||||
return self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.follow_up_msg
|
||||
|
@ -168,6 +177,9 @@ class account_followup_print_all(osv.osv_memory):
|
|||
move_obj = self.pool.get('account.move.line')
|
||||
user_obj = self.pool.get('res.users')
|
||||
line_obj = self.pool.get('account_followup.stat')
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_followup_print_all_msg')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
|
@ -252,8 +264,9 @@ class account_followup_print_all(osv.osv_memory):
|
|||
context.update({'summary': summary})
|
||||
else:
|
||||
context.update({'summary': '\n\n\nE-Mail has not been sent to any partner. If you want to send it, please tick send email confirmation on wizard.'})
|
||||
|
||||
return {
|
||||
'name': _('Summary'),
|
||||
'name': _('Follwoup Summary'),
|
||||
'view_type': 'form',
|
||||
'context': context,
|
||||
'view_mode': 'tree,form',
|
||||
|
@ -265,6 +278,8 @@ class account_followup_print_all(osv.osv_memory):
|
|||
}
|
||||
|
||||
def do_print(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
res = self._get_partners_followp(cr, uid, ids, context)['to_update']
|
||||
to_update = res
|
||||
|
@ -284,6 +299,7 @@ class account_followup_print_all(osv.osv_memory):
|
|||
'model': 'account_followup.followup',
|
||||
'form': data
|
||||
}
|
||||
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'account_followup.followup.print',
|
||||
|
|
|
@ -2,17 +2,6 @@
|
|||
<openerp>
|
||||
<data noupdate="0">
|
||||
|
||||
<!--<wizard string="Send followups"
|
||||
name="account_followup.followup.print.all"
|
||||
id="action_account_followup_all_wizard"
|
||||
model="account_followup.followup" />
|
||||
|
||||
<menuitem action="action_account_followup_all_wizard"
|
||||
id="account_followup_wizard_menu"
|
||||
parent="account.menu_finance_periodical_processing"
|
||||
type="wizard" />-->
|
||||
|
||||
|
||||
<record id="view_account_followup_print" model="ir.ui.view">
|
||||
<field name="name">account.followup.print.form</field>
|
||||
<field name="model">account.followup.print</field>
|
||||
|
|
|
@ -299,8 +299,8 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<group colspan="2" col="3" position="inside">
|
||||
<button name="%(action_account_populate_statement_confirm)d" string="Import payment lines" type="action" icon="gtk-open"/>
|
||||
<group col="6" colspan="4" position="inside">
|
||||
<button colspan="2" name="%(action_account_populate_statement_confirm)d" string="Import payment lines" type="action" icon="gtk-open"/>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -51,7 +51,7 @@ ir_sequence_type()
|
|||
class account_journal(osv.osv):
|
||||
_inherit = "account.journal"
|
||||
_columns = {
|
||||
'max_amount': fields.float('Verify Transaction', digits=(16, int(config['price_accuracy'])), help="Validate voucher entry twice before posting it, if transection amount more then entered here"),
|
||||
'max_amount': fields.float('Verify Transaction', digits=(16, 2), help="Validate voucher entry twice before posting it, if transection amount more then entered here"),
|
||||
}
|
||||
account_journal()
|
||||
|
||||
|
|
|
@ -29,14 +29,14 @@ class auction_pay_buy(osv.osv_memory):
|
|||
_description = "Pay buy"
|
||||
|
||||
_columns= {
|
||||
'amount': fields.float('Amount paid', digits= (16, int(tools.config['price_accuracy']))),
|
||||
'amount': fields.float('Amount paid', digits= (16, 2)),
|
||||
'buyer_id':fields.many2one('res.partner', 'Buyer'),
|
||||
'statement_id1':fields.many2one('account.bank.statement', 'Statement', required=True),
|
||||
'amount2': fields.float('Amount paid', digits= (16, int(tools.config['price_accuracy']))),
|
||||
'amount2': fields.float('Amount paid', digits= (16, 2)),
|
||||
'statement_id2':fields.many2one('account.bank.statement', 'Statement'),
|
||||
'amount3': fields.float('Amount paid', digits = (16, int(tools.config['price_accuracy']))),
|
||||
'amount3': fields.float('Amount paid', digits = (16, 2)),
|
||||
'statement_id3':fields.many2one('account.bank.statement', 'Statement'),
|
||||
'total': fields.float('Amount paid', digits = (16, int(tools.config['price_accuracy'])), readonly =True),
|
||||
'total': fields.float('Amount paid', digits = (16, 2), readonly =True),
|
||||
}
|
||||
|
||||
def default_get(self, cr, uid, fields, context):
|
||||
|
|
|
@ -27,7 +27,7 @@ class auction_pay_sel(osv.osv_memory):
|
|||
_description = "Pay Invoice"
|
||||
|
||||
_columns= {
|
||||
'amount': fields.float('Amount paid', digits= (16, int(tools.config['price_accuracy'])), required=True),
|
||||
'amount': fields.float('Amount paid', digits= (16, 2), required=True),
|
||||
'dest_account_id':fields.many2one('account.account', 'Payment to Account', required=True, domain= [('type', '=', 'cash')]),
|
||||
'journal_id':fields.many2one('account.journal', 'Journal', required=True),
|
||||
'period_id':fields.many2one('account.period', 'Period', required=True),
|
||||
|
|
|
@ -50,15 +50,17 @@ def get_recurrent_dates(rrulestring, exdate, startdate=None, exrule=None):
|
|||
|
||||
if not startdate:
|
||||
startdate = datetime.now()
|
||||
rset1 = rrule.rrulestr(rrulestring, dtstart=startdate, forceset=True)
|
||||
if not exdate:
|
||||
exdate = []
|
||||
rset1 = rrule.rrulestr(str(rrulestring), dtstart=startdate, forceset=True)
|
||||
|
||||
for date in exdate:
|
||||
datetime_obj = todate(date)
|
||||
rset1._exdate.append(datetime_obj)
|
||||
if exrule:
|
||||
rset1.exrule(rrule.rrulestr(str(exrule), dtstart=startdate))
|
||||
re_dates = map(lambda x:x.strftime('%Y-%m-%d %H:%M:%S'), rset1._iter())
|
||||
return re_dates
|
||||
|
||||
return list(rset1._iter())
|
||||
|
||||
def base_calendar_id2real_id(base_calendar_id=None, with_date=False):
|
||||
"""
|
||||
|
@ -791,31 +793,64 @@ class calendar_alarm(osv.osv):
|
|||
@param use_new_cursor: False or the dbname
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
|
||||
if not context:
|
||||
context = {}
|
||||
current_datetime = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
cr.execute("select alarm.id as id \
|
||||
from calendar_alarm alarm \
|
||||
where alarm.state = %s and alarm.trigger_date <= %s", ('run', current_datetime))
|
||||
res = cr.dictfetchall()
|
||||
alarm_ids = map(lambda x: x['id'], res)
|
||||
#attendee_obj = self.pool.get('calendar.attendee')
|
||||
current_datetime = datetime.now()
|
||||
request_obj = self.pool.get('res.request')
|
||||
alarm_ids = self.search(cr, uid, [('state', '!=', 'done')], context=context)
|
||||
|
||||
mail_to = []
|
||||
for alarm in self.browse(cr, uid, alarm_ids):
|
||||
|
||||
for alarm in self.browse(cr, uid, alarm_ids, context=context):
|
||||
next_trigger_date = None
|
||||
update_vals = {}
|
||||
model_obj = self.pool.get(alarm.model_id.model)
|
||||
res_obj = model_obj.browse(cr, uid, alarm.res_id, context=context)
|
||||
re_dates = []
|
||||
|
||||
if res_obj.rrule:
|
||||
event_date = datetime.strptime(res_obj.date, '%Y-%m-%d %H:%M:%S')
|
||||
recurrent_dates = get_recurrent_dates(res_obj.rrule, res_obj.exdate, event_date, res_obj.exrule)
|
||||
|
||||
trigger_interval = alarm.trigger_interval
|
||||
if trigger_interval == 'days':
|
||||
delta = timedelta(days=alarm.trigger_duration)
|
||||
if trigger_interval == 'hours':
|
||||
delta = timedelta(hours=alarm.trigger_duration)
|
||||
if trigger_interval == 'minutes':
|
||||
delta = timedelta(minutes=alarm.trigger_duration)
|
||||
delta = alarm.trigger_occurs == 'after' and delta or -delta
|
||||
|
||||
for rdate in recurrent_dates:
|
||||
if rdate + delta > current_datetime:
|
||||
break
|
||||
if rdate + delta <= current_datetime:
|
||||
re_dates.append(rdate.strftime("%Y-%m-%d %H:%M:%S"))
|
||||
rest_dates = recurrent_dates[len(re_dates):]
|
||||
next_trigger_date = rest_dates and rest_dates[0] or None
|
||||
|
||||
else:
|
||||
re_dates = [alarm.trigger_date]
|
||||
|
||||
for r_date in re_dates:
|
||||
ref = alarm.model_id.model + ',' + str(alarm.res_id)
|
||||
|
||||
# search for alreay sent requests
|
||||
if request_obj.search(cr, uid, [('trigger_date', '=', r_date), ('ref_doc1', '=', ref)], context=context):
|
||||
continue
|
||||
|
||||
if alarm.action == 'display':
|
||||
value = {
|
||||
'name': alarm.name,
|
||||
'act_from': alarm.user_id.id,
|
||||
'act_to': alarm.user_id.id,
|
||||
'body': alarm.description,
|
||||
'trigger_date': alarm.trigger_date,
|
||||
'ref_doc1': '%s,%s' % (alarm.model_id.model, alarm.res_id)
|
||||
'trigger_date': r_date,
|
||||
'ref_doc1': ref
|
||||
}
|
||||
request_id = request_obj.create(cr, uid, value)
|
||||
request_ids = [request_id]
|
||||
for attendee in alarm.attendee_ids:
|
||||
for attendee in res_obj.attendee_ids:
|
||||
if attendee.user_id:
|
||||
value['act_to'] = attendee.user_id.id
|
||||
request_id = request_obj.create(cr, uid, value)
|
||||
|
@ -823,14 +858,16 @@ class calendar_alarm(osv.osv):
|
|||
request_obj.request_send(cr, uid, request_ids)
|
||||
|
||||
if alarm.action == 'email':
|
||||
sub = '[Openobject Remainder] %s' % (alarm.name)
|
||||
sub = '[Openobject Reminder] %s' % (alarm.name)
|
||||
body = """
|
||||
Name: %s
|
||||
Date: %s
|
||||
Event: %s
|
||||
Event Date: %s
|
||||
Description: %s
|
||||
|
||||
From:
|
||||
%s
|
||||
|
||||
----
|
||||
%s
|
||||
|
||||
""" % (alarm.name, alarm.trigger_date, alarm.description, \
|
||||
|
@ -845,7 +882,11 @@ class calendar_alarm(osv.osv):
|
|||
sub,
|
||||
body
|
||||
)
|
||||
self.write(cr, uid, [alarm.id], {'state':'done'})
|
||||
if next_trigger_date:
|
||||
update_vals.update({'trigger_date': next_trigger_date})
|
||||
else:
|
||||
update_vals.update({'state': 'done'})
|
||||
self.write(cr, uid, [alarm.id], update_vals)
|
||||
return True
|
||||
|
||||
calendar_alarm()
|
||||
|
@ -1273,13 +1314,12 @@ true, it will allow you to hide the event alarm information without removing it.
|
|||
new_rrule_str.append(new_rule)
|
||||
new_rrule_str = ';'.join(new_rrule_str)
|
||||
rdates = get_recurrent_dates(str(new_rrule_str), exdate, start_date, data['exrule'])
|
||||
for rdate in rdates:
|
||||
r_date = datetime.strptime(rdate, "%Y-%m-%d %H:%M:%S")
|
||||
for r_date in rdates:
|
||||
if start_date and r_date < start_date:
|
||||
continue
|
||||
if until_date and r_date > until_date:
|
||||
continue
|
||||
idval = real_id2base_calendar_id(data['id'], rdate)
|
||||
idval = real_id2base_calendar_id(data['id'], r_date.strftime("%Y-%m-%d %H:%M:%S"))
|
||||
result.append(idval)
|
||||
count += 1
|
||||
if result:
|
||||
|
@ -1413,9 +1453,10 @@ true, it will allow you to hide the event alarm information without removing it.
|
|||
new_ids.append(event_id)
|
||||
|
||||
res = super(calendar_event, self).write(cr, uid, new_ids, vals, context=context)
|
||||
if vals.has_key('alarm_id') or vals.has_key('base_calendar_alarm_id'):
|
||||
if (vals.has_key('alarm_id') or vals.has_key('base_calendar_alarm_id'))\
|
||||
or (vals.has_key('date') or vals.has_key('duration') or vals.has_key('date_deadline')):
|
||||
# change alarm details
|
||||
alarm_obj = self.pool.get('res.alarm')
|
||||
context.update({'alarm_id': vals.get('alarm_id')})
|
||||
alarm_obj.do_alarm_create(cr, uid, new_ids, self._name, 'date', \
|
||||
context=context)
|
||||
return res
|
||||
|
|
|
@ -27,20 +27,6 @@ class res_partner_contact(osv.osv):
|
|||
_name = "res.partner.contact"
|
||||
_description = "Contact"
|
||||
|
||||
def _title_get(self,cr, user, context={}):
|
||||
"""
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param user: the current user,
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
|
||||
obj = self.pool.get('res.partner.title')
|
||||
ids = obj.search(cr, user, [])
|
||||
res = obj.read(cr, user, ids, ['shortcut', 'name','domain'], context)
|
||||
res = [(r['shortcut'], r['name']) for r in res if r['domain']=='contact']
|
||||
return res
|
||||
|
||||
def _main_job(self, cr, uid, ids, fields, arg, context=None):
|
||||
"""
|
||||
@param self: The object pointer
|
||||
|
@ -62,7 +48,7 @@ class res_partner_contact(osv.osv):
|
|||
'name': fields.char('Last Name', size=30, required=True),
|
||||
'first_name': fields.char('First Name', size=30),
|
||||
'mobile': fields.char('Mobile', size=30),
|
||||
'title': fields.selection(_title_get, 'Title'),
|
||||
'title': fields.many2one('res.partner.title','Title'),
|
||||
'website': fields.char('Website', size=120),
|
||||
'lang_id': fields.many2one('res.lang', 'Language'),
|
||||
'job_ids': fields.one2many('res.partner.job', 'contact_id', 'Functions and Addresses'),
|
||||
|
@ -101,13 +87,15 @@ class res_partner_contact(osv.osv):
|
|||
if not len(ids):
|
||||
return []
|
||||
res = []
|
||||
for r in self.read(cr, user, ids, ['name','first_name','title']):
|
||||
addr = r['title'] and str(r['title'])+" " or ''
|
||||
addr += r.get('name', '')
|
||||
if r['name'] and r['first_name']:
|
||||
addr += ' '
|
||||
addr += (r.get('first_name', '') or '')
|
||||
res.append((r['id'], addr))
|
||||
for contact in self.browse(cr, user, ids, context=context):
|
||||
_contact = ""
|
||||
if contact.title:
|
||||
_contact += "%s "%(contact.title.name)
|
||||
_contact += contact.name or ""
|
||||
if contact.name and contact.first_name:
|
||||
_contact += " "
|
||||
_contact += contact.first_name or ""
|
||||
res.append((contact.id, _contact))
|
||||
return res
|
||||
|
||||
res_partner_contact()
|
||||
|
|
|
@ -6,19 +6,19 @@
|
|||
<record id="res_partner_contact_mortier0" model="res.partner.contact">
|
||||
<field eval=""""Benoit"""" name="first_name"/>
|
||||
<field eval=""""Mortier"""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field name="title" ref="base.res_partner_title_sir"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_jacot0" model="res.partner.contact">
|
||||
<field eval=""""Laurent"""" name="first_name"/>
|
||||
<field eval=""""Jacot"""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_passot0" model="res.partner.contact">
|
||||
<field eval=""""Thomas"""" name="first_name"/>
|
||||
<field eval=""""Passot"""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_lacarte0" model="res.partner.contact">
|
||||
|
@ -37,25 +37,25 @@
|
|||
<record id="res_partner_contact_lavente0" model="res.partner.contact">
|
||||
<field eval=""""Jean-Guy"""" name="first_name"/>
|
||||
<field eval=""""Lavente"""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_lelitre0" model="res.partner.contact">
|
||||
<field eval=""""Sylvie"""" name="first_name"/>
|
||||
<field eval=""""Lelitre"""" name="name"/>
|
||||
<field eval=""""Mss"""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_grosbonnet0" model="res.partner.contact">
|
||||
<field eval=""""Arthur"""" name="first_name"/>
|
||||
<field eval=""""Grosbonnet"""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_lesbrouffe0" model="res.partner.contact">
|
||||
<field eval=""""Karine"""" name="first_name"/>
|
||||
<field eval=""""Lesbrouffe"""" name="name"/>
|
||||
<field eval=""""Ms."""" name="title"/>
|
||||
<field ref="base.res_partner_title_madam" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_zen0" model="res.partner.contact">
|
||||
|
@ -66,73 +66,73 @@
|
|||
<field eval=""""http://fptiny.blogspot.com/"""" name="website"/>
|
||||
<field eval=""""Fabien"""" name="first_name"/>
|
||||
<field eval=""""Pinckaers"""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_debois0" model="res.partner.contact">
|
||||
<field eval=""""Marc"""" name="first_name"/>
|
||||
<field eval=""""Debois"""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_luu0" model="res.partner.contact">
|
||||
<field eval=""""Phuong"""" name="first_name"/>
|
||||
<field eval=""""Luu"""" name="name"/>
|
||||
<field eval=""""Ms."""" name="title"/>
|
||||
<field ref="base.res_partner_title_madam" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_elkhayat0" model="res.partner.contact">
|
||||
<field eval=""""Najlaa"""" name="first_name"/>
|
||||
<field eval=""""Khayat"""" name="name"/>
|
||||
<field eval=""""Ms."""" name="title"/>
|
||||
<field ref="base.res_partner_title_madam" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_depaoli0" model="res.partner.contact">
|
||||
<field eval=""""Quentin"""" name="first_name"/>
|
||||
<field eval=""""Paolino"""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_semal0" model="res.partner.contact">
|
||||
<field eval=""""Fabian"""" name="first_name"/>
|
||||
<field eval=""""W."""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_vandewerve0" model="res.partner.contact">
|
||||
<field eval=""""Yvan"""" name="first_name"/>
|
||||
<field eval=""""van de Werve"""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_lambotte0" model="res.partner.contact">
|
||||
<field eval=""""Henry"""" name="first_name"/>
|
||||
<field eval=""""Lambotte"""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_laurent0" model="res.partner.contact">
|
||||
<field eval=""""Olivier"""" name="first_name"/>
|
||||
<field eval=""""Laurent"""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_simonis0" model="res.partner.contact">
|
||||
<field eval=""""Christophe"""" name="first_name"/>
|
||||
<field eval=""""Dupont"""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_wirtel0" model="res.partner.contact">
|
||||
<field eval=""""Stéphane"""" name="first_name"/>
|
||||
<field eval=""""Andre"""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_contact_mignon0" model="res.partner.contact">
|
||||
<field eval=""""Philippe"""" name="first_name"/>
|
||||
<field eval=""""Antoine"""" name="name"/>
|
||||
<field eval=""""M."""" name="title"/>
|
||||
<field ref="base.res_partner_title_sir" name="title"/>
|
||||
<field eval="1" name="active"/>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -29,37 +29,39 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Partner Contact">
|
||||
<group colspan="4" col="6">
|
||||
<field name="title" select="1" widget="selection" domain="[('domain', '=', 'contact')]" size="0"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="first_name" select="1"/>
|
||||
</group>
|
||||
<notebook colspan="4" >
|
||||
<page string="General">
|
||||
<newline/>
|
||||
<separator string="General Information" colspan="4"/>
|
||||
<group string="Partner" colspan="2" col="2">
|
||||
<field name="partner_id" invisible="1" select="1"/>
|
||||
<field name="title" select="1"/>
|
||||
<field name="function" invisible="1"/>
|
||||
<field name="email"/>
|
||||
<field name="lang_id"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<group string="Communication" colspan="2" col="2">
|
||||
<group colspan="4" col="4">
|
||||
<group colspan="2" col="4">
|
||||
<separator string="Communication" colspan="4"/>
|
||||
<field name="mobile"/>
|
||||
<field name="email" widget="email"/>
|
||||
<field name="website"/>
|
||||
</group>
|
||||
<group colspan="2" col="1">
|
||||
<separator string="Photo" colspan="4"/>
|
||||
<field name="photo" widget='image' nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="job_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<form string="Functions and Addresses">
|
||||
<group string="Partner" colspan="2" col="4">
|
||||
<group colspan="4" col="4">
|
||||
<field name="sequence_contact" />
|
||||
<field name="function"/>
|
||||
<field name="address_id"/>
|
||||
<field name="name"/>
|
||||
<field name="address_id"/>
|
||||
<field name="date_start" />
|
||||
<field name="date_stop" />
|
||||
<field name="state" />
|
||||
<field name="sequence_contact" />
|
||||
|
||||
</group>
|
||||
<group string="Communication" colspan="2" col="2">
|
||||
<separator string="Communication" colspan="4"/>
|
||||
<group colspan="4" col="4">
|
||||
<field name="phone"/>
|
||||
<field name="fax"/>
|
||||
<field name="email" widget="email"/>
|
||||
|
@ -82,15 +84,17 @@
|
|||
</field>
|
||||
</page>
|
||||
<page string="Extra Information">
|
||||
<field name="active"/>
|
||||
<field name="lang_id" widget="selection"/>
|
||||
<field name="partner_id" invisible="1" select="1"/>
|
||||
<field name="function" invisible="1" />
|
||||
<field name="country_id"/>
|
||||
<field name="birthdate"/>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field name="comment" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Picture">
|
||||
<field name="photo" nolabel="1" colspan="2" widget="image"/>
|
||||
</page>
|
||||
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -174,13 +178,14 @@
|
|||
<field name="email"/>
|
||||
</tree>
|
||||
<form string="Contacts">
|
||||
<group string="Partner" colspan="2" col="2">
|
||||
<group colspan="4" col="4">
|
||||
<field name="sequence_partner"/>
|
||||
<field name="name"/>
|
||||
<field name="contact_id"/>
|
||||
<field name="function"/>
|
||||
</group>
|
||||
<group string="Communication" colspan="2" col="2">
|
||||
<separator string="Communication" colspan="4"/>
|
||||
<group colspan="4" col="4">
|
||||
<field name="phone"/>
|
||||
<field name="fax"/>
|
||||
<field name="extension"/>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
!record {model: res.lang, id: res_lang_french0}:
|
||||
code: fr_BE
|
||||
date_format: '%m/%d/%Y'
|
||||
decimal_point: .
|
||||
decimal_point: '.'
|
||||
direction: ltr
|
||||
grouping: '[]'
|
||||
name: French
|
||||
|
@ -30,7 +30,6 @@
|
|||
lang_id: res_lang_french0
|
||||
mobile: (+32).10.45.18.77
|
||||
name: Williams
|
||||
title: Mss
|
||||
- |
|
||||
Now in order to assign this contact to partner I will create one partner assign contact laura to this partner
|
||||
-
|
||||
|
@ -51,7 +50,7 @@
|
|||
lang: fr_BE
|
||||
name: Laura's Company
|
||||
ref: LC
|
||||
title: ltd
|
||||
|
||||
- |
|
||||
Now I will check that the new job is assigned properly to contact or not
|
||||
-
|
||||
|
@ -74,7 +73,7 @@
|
|||
lang_id: res_lang_french0
|
||||
mobile: (+32).23.44.32.12
|
||||
name: Pauwels
|
||||
title: M.
|
||||
|
||||
- |
|
||||
In order to check one contact working at one partner with different functions
|
||||
I will create contact with 2 different jobs with different function but the same address
|
||||
|
@ -92,5 +91,4 @@
|
|||
lang_id: base_contact.res_lang_french0
|
||||
mobile: (+32).10.45.18.77
|
||||
name: Mortier
|
||||
title: Mss
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ class crm_case(object):
|
|||
|
||||
def _history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, email_from=False, message_id=False, attach=[], context={}):
|
||||
mailgate_pool = self.pool.get('mailgate.thread')
|
||||
return mailgate_pool._history(cr, uid, cases, keyword, history=history,\
|
||||
return mailgate_pool.history(cr, uid, cases, keyword, history=history,\
|
||||
subject=subject, email=email, \
|
||||
details=details, email_from=email_from,\
|
||||
message_id=message_id, attach=attach, \
|
||||
|
|
|
@ -157,16 +157,17 @@
|
|||
</page>
|
||||
<page string="Emails" groups="base.group_extended">
|
||||
<group colspan="4">
|
||||
<field colspan="4" name="email_cc" string="CC"/>
|
||||
<field colspan="4" name="email_cc" string="CC" widget="char" size="512"/>
|
||||
</group>
|
||||
<!-- TODO-->
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="form,tree">
|
||||
<form string="Communication history">
|
||||
<group col="6" colspan="4">
|
||||
<group col="4" colspan="4">
|
||||
<field name="email_from"/>
|
||||
<field name="email_to"/>
|
||||
<field name="date"/>
|
||||
<field name="name" colspan="6"/>
|
||||
<field name="email_to" widget="char" size="512"/>
|
||||
<field name="email_cc" widget="char" size="512"/>
|
||||
<field name="name" colspan="4" widget="char" size="512"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
|
@ -177,7 +178,7 @@
|
|||
</page>
|
||||
</notebook>
|
||||
<button colspan="4"
|
||||
string="Reply to Last Email"
|
||||
string="Reply"
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}"
|
||||
icon="gtk-undo" type="action" />
|
||||
|
|
|
@ -116,14 +116,16 @@
|
|||
|
||||
<page string="Emails" groups="base.group_extended">
|
||||
<group colspan="4">
|
||||
<field colspan="4" name="email_cc" string="CC"/>
|
||||
<field colspan="4" name="email_cc" string="Cc" widget="char" size="512"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="form,tree" height="280">
|
||||
<form string="Communication history">
|
||||
<group col="6" colspan="4">
|
||||
<field name="date"/>
|
||||
<field name="email_to"/>
|
||||
<group col="4" colspan="4">
|
||||
<field name="email_from"/>
|
||||
<field name="date"/>
|
||||
<field name="email_to" widget="char" size="512"/>
|
||||
<field name="email_cc" widget="char" size="512"/>
|
||||
<field name="name" colspan="4" widget="char" size="512"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
|
|
|
@ -217,7 +217,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
|||
)
|
||||
|
||||
if result:
|
||||
case_pool._history(cr, uid, [case], _('Forward'), history=True, email=this.email_to, subject=this.subject, details=body, email_from=email_from, attach=attach)
|
||||
case_pool.history(cr, uid, [case], _('Forward'), history=True, email=this.email_to, subject=this.subject, details=body, email_from=email_from, attach=attach)
|
||||
else:
|
||||
raise osv.except_osv(_('Error!'), _('Unable to send mail. Please check SMTP is configured properly.'))
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ class crm_lead2opportunity(osv.osv_memory):
|
|||
'type': 'opportunity'
|
||||
}
|
||||
lead_obj.write(cr, uid, lead.id, vals, context=context)
|
||||
lead_obj._history(cr, uid, [lead], _('Opportunity'), details='Converted to Opportunity', context=context)
|
||||
lead_obj.history(cr, uid, [lead], _('Opportunity'), details='Converted to Opportunity', context=context)
|
||||
if lead.partner_id:
|
||||
msg_ids = [ x.id for x in lead.message_ids]
|
||||
self.pool.get('mailgate.message').write(cr, uid, msg_ids, {'partner_id': lead.partner_id.id}, context=context)
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
from osv import osv, fields
|
||||
from tools.translate import _
|
||||
import base64
|
||||
import time
|
||||
import tools
|
||||
from crm import crm
|
||||
|
||||
|
@ -45,17 +44,17 @@ class crm_send_new_email_attachment(osv.osv_memory):
|
|||
|
||||
crm_send_new_email_attachment()
|
||||
|
||||
class crm_send_new_email(osv.osv_memory):
|
||||
class crm_send_new_email2(osv.osv_memory):
|
||||
""" Sends new email for the case"""
|
||||
_name = "crm.send.mail"
|
||||
_description = "Send new email"
|
||||
|
||||
_columns = {
|
||||
'email_to' : fields.char('To', size=64, required=True),
|
||||
'email_from' : fields.char('From', size=64, required=True),
|
||||
'email_cc' : fields.char('CC', size=128, help="Carbon Copy: list of recipients that will receive"\
|
||||
'email_to' : fields.char('To', size=512, required=True),
|
||||
'email_from' : fields.char('From', size=128, required=True),
|
||||
'email_cc' : fields.char('CC', size=512, help="Carbon Copy: list of recipients that will receive"\
|
||||
" a copy of this mail, and future communication related to this case"),
|
||||
'subject': fields.char('Subject', size=128, required=True),
|
||||
'subject': fields.char('Subject', size=512, required=True),
|
||||
'text': fields.text('Message', required=True),
|
||||
'state': fields.selection(crm.AVAILABLE_STATES, string='Set New State To', required=True),
|
||||
|
||||
|
@ -72,7 +71,6 @@ class crm_send_new_email(osv.osv_memory):
|
|||
"""
|
||||
|
||||
hist_obj = self.pool.get('mailgate.message')
|
||||
smtp_pool = self.pool.get('email.smtpclient')
|
||||
|
||||
if not context:
|
||||
context = {}
|
||||
|
@ -130,10 +128,11 @@ class crm_send_new_email(osv.osv_memory):
|
|||
if not flag:
|
||||
raise osv.except_osv(_('Error!'), _('Unable to send mail. Please check SMTP is configured properly.'))
|
||||
if flag:
|
||||
case_pool._history(cr, uid, [case], _('Send'), history=True, \
|
||||
case_pool.history(cr, uid, [case], _('Send'), history=True, \
|
||||
email=obj.email_to, details=body, \
|
||||
subject=obj.subject, email_from=email_from, \
|
||||
message_id=message_id, references=ref_id or message_id, attach=attach)
|
||||
email_cc=email_cc, message_id=message_id, \
|
||||
references=ref_id or message_id, attach=attach)
|
||||
if obj.state == 'unchanged':
|
||||
pass
|
||||
elif obj.state == 'done':
|
||||
|
@ -157,7 +156,7 @@ class crm_send_new_email(osv.osv_memory):
|
|||
if not context.get('model'):
|
||||
raise osv.except_osv(_('Error'), _('Can not send mail!'))
|
||||
|
||||
res = super(crm_send_new_email, self).default_get(cr, uid, fields, context=context)
|
||||
res = super(crm_send_new_email2, self).default_get(cr, uid, fields, context=context)
|
||||
|
||||
if context.get('mail') == 'reply':
|
||||
res.update(self.get_reply_defaults(cr, uid, fields, context=context))
|
||||
|
@ -248,13 +247,7 @@ class crm_send_new_email(osv.osv_memory):
|
|||
|
||||
if not context.get('model'):
|
||||
raise osv.except_osv(_('Error'), _('Can not send mail!'))
|
||||
model = context.get('model')
|
||||
mod_obj = self.pool.get(model)
|
||||
if context.get('mail') == 'reply':
|
||||
return True
|
||||
if tools.config.get('email_from'):
|
||||
return True
|
||||
return True
|
||||
|
||||
crm_send_new_email()
|
||||
crm_send_new_email2()
|
||||
|
||||
|
|
|
@ -254,6 +254,7 @@ and users by email"),
|
|||
'reference': False,
|
||||
'invoice_line': [(6, 0, lines)],
|
||||
'comment': "",
|
||||
'date_invoice': context.get('date_inv', False)
|
||||
})
|
||||
inv_id = inv_pool.create(cr, uid, val_invoice['value'])
|
||||
inv_pool.button_compute(cr, uid, [inv_id])
|
||||
|
|
|
@ -52,10 +52,14 @@ class partner_event_registration(osv.osv_memory):
|
|||
record_ids = context and context.get('active_ids', []) or []
|
||||
addr = res_obj.address_get(cr, uid, record_ids)
|
||||
contact_id = False
|
||||
email = False
|
||||
if addr.has_key('default'):
|
||||
job_ids = self.pool.get('res.partner.job').search(cr, uid, [('address_id', '=', addr['default'])])
|
||||
if job_ids:
|
||||
contact_id = self.pool.get('res.partner.job').browse(cr, uid, job_ids[0]).contact_id.id
|
||||
contact = self.pool.get('res.partner.job').browse(cr, uid, job_ids[0])
|
||||
if contact:
|
||||
contact_id = contact.contact_id.id
|
||||
email = contact.email
|
||||
|
||||
event_obj = self.pool.get('event.event')
|
||||
reg_obj = self.pool.get('event.registration')
|
||||
|
@ -83,6 +87,7 @@ class partner_event_registration(osv.osv_memory):
|
|||
'partner_invoice_id' : record_ids[0] or False,
|
||||
'event_product': current.event_id.product_id.name,
|
||||
'contact_id': contact_id,
|
||||
'email_from': email,
|
||||
'nb_register': current.nb_register,
|
||||
|
||||
}, context=context)
|
||||
|
|
|
@ -46,9 +46,10 @@
|
|||
'hr_data.xml',
|
||||
'board_hr_view.xml',
|
||||
],
|
||||
'demo_xml': ['hr_demo.xml',
|
||||
'hr_department_demo.xml'],
|
||||
|
||||
'demo_xml': [
|
||||
'hr_demo.xml',
|
||||
'hr_department_demo.xml'
|
||||
],
|
||||
'test': ['test/test_hr.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
|
|
|
@ -27,7 +27,6 @@ from tools.translate import _
|
|||
class hr_employee_category(osv.osv):
|
||||
_name = "hr.employee.category"
|
||||
_description = "Employee Category"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char("Category", size=64, required=True),
|
||||
'parent_id': fields.many2one('hr.employee.category', 'Parent Category', select=True),
|
||||
|
@ -60,6 +59,7 @@ class hr_employee_marital_status(osv.osv):
|
|||
hr_employee_marital_status()
|
||||
|
||||
class hr_job(osv.osv):
|
||||
|
||||
def _no_of_employee(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
for emp in self.browse(cr, uid, ids):
|
||||
|
@ -80,9 +80,9 @@ class hr_job(osv.osv):
|
|||
'state': fields.selection([('open', 'Open'),('old', 'Old'),('recruit', 'In Recruitement')], 'State', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
'expected_employees': lambda *a: 1,
|
||||
'expected_employees': 1,
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'hr.job', context=c),
|
||||
'state': lambda *args: 'open'
|
||||
'state': 'open'
|
||||
}
|
||||
|
||||
hr_job()
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<!-- Employee Marital Statusses -->
|
||||
<record id="hr_employee_marital_status_single" model="hr.employee.marital.status">
|
||||
<field name="name">Single</field>
|
||||
|
@ -14,5 +15,6 @@
|
|||
<record id="hr_employee_marital_status_widower" model="hr.employee.marital.status">
|
||||
<field name="name">Widower</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -25,6 +25,8 @@ import tools
|
|||
class hr_department(osv.osv):
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if not len(ids):
|
||||
return []
|
||||
reads = self.read(cr, uid, ids, ['name','parent_id'], context)
|
||||
|
@ -36,7 +38,7 @@ class hr_department(osv.osv):
|
|||
res.append((record['id'], name))
|
||||
return res
|
||||
|
||||
def _dept_name_get_fnc(self, cr, uid, ids, prop, unknow_none, context):
|
||||
def _dept_name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):
|
||||
res = self.name_get(cr, uid, ids, context)
|
||||
return dict(res)
|
||||
|
||||
|
@ -51,13 +53,19 @@ class hr_department(osv.osv):
|
|||
'manager_id': fields.many2one('res.users', 'Manager', required=True),
|
||||
'member_ids': fields.many2many('res.users', 'hr_department_user_rel', 'department_id', 'user_id', 'Members'),
|
||||
}
|
||||
def _get_members(self,cr, uid, context={}):
|
||||
|
||||
_defaults = {
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'hr.department', context=c),
|
||||
}
|
||||
|
||||
def _get_members(self,cr, uid, context=None):
|
||||
mids = self.search(cr, uid, [('manager_id', '=', uid)])
|
||||
result = {uid:1}
|
||||
for m in self.browse(cr, uid, mids, context):
|
||||
for user in m.member_ids:
|
||||
result[user.id] = 1
|
||||
return result.keys()
|
||||
|
||||
def _check_recursion(self, cr, uid, ids):
|
||||
level = 100
|
||||
while len(ids):
|
||||
|
@ -78,18 +86,17 @@ hr_department()
|
|||
class ir_action_window(osv.osv):
|
||||
_inherit = 'ir.actions.act_window'
|
||||
|
||||
def read(self, cr, uid, ids, fields=None, context=None,
|
||||
load='_classic_read'):
|
||||
def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'):
|
||||
if context is None:
|
||||
context = {}
|
||||
select = ids
|
||||
if isinstance(ids, (int, long)):
|
||||
select = [ids]
|
||||
res = super(ir_action_window, self).read(cr, uid, select, fields=fields,
|
||||
context=context, load=load)
|
||||
res = super(ir_action_window, self).read(cr, uid, select, fields=fields, context=context, load=load)
|
||||
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(self.pool.get('hr.department')._get_members(cr, uid)))
|
||||
if isinstance(ids, (int, long)):
|
||||
if res:
|
||||
return res[0]
|
||||
|
@ -103,7 +110,7 @@ class res_users(osv.osv):
|
|||
_inherit = 'res.users'
|
||||
_description = 'User'
|
||||
|
||||
def _parent_compute(self, cr, uid, ids, name, args, context={}):
|
||||
def _parent_compute(self, cr, uid, ids, name, args, context=None):
|
||||
result = {}
|
||||
obj_dept = self.pool.get('hr.department')
|
||||
for user_id in ids:
|
||||
|
@ -125,10 +132,12 @@ class res_users(osv.osv):
|
|||
return [('id', 'in', [0])]
|
||||
return [('id', 'in', child_ids.get(uid,[]))]
|
||||
|
||||
def _child_compute(self, cr, uid, ids, name, args, context={}):
|
||||
def _child_compute(self, cr, uid, ids, name, args, context=None):
|
||||
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)])
|
||||
|
@ -140,7 +149,6 @@ class res_users(osv.osv):
|
|||
childs = obj_user.search(cr, uid, [('id', 'in', childs),('active', '=', True)])
|
||||
if manager_id in childs:
|
||||
childs.remove(manager_id)
|
||||
|
||||
child_ids.extend(tools.flatten(childs))
|
||||
set = {}
|
||||
map(set.__setitem__, child_ids, [])
|
||||
|
@ -150,7 +158,7 @@ class res_users(osv.osv):
|
|||
result[manager_id] = child_ids
|
||||
return result
|
||||
|
||||
def _child_search(self, cr, uid, obj, name, args, context):
|
||||
def _child_search(self, cr, uid, obj, name, args, context=None):
|
||||
parent = []
|
||||
for arg in args:
|
||||
if arg[0] == 'child_ids':
|
||||
|
@ -165,5 +173,7 @@ class res_users(osv.osv):
|
|||
'child_ids': fields.function(_child_compute, relation='res.users', fnct_search=_child_search, method=True, string="Subordinates", type='many2many'),
|
||||
'context_department_id': fields.many2one('hr.department', 'Departments'),
|
||||
}
|
||||
|
||||
res_users()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_hr_installer" model="ir.ui.view">
|
||||
<field name="name">hr.installer.view</field>
|
||||
<field name="model">hr.installer</field>
|
||||
|
@ -10,15 +12,13 @@
|
|||
<form position="attributes">
|
||||
<attribute name="string">Select Human Resources Modules To Install</attribute>
|
||||
</form>
|
||||
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string">Select Human Resources Modules To Install</attribute>
|
||||
</separator>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">The base Human Resources addon will help you manage your employee roster, but you can enhance it even further by installing a few HR-related applications.</attribute>
|
||||
</xpath>
|
||||
<group colspan="8">
|
||||
|
@ -51,6 +51,7 @@
|
|||
<field name="action_id" ref="action_hr_installer"/>
|
||||
<field name="sequence">3</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_ir_actions_todo_tree" model="ir.ui.view">
|
||||
<field name="model">ir.actions.todo</field>
|
||||
<field name="name">hr_installer_action_replace</field>
|
||||
|
@ -62,5 +63,6 @@
|
|||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,32 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<menuitem
|
||||
id="menu_hr_root"
|
||||
icon="terp-hr"
|
||||
name="Human Resources"
|
||||
sequence="15"/>
|
||||
<menuitem
|
||||
id="menu_hr_main"
|
||||
parent="menu_hr_root"
|
||||
name="Human Resources"
|
||||
sequence="0"/>
|
||||
<menuitem
|
||||
id="menu_hr_configuration"
|
||||
name="Configuration"
|
||||
parent="hr.menu_hr_root"
|
||||
groups="group_hr_manager"
|
||||
sequence="50" />
|
||||
<menuitem
|
||||
id="menu_hr_management"
|
||||
name="Human Resources"
|
||||
parent="hr.menu_hr_configuration"
|
||||
groups="group_hr_manager"
|
||||
sequence="1" />
|
||||
<menuitem
|
||||
id="menu_view_employee_category_configuration_form"
|
||||
parent="hr.menu_hr_management"
|
||||
name="Employees"
|
||||
|
||||
<menuitem id="menu_hr_root" icon="terp-hr" name="Human Resources" sequence="15"/>
|
||||
<menuitem id="menu_hr_main" parent="menu_hr_root" name="Human Resources" sequence="0"/>
|
||||
<menuitem id="menu_hr_configuration" name="Configuration" parent="hr.menu_hr_root" groups="group_hr_manager" sequence="50" />
|
||||
<menuitem id="menu_hr_management" name="Human Resources" parent="hr.menu_hr_configuration" groups="group_hr_manager" sequence="1" />
|
||||
<menuitem id="menu_view_employee_category_configuration_form" parent="hr.menu_hr_management" name="Employees"
|
||||
sequence="1"/>
|
||||
|
||||
<!--
|
||||
|
@ -112,14 +92,14 @@
|
|||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_employee_filter" model="ir.ui.view">
|
||||
<field name="name">Employees</field>
|
||||
<field name="model">hr.employee</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Employees">
|
||||
<filter icon="terp-personal-" domain="[('active','=',False)]" string="Unactive"
|
||||
groups="base.group_extended"/>
|
||||
<filter icon="terp-personal-" domain="[('active','=',False)]" string="Unactive" groups="base.group_extended"/>
|
||||
<field name="name"/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
<field name="job_id" widget="selection"/>
|
||||
|
@ -135,6 +115,7 @@
|
|||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="open_view_employee_tree" model="ir.actions.act_window">
|
||||
<field name="name">Employees Structure</field>
|
||||
<field name="res_model">hr.employee</field>
|
||||
|
@ -153,6 +134,7 @@
|
|||
<field name="view_id" eval="False"/>
|
||||
<field name="search_view_id" ref="view_employee_filter"/>
|
||||
</record>
|
||||
|
||||
<record id="open_view_employee_list_my" model="ir.actions.act_window">
|
||||
<field name="name">Employees</field>
|
||||
<field name="res_model">hr.employee</field>
|
||||
|
@ -162,17 +144,14 @@
|
|||
<field name="view_id" ref="view_employee_tree"/>
|
||||
<field name="search_view_id" ref="view_employee_filter"/>
|
||||
</record>
|
||||
<menuitem
|
||||
action="open_view_employee_list_my"
|
||||
id="menu_open_view_employee_list_my"
|
||||
sequence="3"
|
||||
parent="menu_hr_main"/>
|
||||
|
||||
<menuitem action="open_view_employee_list_my" id="menu_open_view_employee_list_my" sequence="3" parent="menu_hr_main"/>
|
||||
|
||||
<!--
|
||||
=======================
|
||||
Employee marital status
|
||||
======================= -->
|
||||
=======================
|
||||
-->
|
||||
|
||||
<record id="hr_hr_employee_marital_status_form" model="ir.ui.view">
|
||||
<field name="name">hr.hr.employee.marital.status</field>
|
||||
|
@ -194,17 +173,15 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
action="action_hr_marital_status"
|
||||
id="hr_menu_marital_status"
|
||||
<menuitem action="action_hr_marital_status" id="hr_menu_marital_status"
|
||||
parent="hr.menu_view_employee_category_configuration_form" sequence="3"/>
|
||||
|
||||
|
||||
<!--
|
||||
=======================
|
||||
Employee architecture
|
||||
=======================
|
||||
-->
|
||||
|
||||
<record id="view_partner_tree2" model="ir.ui.view">
|
||||
<field name="name">hr.employee.tree</field>
|
||||
<field name="model">hr.employee</field>
|
||||
|
@ -216,10 +193,10 @@
|
|||
<field name="ssnid"/>
|
||||
<field name="user_id"/>
|
||||
<field name="address_id"/>
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action2" model="ir.actions.act_window">
|
||||
<field name="name">Employee Hierarchy</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
|
@ -228,6 +205,7 @@
|
|||
<field name="view_type">tree</field>
|
||||
<field name="view_id" ref="view_partner_tree2"/>
|
||||
</record>
|
||||
|
||||
<ir_set>
|
||||
<field eval="'action'" name="key"/>
|
||||
<field eval="'client_action_multi'" name="key2"/>
|
||||
|
@ -255,6 +233,7 @@
|
|||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_employee_category_list" model="ir.ui.view">
|
||||
<field name="name">hr.employee.category.list</field>
|
||||
<field name="model">hr.employee.category</field>
|
||||
|
@ -267,6 +246,7 @@
|
|||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_employee_category_tree" model="ir.ui.view">
|
||||
<field name="name">hr.employee.category.tree</field>
|
||||
<field name="model">hr.employee.category</field>
|
||||
|
@ -278,6 +258,7 @@
|
|||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="open_view_categ_form" model="ir.actions.act_window">
|
||||
<field name="name">Categories of Employee</field>
|
||||
<field name="res_model">hr.employee.category</field>
|
||||
|
@ -285,10 +266,8 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="open_view_categ_form"
|
||||
id="menu_view_employee_category_form"
|
||||
parent="menu_view_employee_category_configuration_form" sequence="1"
|
||||
groups="base.group_extended"/>
|
||||
<menuitem action="open_view_categ_form" id="menu_view_employee_category_form"
|
||||
parent="menu_view_employee_category_configuration_form" sequence="1" groups="base.group_extended"/>
|
||||
|
||||
<record id="open_view_categ_tree" model="ir.actions.act_window">
|
||||
<field name="name">Categories structure</field>
|
||||
|
@ -316,9 +295,7 @@
|
|||
<field eval="True" name="object"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
action="open_view_categ_tree"
|
||||
groups="base.group_extended"
|
||||
<menuitem action="open_view_categ_tree" groups="base.group_extended"
|
||||
id="menu_view_employee_category_tree" parent="hr.menu_view_employee_category_form"/>
|
||||
|
||||
<record id="view_hr_job_form" model="ir.ui.view">
|
||||
|
@ -350,6 +327,7 @@
|
|||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_hr_job_tree" model="ir.ui.view">
|
||||
<field name="name">hr.job.tree</field>
|
||||
<field name="model">hr.job</field>
|
||||
|
@ -364,35 +342,28 @@
|
|||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_job_filter" model="ir.ui.view">
|
||||
<field name="name">Job</field>
|
||||
<field name="model">hr.job</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Jobs">
|
||||
<filter icon="terp-check"
|
||||
domain="[('state','in',('open','recruit'))]"
|
||||
string="Current"
|
||||
<filter icon="terp-check" domain="[('state','in',('open','recruit'))]" string="Current"
|
||||
help="Open and in recruitment positions"/>
|
||||
<filter icon="terp-personal+"
|
||||
domain="[('state','=','recruit')]"
|
||||
string="Recruitment"
|
||||
<filter icon="terp-personal+" domain="[('state','=','recruit')]" string="Recruitment"
|
||||
help="In Recruitment"/>
|
||||
<filter icon="terp-camera_test"
|
||||
domain="[('state','=','open')]"
|
||||
string="Open"
|
||||
<filter icon="terp-camera_test" domain="[('state','=','open')]" string="Open"
|
||||
help="Open Positions"/>
|
||||
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="department_id" widget="selection">
|
||||
<filter icon="terp-gtk-select-all"
|
||||
domain="[('department_id','=',context.get('department_id',False))]"
|
||||
help="My Departments Jobs"/>
|
||||
<filter icon="terp-gtk-select-all" domain="[('department_id','=',context.get('department_id',False))]" help="My Departments Jobs"/>
|
||||
</field>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_hr_job">
|
||||
<field name="name">Job Positions</field>
|
||||
<field name="res_model">hr.job</field>
|
||||
|
@ -400,14 +371,8 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Recruitment"
|
||||
id="base.menu_crm_case_job_req_main"
|
||||
parent="menu_hr_root"/>
|
||||
<menuitem
|
||||
parent="base.menu_crm_case_job_req_main"
|
||||
id="menu_hr_job"
|
||||
action="action_hr_job" sequence="2"/>
|
||||
<menuitem name="Recruitment" id="base.menu_crm_case_job_req_main" parent="menu_hr_root"/>
|
||||
<menuitem parent="base.menu_crm_case_job_req_main" id="menu_hr_job" action="action_hr_job" sequence="2"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -23,7 +23,6 @@ from osv import fields, osv
|
|||
class hr_installer(osv.osv_memory):
|
||||
_name = 'hr.installer'
|
||||
_inherit = 'res.config.installer'
|
||||
|
||||
_columns = {
|
||||
# Human Resources Management
|
||||
'hr_holidays': fields.boolean('Holidays / Leaves Management',
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="group_hr_manager" model="res.groups">
|
||||
<field name="name">Human Resources / Manager</field>
|
||||
</record>
|
||||
|
||||
<record id="group_hr_user" model="res.groups">
|
||||
<field name="name">Human Resources / User</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
'category': 'Generic Modules/Human Resources',
|
||||
'description': """
|
||||
This module aims to manage employee's attendances.
|
||||
|
||||
Keeps account of the attendances of the employees on the basis of the
|
||||
actions(Sign in/Sign out) performed by them.
|
||||
""",
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
from mx import DateTime
|
||||
import time
|
||||
|
||||
from osv import fields, osv
|
||||
|
@ -33,7 +32,7 @@ class hr_action_reason(osv.osv):
|
|||
'action_type': fields.selection([('sign_in', 'Sign in'), ('sign_out', 'Sign out')], "Action's type"),
|
||||
}
|
||||
_defaults = {
|
||||
'action_type' : lambda *a: 'sign_in',
|
||||
'action_type': 'sign_in',
|
||||
}
|
||||
hr_action_reason()
|
||||
|
||||
|
@ -51,8 +50,8 @@ class hr_attendance(osv.osv):
|
|||
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'))
|
||||
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'name': fields.datetime('Date', required=True, select=1),
|
||||
'action': fields.selection([('sign_in', 'Sign In'), ('sign_out', 'Sign Out'), ('action','Action')], 'Action', required=True),
|
||||
|
@ -61,7 +60,7 @@ class hr_attendance(osv.osv):
|
|||
'day': fields.function(_day_compute, method=True, type='char', string='Day', store=True, select=1, size=32),
|
||||
}
|
||||
_defaults = {
|
||||
'name' : lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'name': time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'employee_id': _employee_get,
|
||||
}
|
||||
|
||||
|
@ -75,7 +74,6 @@ class hr_attendance(osv.osv):
|
|||
and name <= (select name from hr_attendance where id=%s)
|
||||
order by name desc
|
||||
limit 2 '''
|
||||
|
||||
cr.execute(sql,(id,id))
|
||||
atts = cr.fetchall()
|
||||
if not ((len(atts)==1 and atts[0][0] == 'sign_in') or (atts[0][0] != atts[1][0] and atts[0][1] != atts[1][1])):
|
||||
|
@ -113,19 +111,18 @@ class hr_employee(osv.osv):
|
|||
'state': fields.function(_state, method=True, type='selection', selection=[('absent', 'Absent'), ('present', 'Present')], string='Attendance'),
|
||||
}
|
||||
|
||||
def _action_check(self, cr, uid, emp_id, dt=False,context={}):
|
||||
def _action_check(self, cr, uid, emp_id, dt=False, context=None):
|
||||
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={}, dt=False, *args):
|
||||
def attendance_action_change(self, cr, uid, ids, type='action', context=None, dt=False, *args):
|
||||
id = False
|
||||
warning_sign = 'sign'
|
||||
|
||||
#Special case when button calls this method :type=context
|
||||
if isinstance(type, dict):
|
||||
type = type.get('type','action')
|
||||
|
||||
if type == 'sign_in':
|
||||
warning_sign = "Sign In"
|
||||
elif type == 'sign_out':
|
||||
|
@ -139,11 +136,11 @@ class hr_employee(osv.osv):
|
|||
|
||||
if dt:
|
||||
res['name'] = dt
|
||||
|
||||
id = self.pool.get('hr.attendance').create(cr, uid, res, context=context)
|
||||
|
||||
if type != 'action':
|
||||
return id
|
||||
|
||||
return True
|
||||
|
||||
hr_employee()
|
||||
|
|
|
@ -7,100 +7,120 @@
|
|||
<field name="action">sign_in</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance2" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-01 11:51')" name="name"/>
|
||||
<field name="action">sign_out</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance3" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-02 12:47')" name="name"/>
|
||||
<field name="action">sign_in</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance4" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-02 19:53')" name="name"/>
|
||||
<field name="action">sign_out</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance5" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-03 07:32')" name="name"/>
|
||||
<field name="action">sign_in</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance6" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-03 12:32')" name="name"/>
|
||||
<field name="action">sign_out</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance7" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-04 14:01')" name="name"/>
|
||||
<field name="action">sign_in</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance8" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-04 17:21')" name="name"/>
|
||||
<field name="action">sign_out</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance9" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-05 09:10')" name="name"/>
|
||||
<field name="action">sign_in</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance10" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-05 12:42')" name="name"/>
|
||||
<field name="action">sign_out</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance11" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-06 13:10')" name="name"/>
|
||||
<field name="action">sign_in</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance12" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-06 18:34')" name="name"/>
|
||||
<field name="action">sign_out</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance13" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-07 08:21')" name="name"/>
|
||||
<field name="action">sign_in</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance14" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-07 18:21')" name="name"/>
|
||||
<field name="action">sign_out</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance15" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-08 08:21')" name="name"/>
|
||||
<field name="action">sign_in</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance16" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-08 12:54')" name="name"/>
|
||||
<field name="action">sign_out</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance17" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-09 13:32')" name="name"/>
|
||||
<field name="action">sign_in</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance18" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-09 19:31')" name="name"/>
|
||||
<field name="action">sign_out</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance19" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-10 07:10')" name="name"/>
|
||||
<field name="action">sign_in</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance20" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-10 12:34')" name="name"/>
|
||||
<field name="action">sign_out</field>
|
||||
<field name="employee_id" ref="hr.employee1"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<report auto="False" id="attendance_error_report" keyword="client_print_multi" menu="False" model="hr.employee" multi="True" name="report.hr.timesheet.attendance.error" rml="hr_attendance/report/attendance_errors.rml" string="Attendance Error Report"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -8,13 +8,14 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Employee attendance">
|
||||
<field name="employee_id" select="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="action" select="1"/>
|
||||
<field name="action_desc" select="1"/>
|
||||
<field name="employee_id" />
|
||||
<field name="name" />
|
||||
<field name="action" />
|
||||
<field name="action_desc" />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_attendance_tree" model="ir.ui.view">
|
||||
<field name="name">hr.attendance.tree</field>
|
||||
<field name="model">hr.attendance</field>
|
||||
|
@ -51,9 +52,9 @@
|
|||
<filter icon="terp-stock_align_left_24" string="My Attendances" domain="[('employee_id.user_id.id', '=', uid)]" />
|
||||
<filter icon="terp-go-today" string="Today" domain="[('name::date','=',current_date)]" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="employee_id" select="1" />
|
||||
<field name="name" select="1" />
|
||||
<field name="action" select="1" />
|
||||
<field name="employee_id" />
|
||||
<field name="name" />
|
||||
<field name="action" />
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter name="employee" string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
|
||||
|
@ -74,12 +75,8 @@
|
|||
|
||||
<!--<menuitem id="menu_hr_attendance" name="Attendances" parent="hr.menu_hr_root"
|
||||
groups="group_hr_attendance"/>-->
|
||||
<menuitem
|
||||
id="menu_hr_time_tracking"
|
||||
name="Time Tracking"
|
||||
parent="hr.menu_hr_root" sequence="3"/>
|
||||
<menuitem action="open_view_attendance" id="menu_open_view_attendance"
|
||||
parent="menu_hr_time_tracking" groups="hr.group_hr_manager" sequence="3"/>
|
||||
<menuitem id="menu_hr_time_tracking" name="Time Tracking" parent="hr.menu_hr_root" sequence="3"/>
|
||||
<menuitem action="open_view_attendance" id="menu_open_view_attendance" parent="menu_hr_time_tracking" groups="hr.group_hr_manager" sequence="3"/>
|
||||
|
||||
<record id="edit_attendance_reason" model="ir.ui.view">
|
||||
<field name="name">hr.action.reason.form</field>
|
||||
|
@ -87,11 +84,12 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Define attendance reason">
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<field name="action_type" select="1"/>
|
||||
<field colspan="4" name="name" />
|
||||
<field name="action_type" />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_attendance_reason" model="ir.ui.view">
|
||||
<field name="name">hr.action.reason.tree</field>
|
||||
<field name="model">hr.action.reason</field>
|
||||
|
@ -103,6 +101,7 @@
|
|||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="open_view_attendance_reason" model="ir.actions.act_window">
|
||||
<field name="name">Attendance Reasons</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
|
@ -111,6 +110,7 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_attendance_reason"/>
|
||||
</record>
|
||||
|
||||
<menuitem sequence="9" id="hr.menu_open_view_attendance_reason_config" parent="hr.menu_hr_configuration" name="Leaves"/>
|
||||
<menuitem action="open_view_attendance_reason" id="menu_open_view_attendance_reason" parent="hr.menu_open_view_attendance_reason_config"/>
|
||||
|
||||
|
|
|
@ -13,9 +13,7 @@
|
|||
groups="group_hr_attendance"/>-->
|
||||
<!--Time Tracking menu for Project Management-->
|
||||
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project" sequence="10"/>
|
||||
<menuitem
|
||||
id="base.menu_project_management_time_tracking"
|
||||
name="Time Tracking"
|
||||
<menuitem id="base.menu_project_management_time_tracking" name="Time Tracking"
|
||||
parent="base.menu_main_pm" sequence="3"/>
|
||||
<!--<menuitem action="hr_attendance.si_so" id="menu_project_management_si_so" parent="base.menu_project_management_time_tracking" type="wizard" sequence="9"/>
|
||||
-->
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
import time
|
||||
from report import report_sxw
|
||||
import pooler
|
||||
import datetime
|
||||
|
||||
class attendance_print(report_sxw.rml_parse):
|
||||
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(attendance_print, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
|
@ -88,6 +88,5 @@ class attendance_print(report_sxw.rml_parse):
|
|||
|
||||
report_sxw.report_sxw('report.hr.attendance.error', 'hr.employee', 'addons/hr_attendance/report/attendance_errors.rml', parser=attendance_print, header=2)
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -38,7 +38,10 @@ def hour2str(h):
|
|||
return '%02dh%02d' % (hours, minutes)
|
||||
|
||||
class report_custom(report_rml):
|
||||
def create_xml(self, cr, uid, ids, datas, context):
|
||||
|
||||
def create_xml(self, cr, uid, ids, datas, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
month = DateTime.DateTime(datas['form']['year'], datas['form']['month'], 1)
|
||||
user_xml = ['<month>%s</month>' % month2name[month.month], '<year>%s</year>' % month.year]
|
||||
for employee_id in ids:
|
||||
|
@ -88,7 +91,6 @@ class report_custom(report_rml):
|
|||
%s
|
||||
</report>
|
||||
''' % '\n'.join(user_xml)
|
||||
|
||||
return xml
|
||||
|
||||
report_custom('report.hr.attendance.bymonth', 'hr.employee', '', 'addons/hr_attendance/report/bymonth.xsl')
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
from mx import DateTime
|
||||
from mx.DateTime import now
|
||||
|
||||
import netsvc
|
||||
|
||||
import pooler
|
||||
|
||||
from report.interface import report_rml
|
||||
|
@ -35,13 +35,12 @@ def to_hour(h):
|
|||
return int(h), int(round((h - int(h)) * 60, 0))
|
||||
|
||||
class report_custom(report_rml):
|
||||
def create_xml(self, cr, uid, ids, datas, context):
|
||||
|
||||
def create_xml(self, cr, uid, ids, datas, context=None):
|
||||
start_date = DateTime.strptime(datas['form']['init_date'], '%Y-%m-%d')
|
||||
end_date = DateTime.strptime(datas['form']['end_date'], '%Y-%m-%d')
|
||||
first_monday = start_date - DateTime.RelativeDateTime(days=start_date.day_of_week)
|
||||
last_monday = end_date + DateTime.RelativeDateTime(days=7 - end_date.day_of_week)
|
||||
|
||||
if last_monday < first_monday:
|
||||
first_monday, last_monday = last_monday, first_monday
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="group_hr_attendance" model="res.groups">
|
||||
<field name="name">Human Resources / Attendances User</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
|
||||
from osv import osv, fields
|
||||
|
@ -26,16 +27,17 @@ class hr_attendance_bymonth(osv.osv_memory):
|
|||
_name = 'hr.attendance.month'
|
||||
_description = 'Print Monthly Attendance Report'
|
||||
_columns = {
|
||||
'month': fields.selection([(1, 'January'), (2, 'February'), (3, 'March'), (4, 'April'), (5, 'May'), (6, 'June'), (7, 'July'), (8, 'August'), (9, 'September'), (10, 'October'), (11, 'November'), (12, 'December')],
|
||||
'Month', required=True),
|
||||
'month': fields.selection([(1, 'January'), (2, 'February'), (3, 'March'), (4, 'April'), (5, 'May'), (6, 'June'), (7, 'July'), (8, 'August'), (9, 'September'), (10, 'October'), (11, 'November'), (12, 'December')], 'Month', required=True),
|
||||
'year': fields.integer('Year', required=True)
|
||||
}
|
||||
_defaults = {
|
||||
'month': lambda * a: time.gmtime()[1],
|
||||
'year': lambda * a: time.gmtime()[0],
|
||||
'month': time.gmtime()[1],
|
||||
'year': time.gmtime()[0],
|
||||
}
|
||||
|
||||
def print_report(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
datas = {
|
||||
'ids': [],
|
||||
'model': 'hr.employee',
|
||||
|
|
|
@ -30,8 +30,8 @@ class hr_attendance_byweek(osv.osv_memory):
|
|||
'end_date': fields.date('Ending Date', required=True)
|
||||
}
|
||||
_defaults = {
|
||||
'init_date': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'end_date': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'init_date': time.strftime('%Y-%m-%d'),
|
||||
'end_date': time.strftime('%Y-%m-%d'),
|
||||
}
|
||||
|
||||
def print_report(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -31,15 +31,16 @@ class hr_attendance_error(osv.osv_memory):
|
|||
'init_date': fields.date('Starting Date', required=True),
|
||||
'end_date': fields.date('Ending Date', required=True),
|
||||
'max_delay': fields.integer('Max. Delay (Min)', required=True)
|
||||
|
||||
}
|
||||
_defaults = {
|
||||
'init_date': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'end_date': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'init_date': time.strftime('%Y-%m-%d'),
|
||||
'end_date': time.strftime('%Y-%m-%d'),
|
||||
'max_delay': 120,
|
||||
}
|
||||
|
||||
def print_report(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
emp_ids = []
|
||||
data_error = self.read(cr, uid, ids)[0]
|
||||
date_from = data_error['init_date']
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
##############################################################################
|
||||
import time
|
||||
|
||||
import netsvc
|
||||
from osv import osv, fields
|
||||
from tools.translate import _
|
||||
|
||||
|
@ -32,7 +31,10 @@ class hr_si_so_ask(osv.osv_memory):
|
|||
'last_time': fields.datetime('Your last sign out', required=True),
|
||||
'emp_id': fields.char('Empoyee ID', size=32, required=True, readonly=True),
|
||||
}
|
||||
|
||||
def _get_empname(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].name
|
||||
|
@ -152,11 +154,8 @@ class hr_sign_in_out(osv.osv_memory):
|
|||
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
|
||||
})
|
||||
self.pool.get('hr.attendance').create(cr, uid, {'name': data['last_time'], 'action': 'sign_out',
|
||||
'employee_id': emp_id})
|
||||
try:
|
||||
success = self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_in')
|
||||
except:
|
||||
|
|
|
@ -45,8 +45,7 @@
|
|||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_hr_attendance_sigh_in_out"
|
||||
id="menu_hr_attendance_sigh_in_out"
|
||||
<menuitem action="action_hr_attendance_sigh_in_out" id="menu_hr_attendance_sigh_in_out"
|
||||
parent="menu_hr_time_tracking" sequence="4"/>
|
||||
|
||||
<record id="view_hr_attendance_so_ask" model="ir.ui.view">
|
||||
|
@ -87,6 +86,5 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
* Martial status,
|
||||
* Security number,
|
||||
* Place of birth, birth date, ...
|
||||
|
||||
You can assign several contracts per employee.
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
|
|
|
@ -46,7 +46,7 @@ class hr_contract_wage_type_period(osv.osv):
|
|||
'factor_days': fields.float('Hours in the period', digits=(12,4), required=True, help='This field is used by the timesheet system to compute the price of an hour of work wased on the contract of the employee')
|
||||
}
|
||||
_defaults = {
|
||||
'factor_days': lambda *args: 168.0
|
||||
'factor_days': 168.0
|
||||
}
|
||||
hr_contract_wage_type_period()
|
||||
|
||||
|
@ -61,8 +61,8 @@ class hr_contract_wage_type(osv.osv):
|
|||
'factor_type': fields.float('Factor for hour cost', digits=(12,4), required=True, help='This field is used by the timesheet system to compute the price of an hour of work wased on the contract of the employee')
|
||||
}
|
||||
_defaults = {
|
||||
'type' : lambda *a : 'gross',
|
||||
'factor_type': lambda *args: 1.8
|
||||
'type': 'gross',
|
||||
'factor_type': 1.8
|
||||
}
|
||||
hr_contract_wage_type()
|
||||
|
||||
|
@ -95,8 +95,9 @@ class hr_contract(osv.osv):
|
|||
'notes': fields.text('Notes'),
|
||||
}
|
||||
_defaults = {
|
||||
'date_start' : lambda *a : time.strftime("%Y-%m-%d"),
|
||||
'date_start': time.strftime("%Y-%m-%d"),
|
||||
}
|
||||
|
||||
hr_contract()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<field name="type">gross</field>
|
||||
<field name="period_id" ref="hr_contract_wage_type_period_monthly"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_contract_monthly_net" model="hr.contract.wage.type">
|
||||
<field name="name">Monthly Net Wage</field>
|
||||
<field name="type">net</field>
|
||||
|
|
|
@ -58,7 +58,6 @@
|
|||
</record>
|
||||
|
||||
<menuitem id="next_id_56" name="Contract" parent="hr.menu_hr_management" sequence="5"/>
|
||||
|
||||
<menuitem action="action_hr_contract_wage_type" id="hr_menu_contract_wage_type" parent="next_id_56"/>
|
||||
|
||||
<record id="hr_contract_wage_type_period_view_form" model="ir.ui.view">
|
||||
|
@ -94,12 +93,9 @@
|
|||
<field name="search_view_id" ref="hr_contract_wage_type_period_view_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
action="action_hr_contract_wage_type_period"
|
||||
id="hr_menu_contract_wage_type_period"
|
||||
<menuitem action="action_hr_contract_wage_type_period" id="hr_menu_contract_wage_type_period"
|
||||
parent="hr_contract.next_id_56"/>
|
||||
|
||||
|
||||
<record id="hr_hr_employee_view_form2" model="ir.ui.view">
|
||||
<field name="name">hr.hr.employee.view.form2</field>
|
||||
<field name="model">hr.employee</field>
|
||||
|
@ -115,13 +111,13 @@
|
|||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Job Info" colspan="2"/>
|
||||
<field name="manager" select="1"/>
|
||||
<field name="vehicle" select="1"/>
|
||||
<field name="vehicle_distance" select="1"/>
|
||||
<field name="manager" />
|
||||
<field name="vehicle" />
|
||||
<field name="vehicle_distance" />
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Others Info" colspan="2"/>
|
||||
<field name="medic_exam" select="1"/>
|
||||
<field name="medic_exam" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
|
@ -155,8 +151,8 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Contract">
|
||||
<group colspan="3" col="6">
|
||||
<field name="name" select="1"/>
|
||||
<field name="employee_id" select="1"/>
|
||||
<field name="name" />
|
||||
<field name="employee_id" />
|
||||
<field name="job_id"/>
|
||||
<field name="wage"/>
|
||||
<field name="wage_type_id" widget="selection"/>
|
||||
|
@ -166,8 +162,8 @@
|
|||
<page string="Main Data">
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Duration"/>
|
||||
<field name="date_start" select="1"/>
|
||||
<field name="date_end" select="1"/>
|
||||
<field name="date_start" />
|
||||
<field name="date_end" />
|
||||
<field name="working_hours"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
|
@ -254,13 +250,12 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="hr_contract_type_view_search"/>
|
||||
</record>
|
||||
<menuitem action="action_hr_contract_type" id="hr_menu_contract_type" parent="next_id_56"/>
|
||||
|
||||
<menuitem action="action_hr_contract_type" id="hr_menu_contract_type" parent="next_id_56"/>
|
||||
<menuitem action="action_hr_contract" id="hr_menu_contract" parent="hr.menu_hr_main" name="Contracts" sequence="4"/>
|
||||
|
||||
<!-- Contracts Button on Employee Form -->
|
||||
<act_window domain="[('employee_id', '=', active_id)]" id="act_hr_employee_2_hr_contract" name="Contracts" res_model="hr.contract" src_model="hr.employee"/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -33,7 +33,8 @@
|
|||
in which various surveys can be created and it can be defined which
|
||||
level of employee hierarchy fills what and final review and evaluation
|
||||
is done by the manager.Every evaluation filled by the employees can be viewed
|
||||
in the form of.Implements a dashboard for My Current Evaluations """,
|
||||
in the form of.Implements a dashboard for My Current Evaluations
|
||||
""",
|
||||
"init_xml": [],
|
||||
"demo_xml": ["hr_evaluation_demo.xml",
|
||||
],
|
||||
|
@ -41,7 +42,8 @@
|
|||
"security/ir.model.access.csv",
|
||||
"wizard/hr_evaluation_mail_view.xml",
|
||||
"hr_evaluation_view.xml",
|
||||
"report/hr_evaluation_report_view.xml"],
|
||||
"report/hr_evaluation_report_view.xml"
|
||||
],
|
||||
"test": ["test/test_hr_evaluation.yml"],
|
||||
"active": False,
|
||||
"installable": True
|
||||
|
|
|
@ -75,7 +75,7 @@ class hr_evaluation_plan_phase(osv.osv):
|
|||
'email_subject':fields.text('char')
|
||||
}
|
||||
_defaults = {
|
||||
'sequence' : lambda *a: 1,
|
||||
'sequence' : 1,
|
||||
'email_subject': _('''Regarding '''),
|
||||
'mail_body' : lambda *a:_('''
|
||||
Date : %(date)s
|
||||
|
@ -93,8 +93,6 @@ Thanks,
|
|||
|
||||
'''),
|
||||
}
|
||||
|
||||
|
||||
hr_evaluation_plan_phase()
|
||||
|
||||
class hr_employee(osv.osv):
|
||||
|
@ -106,6 +104,8 @@ class hr_employee(osv.osv):
|
|||
}
|
||||
|
||||
def run_employee_evaluation(self, cr, uid, automatic=False, use_new_cursor=False, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
for id in self.browse(cr, uid, self.search(cr, uid, [], context=context), context=context):
|
||||
if id.evaluation_plan_id and id.evaluation_date:
|
||||
if (dt.ISO.ParseAny(id.evaluation_date) + dt.RelativeDateTime(months = int(id.evaluation_plan_id.month_next))).strftime('%Y-%m-%d') <= time.strftime("%Y-%m-%d"):
|
||||
|
@ -113,7 +113,7 @@ class hr_employee(osv.osv):
|
|||
self.pool.get("hr_evaluation.evaluation").create(cr, uid, {'employee_id' : id.id, 'plan_id': id.evaluation_plan_id}, context)
|
||||
return True
|
||||
|
||||
def onchange_evaluation_plan_id(self, cr, uid, ids, evaluation_plan_id, evaluation_date, context={}):
|
||||
def onchange_evaluation_plan_id(self, cr, uid, ids, evaluation_plan_id, evaluation_date, context=None):
|
||||
evaluation_date = evaluation_date or False
|
||||
evaluation_plan_obj=self.pool.get('hr_evaluation.plan')
|
||||
if evaluation_plan_id:
|
||||
|
@ -130,7 +130,7 @@ class hr_employee(osv.osv):
|
|||
self.pool.get("hr_evaluation.evaluation").create(cr, uid, {'employee_id': ids[0], 'plan_id': evaluation_plan_id}, context=context)
|
||||
return {'value': {'evaluation_date': evaluation_date}}
|
||||
|
||||
def create(self, cr, uid, vals, context={}):
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
id = super(hr_employee, self).create(cr, uid, vals, context=context)
|
||||
if vals.get('evaluation_plan_id', False):
|
||||
self.pool.get("hr_evaluation.evaluation").create(cr, uid, {'employee_id' : id, 'plan_id': vals['evaluation_plan_id']}, context=context)
|
||||
|
@ -183,7 +183,7 @@ class hr_evaluation(osv.osv):
|
|||
res.append((record['id'], name))
|
||||
return res
|
||||
|
||||
def onchange_employee_id(self, cr, uid, ids, employee_id, context={}):
|
||||
def onchange_employee_id(self, cr, uid, ids, employee_id, context=None):
|
||||
employee_obj=self.pool.get('hr.employee')
|
||||
evaluation_plan_id=''
|
||||
if employee_id:
|
||||
|
@ -193,7 +193,7 @@ class hr_evaluation(osv.osv):
|
|||
employee_ids=employee_obj.search(cr, uid, [('parent_id','=',employee.id)], context=context)
|
||||
return {'value': {'plan_id':evaluation_plan_id}}
|
||||
|
||||
def button_plan_in_progress(self, cr, uid, ids, context={}):
|
||||
def button_plan_in_progress(self, cr, uid, ids, context=None):
|
||||
apprai_id = []
|
||||
for evaluation in self.browse(cr, uid, ids, context):
|
||||
wait = False
|
||||
|
@ -224,13 +224,8 @@ class hr_evaluation(osv.osv):
|
|||
hr_eval_inter_obj.survey_req_waiting_answer(cr, uid, [int_id], context=context)
|
||||
|
||||
if (not wait) and phase.mail_feature:
|
||||
body = phase.mail_body % {
|
||||
'employee_name': child.name,
|
||||
'user_signature': user.signature,
|
||||
'eval_name': phase.survey_id.title,
|
||||
'date': time.strftime('%Y-%m-%d'),
|
||||
'time': time
|
||||
}
|
||||
body = phase.mail_body % {'employee_name': child.name, 'user_signature': user.signature,
|
||||
'eval_name': phase.survey_id.title, 'date': time.strftime('%Y-%m-%d'), 'time': time }
|
||||
sub = phase.email_subject
|
||||
dest = [child.work_email]
|
||||
if dest:
|
||||
|
@ -239,7 +234,7 @@ class hr_evaluation(osv.osv):
|
|||
self.write(cr, uid, ids, {'state':'wait'}, context=context)
|
||||
return True
|
||||
|
||||
def button_final_validation(self, cr, uid, ids, context={}):
|
||||
def button_final_validation(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, {'state':'progress'})
|
||||
request_obj = self.pool.get('hr.evaluation.interview')
|
||||
for id in self.browse(cr, uid ,ids,context=context):
|
||||
|
@ -247,11 +242,11 @@ class hr_evaluation(osv.osv):
|
|||
raise osv.except_osv(_('Warning !'),_("You cannot change state, because some appraisal in waiting answer or draft state"))
|
||||
return True
|
||||
|
||||
def button_done(self,cr, uid, ids, context={}):
|
||||
def button_done(self,cr, uid, ids, context=None):
|
||||
self.write(cr,uid,ids,{'state':'done', 'date_close': time.strftime('%Y-%m-%d')}, context=context)
|
||||
return True
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context={}):
|
||||
def button_cancel(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids,{'state':'cancel'}, context=context)
|
||||
return True
|
||||
|
||||
|
@ -281,7 +276,7 @@ class hr_evaluation_interview(osv.osv):
|
|||
'is_evaluation': True,
|
||||
}
|
||||
|
||||
def survey_req_waiting_answer(self, cr, uid, ids, context={}):
|
||||
def survey_req_waiting_answer(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, { 'state' : 'waiting_answer'})
|
||||
return True
|
||||
|
||||
|
@ -310,11 +305,11 @@ class hr_evaluation_interview(osv.osv):
|
|||
self.write(cr, uid, ids, { 'state': 'done'})
|
||||
return True
|
||||
|
||||
def survey_req_draft(self, cr, uid, ids, context={}):
|
||||
def survey_req_draft(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, { 'state': 'draft'}, context=context)
|
||||
return True
|
||||
|
||||
def survey_req_cancel(self, cr, uid, ids, context={}):
|
||||
def survey_req_cancel(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, { 'state': 'cancel'}, context=context)
|
||||
return True
|
||||
|
||||
|
@ -331,12 +326,12 @@ class hr_evaluation_interview(osv.osv):
|
|||
"""
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
record = self.browse(cr, uid, ids, context)
|
||||
record = record and record[0]
|
||||
context.update({'survey_id': record.survey_id.id, 'response_id': [record.response.id], 'response_no':0,})
|
||||
value = self.pool.get("survey").action_print_survey(cr, uid, ids, context)
|
||||
return value
|
||||
|
||||
hr_evaluation_interview()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:1
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="survey_2" model="survey">
|
||||
<field name="title">Employee Evaluation</field>
|
||||
<field name="max_response_limit">20</field>
|
||||
|
@ -10,6 +11,7 @@
|
|||
<field name="response_user">5</field>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_3" model="survey">
|
||||
<field name="title">Employee Opinion</field>
|
||||
|
@ -20,6 +22,7 @@
|
|||
<field name="response_user">5</field>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_page_1" model="survey.page">
|
||||
<field name="title">Employee Evaluation Form</field>
|
||||
|
@ -27,6 +30,7 @@
|
|||
<field eval="1" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_page_2" model="survey.page">
|
||||
<field name="title">Process</field>
|
||||
|
@ -42,6 +46,7 @@
|
|||
<field eval="2" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_page_6" model="survey.page">
|
||||
<field name="title">Employee Performance In Key Areas</field>
|
||||
|
@ -81,8 +86,6 @@
|
|||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
<data>
|
||||
<record id="survey_question_0" model="survey.question">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -132,6 +135,7 @@
|
|||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_3" model="survey.question">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -156,6 +160,7 @@
|
|||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_4" model="survey.question">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -203,6 +208,7 @@
|
|||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<!--record id="survey_question_7" model="survey.question">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -227,6 +233,7 @@
|
|||
<field eval="0" name="allow_comment"/>
|
||||
</record-->
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_8" model="survey.question">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -304,8 +311,6 @@
|
|||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
<data>
|
||||
<record id="survey_question_14" model="survey.question">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -331,7 +336,6 @@
|
|||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
<data>
|
||||
<record id="survey_question_17" model="survey.question">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -356,6 +360,7 @@
|
|||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_18" model="survey.question">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -381,8 +386,6 @@
|
|||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
<data>
|
||||
<record id="survey_question_23" model="survey.question">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -436,6 +439,7 @@
|
|||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_40" model="survey.question">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -460,6 +464,7 @@
|
|||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_41" model="survey.question">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -502,7 +507,6 @@
|
|||
<field name="type">descriptive_text</field>
|
||||
<field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field name="descriptive_text">* It is the joint responsibility of the employee and the supervisor (appraiser) to establish a feasible work plan for the coming year, including major employee responsibilities and corresponding benchmarks against which results will be evaluated.
|
||||
|
||||
* Critical or key elements of performance and professional development needs (if any), should also be noted at this time</field>
|
||||
<field eval="0" name="make_comment_field"/>
|
||||
<field eval="1" name="in_visible_menu_choice"/>
|
||||
|
@ -583,7 +587,6 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
<!--data>
|
||||
<record id="survey_question_42" model="survey.question">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -727,6 +730,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="0" name="allow_comment"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_4" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -735,6 +739,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_4"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_5" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -743,6 +748,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_4"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_6" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -751,6 +757,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_4"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_7" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -759,6 +766,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_4"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_8" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -767,6 +775,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_4"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_9" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -775,6 +784,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_8"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_10" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -783,6 +793,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_8"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_11" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -791,6 +802,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_8"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_12" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -799,6 +811,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_8"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_13" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -807,6 +820,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_8"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_14" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -815,6 +829,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_3"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_15" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -823,6 +838,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_3"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_16" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -831,6 +847,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_3"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_17" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -839,6 +856,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_3"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_18" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -847,6 +865,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_3"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_19" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -855,6 +874,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_6"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_20" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -863,6 +883,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_6"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_21" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -871,6 +892,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_6"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_22" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -879,6 +901,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_6"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_23" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -887,6 +910,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_6"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_24" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -895,6 +919,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_10"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_25" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -903,6 +928,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_10"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_26" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -911,6 +937,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_10"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_27" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -919,6 +946,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_10"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_28" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -927,6 +955,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_10"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_29" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -935,6 +964,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_14"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_30" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -943,6 +973,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_14"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_31" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -951,6 +982,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_14"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_32" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -959,6 +991,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_14"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_33" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -967,6 +1000,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_14"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_34" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -975,6 +1009,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_18"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_35" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -983,6 +1018,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_18"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_36" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -991,6 +1027,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_18"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_37" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -999,6 +1036,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_18"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_38" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -1007,6 +1045,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_18"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_39" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -1015,6 +1054,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_40"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_40" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -1023,6 +1063,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_40"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_41" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -1031,6 +1072,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_40"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_42" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -1039,6 +1081,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_40"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_question_column_heading_43" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -1056,6 +1099,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="1" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_1" model="survey.answer">
|
||||
<field name="answer">Name</field>
|
||||
|
@ -1064,6 +1108,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="1" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_2" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1072,6 +1117,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="1" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_3" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1080,6 +1126,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="1" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_4" model="survey.answer">
|
||||
<field name="in_visible_answer_type">0</field>
|
||||
|
@ -1089,6 +1136,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="1" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_5" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1097,6 +1145,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="1" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_6" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1105,6 +1154,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="1" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_7" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1113,6 +1163,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="1" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_8" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1121,6 +1172,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="2" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_9" model="survey.answer">
|
||||
<field name="in_visible_answer_type">0</field>
|
||||
|
@ -1130,6 +1182,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="2" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_10" model="survey.answer">
|
||||
<field name="answer">Position Title</field>
|
||||
|
@ -1138,6 +1191,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="2" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_11" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1146,6 +1200,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="2" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_12" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1154,6 +1209,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="2" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_13" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1162,6 +1218,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="2" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_14" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1170,6 +1227,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="2" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_15" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1178,6 +1236,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="2" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_16" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1187,6 +1246,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="3" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_17" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1195,6 +1255,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="3" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_18" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1203,6 +1264,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="3" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_19" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1211,6 +1273,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="3" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_20" model="survey.answer">
|
||||
<field name="answer">Appraisal for Period</field>
|
||||
|
@ -1219,6 +1282,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="3" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_21" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1227,6 +1291,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="3" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_22" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1235,6 +1300,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="4" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_23" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1243,6 +1309,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="4" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_24" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1251,6 +1318,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="4" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_25" model="survey.answer">
|
||||
<field name="answer">Date of Review</field>
|
||||
|
@ -1259,6 +1327,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="4" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_26" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1267,6 +1336,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_27" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1276,8 +1346,6 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_31" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1287,7 +1355,6 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_43" model="survey.answer">
|
||||
<field name="answer">Appraiser</field>
|
||||
|
@ -1296,6 +1363,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_44" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1304,6 +1372,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_45" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1312,6 +1381,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_46" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1320,6 +1390,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_47" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1328,6 +1399,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_48" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1336,6 +1408,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_49" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1344,6 +1417,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_50" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1352,6 +1426,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_51" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1360,6 +1435,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_52" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1377,6 +1453,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_68" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1385,6 +1462,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_69" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1393,6 +1471,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_70" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1401,6 +1480,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_71" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1409,6 +1489,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_72" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1417,6 +1498,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_73" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1425,6 +1507,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_74" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1433,6 +1516,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_75" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1441,6 +1525,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_76" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1449,6 +1534,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_77" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1457,6 +1543,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="5" name="sequence"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_answer_78" model="survey.answer">
|
||||
<field name="in_visible_answer_type">1</field>
|
||||
|
@ -1483,6 +1570,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_9"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_tbl_column_heading_results0" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -1491,6 +1579,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="question_id" ref="survey_question_9"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<record id="survey_tbl_column_heading_comments0" model="survey.question.column.heading">
|
||||
<field name="in_visible_rating_weight">1</field>
|
||||
|
@ -1500,7 +1589,6 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
<!-- <data noupdate="1">-->
|
||||
<!-- <record id="survey_request_1" model="survey.request">-->
|
||||
<!-- <field name="state">waiting_answer</field>-->
|
||||
|
@ -1510,6 +1598,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<!-- <field name="date_deadline">2010-02-21</field>-->
|
||||
<!-- </record>-->
|
||||
<!-- </data>-->
|
||||
|
||||
<data noupdate="1">
|
||||
<record id="hr_evaluation_plan_managersevaluationplan0" model="hr_evaluation.plan">
|
||||
<field eval="1" name="active"/>
|
||||
|
@ -1519,6 +1608,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field name="company_id" ref="base.main_company"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data noupdate="1">
|
||||
<record id="hr_evaluation_plan_phase_sendtosubordinates0" model="hr_evaluation.plan.phase">
|
||||
<field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
|
||||
|
@ -1534,6 +1624,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="0" name="wait"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data noupdate="1">
|
||||
<record id="hr_evaluation_plan_phase_sendtomanagers0" model="hr_evaluation.plan.phase">
|
||||
<field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
|
||||
|
@ -1549,6 +1640,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="0" name="wait"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data noupdate="1">
|
||||
<record id="hr_evaluation_plan_phase_sendtoemployee0" model="hr_evaluation.plan.phase">
|
||||
<field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
|
||||
|
@ -1564,6 +1656,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<field eval="0" name="wait"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data noupdate="1">
|
||||
<record id="hr_evaluation_plan_phase_finalinterviewwithmanager0" model="hr_evaluation.plan.phase">
|
||||
<field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
|
||||
|
@ -1603,8 +1696,7 @@ Once the form had been filled, the employee send it to his supervisor.
|
|||
<!-- </data>-->
|
||||
|
||||
<data>
|
||||
<record forcecreate="True" id="ir_cron_scheduler_evaluation"
|
||||
model="ir.cron">
|
||||
<record forcecreate="True" id="ir_cron_scheduler_evaluation" model="ir.cron">
|
||||
<field name="name">Run Employee Evaluation</field>
|
||||
<field eval="True" name="active" />
|
||||
<field name="user_id" ref="base.user_root" />
|
||||
|
|
|
@ -61,13 +61,10 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem name="Evaluations" parent="hr.menu_hr_root" id="menu_eval_hr" sequence="6"/>
|
||||
|
||||
<menuitem
|
||||
name="Periodic Evaluations" parent="hr.menu_hr_configuration" id="menu_eval_hr_config" sequence="4"/>
|
||||
<menuitem
|
||||
parent="menu_eval_hr_config"
|
||||
id="menu_open_view_hr_evaluation_plan_tree"
|
||||
<menuitem name="Evaluations" parent="hr.menu_hr_root" id="menu_eval_hr" sequence="6"/>
|
||||
<menuitem name="Periodic Evaluations" parent="hr.menu_hr_configuration" id="menu_eval_hr_config" sequence="4"/>
|
||||
<menuitem parent="menu_eval_hr_config" id="menu_open_view_hr_evaluation_plan_tree"
|
||||
action="open_view_hr_evaluation_plan_tree"/>
|
||||
|
||||
<record model="ir.ui.view" id="view_hr_evaluation_plan_phase_form">
|
||||
|
@ -185,30 +182,19 @@
|
|||
<newline/>
|
||||
<group col="6" colspan="4">
|
||||
<field name="state"/>
|
||||
<button name="button_plan_in_progress"
|
||||
string="Start Evaluation"
|
||||
states="draft"
|
||||
type="object"
|
||||
<button name="button_plan_in_progress" string="Start Evaluation" states="draft" type="object"
|
||||
icon="gtk-execute"/>
|
||||
<button name="button_final_validation"
|
||||
string="Final Validation"
|
||||
states="wait"
|
||||
type="object"
|
||||
<button name="button_final_validation" string="Final Validation" states="wait" type="object"
|
||||
icon="gtk-execute"/>
|
||||
<button name="button_done"
|
||||
string="Done"
|
||||
states="progress"
|
||||
type="object"
|
||||
<button name="button_done" string="Done" states="progress" type="object"
|
||||
icon="gtk-jump-to"/>
|
||||
<button name="button_cancel"
|
||||
string="Cancel"
|
||||
states="draft,wait,progress"
|
||||
type="object"
|
||||
<button name="button_cancel" string="Cancel" states="draft,wait,progress" type="object"
|
||||
icon="gtk-cancel"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_hr_evaluation_tree">
|
||||
<field name="name">hr_evaluation.evaluation.tree</field>
|
||||
<field name="model">hr_evaluation.evaluation</field>
|
||||
|
@ -225,6 +211,7 @@
|
|||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_hr_evaluation_graph">
|
||||
<field name="name">hr_evaluation.evaluation.graph</field>
|
||||
<field name="model">hr_evaluation.evaluation</field>
|
||||
|
@ -236,6 +223,7 @@
|
|||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_evaluation.evaluation_search" model="ir.ui.view">
|
||||
<field name="name">hr_evaluation.evaluation_search</field>
|
||||
<field name="model">hr_evaluation.evaluation</field>
|
||||
|
@ -247,18 +235,13 @@
|
|||
<filter icon="terp-check" string="In progress" domain="[('state','=','wait')]"/>
|
||||
<filter icon="terp-dialog-close" string="Final Step" domain="[('state','=','progress')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-go-week" string="7 Days"
|
||||
help="Evaluations to close within the next 7 days"
|
||||
domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
/>
|
||||
<filter icon="terp-go-week" string="7 Days" help="Evaluations to close within the next 7 days"
|
||||
domain="[('date', '>=', (datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]" />
|
||||
<filter icon="terp-gnome-cpu-frequency-applet+" string="Overpassed"
|
||||
help="Evaluations that overpassed the deadline"
|
||||
domain="[('date','>=',(datetime.date.today()))]"
|
||||
/>
|
||||
|
||||
help="Evaluations that overpassed the deadline" domain="[('date','>=',(datetime.date.today()))]" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="employee_id" select="1"/>
|
||||
<field name="plan_id" widget="selection" select="1"/>
|
||||
<field name="employee_id" />
|
||||
<field name="plan_id" widget="selection" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand='0' string='Group by...'>
|
||||
|
@ -278,9 +261,8 @@
|
|||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="search_view_id" ref="hr_evaluation.evaluation_search"/>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Evaluation" parent="menu_eval_hr"
|
||||
id="menu_open_view_hr_evaluation_tree"
|
||||
|
||||
<menuitem name="Evaluation" parent="menu_eval_hr" id="menu_open_view_hr_evaluation_tree"
|
||||
action="open_view_hr_evaluation_tree"/>
|
||||
|
||||
<record model="ir.ui.view" id="view_hr_evaluation_interview_form">
|
||||
|
@ -293,10 +275,8 @@
|
|||
<field name="survey_id"/>
|
||||
<field name="evaluation_id"/>
|
||||
<group col="2" colspan="2">
|
||||
<button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel"
|
||||
icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
|
||||
<button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done"
|
||||
icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0,}" attrs="{'readonly':[('response','=',False)]}" />
|
||||
<button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
|
||||
<button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done" icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0,}" attrs="{'readonly':[('response','=',False)]}" />
|
||||
</group>
|
||||
<field name="date_deadline"/>
|
||||
<field name="response" readonly="1"/>
|
||||
|
@ -327,10 +307,8 @@
|
|||
<field name="user_id" string="Interviewer"/>
|
||||
<field name="user_to_review_id"/>
|
||||
<field name="response" readonly="1" invisible="True"/>
|
||||
<button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel"
|
||||
icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response, 'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
|
||||
<button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done"
|
||||
icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0}" attrs="{'readonly':[('response','=',False)]}" />
|
||||
<button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" states="waiting_answer,done,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response, 'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
|
||||
<button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done" icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0}" attrs="{'readonly':[('response','=',False)]}" />
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -369,17 +347,13 @@
|
|||
<field name="search_view_id" ref="view_hr_evaluation_interview_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Interview Requests" parent="menu_eval_hr"
|
||||
id="menu_open_hr_evaluation_interview_requests"
|
||||
<menuitem name="Interview Requests" parent="menu_eval_hr" id="menu_open_hr_evaluation_interview_requests"
|
||||
action="action_hr_evaluation_interview_tree"/>
|
||||
|
||||
<menuitem name="Evaluation Reminders" parent="menu_eval_hr"
|
||||
id="menu_eval_send_mail"
|
||||
action="action_hr_evaluation_send_mail"
|
||||
sequence="45"/>
|
||||
<menuitem name="Evaluation Reminders" parent="menu_eval_hr" id="menu_eval_send_mail"
|
||||
action="action_hr_evaluation_send_mail" sequence="45"/>
|
||||
|
||||
<!-- Evaluation Interviews Button on Employee Form -->
|
||||
<act_window domain="[('user_to_review_id', '=', active_id)]" id="act_hr_employee_2_hr__evaluation_interview" name="Evaluation Interviews" res_model="hr.evaluation.interview" src_model="hr.employee"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import hr_evaluation_report
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -18,6 +18,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import tools
|
||||
from osv import fields,osv
|
||||
|
||||
|
@ -75,9 +76,9 @@ class hr_evaluation_report(osv.osv):
|
|||
s.state
|
||||
from
|
||||
hr_evaluation_interview l
|
||||
left join
|
||||
LEFT JOIN
|
||||
hr_evaluation_evaluation s on (s.id=l.evaluation_id)
|
||||
group by
|
||||
GROUP BY
|
||||
s.create_date,
|
||||
date_trunc('day',s.create_date),
|
||||
to_char(s.create_date, 'YYYY-MM-DD'),
|
||||
|
@ -92,5 +93,8 @@ class hr_evaluation_report(osv.osv):
|
|||
s.plan_id
|
||||
)
|
||||
""")
|
||||
|
||||
hr_evaluation_report()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_evaluation_report_tree" model="ir.ui.view">
|
||||
<field name="name">hr.evaluation.report.tree</field>
|
||||
<field name="model">hr.evaluation.report</field>
|
||||
|
@ -43,33 +44,18 @@
|
|||
<search string="Evaluations Analysis">
|
||||
<group>
|
||||
<filter icon="terp-go-year" string="365 Days"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks performed in last 365 days"/>
|
||||
<filter icon="terp-go-month" string="30 Days"
|
||||
name="month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks performed in last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
separator="1"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks during last 7 days"/>
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date', '>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]" help="Tasks performed in last 365 days"/>
|
||||
<filter icon="terp-go-month" string="30 Days" name="month" domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]" help="Tasks performed in last 30 days"/>
|
||||
<filter icon="terp-go-week" string=" 7 Days " separator="1"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]" help="Tasks during last 7 days"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Draft"
|
||||
icon="terp-document-new"
|
||||
domain="[('state','=','draft')]"
|
||||
<filter string="Draft" icon="terp-document-new" domain="[('state','=','draft')]"
|
||||
help = "Draft Evaluations"/>
|
||||
<filter string="Plan In Progress"
|
||||
icon="terp-camera_test"
|
||||
domain="[('state', '=' ,'wait')]"
|
||||
<filter string="Plan In Progress" icon="terp-camera_test" domain="[('state', '=' ,'wait')]"
|
||||
help = "In progress Evaluations"/>
|
||||
<filter string="Final Validation"
|
||||
icon="terp-check"
|
||||
domain="[('state','=','progress')]"
|
||||
<filter string="Final Validation" icon="terp-check" domain="[('state','=','progress')]"
|
||||
help = "Final Validation Evaluations"/>
|
||||
<filter icon="terp-dialog-close"
|
||||
string="Done"
|
||||
domain="[('state','=','done')]"/>
|
||||
<filter icon="terp-dialog-close" string="Done" domain="[('state','=','done')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="employee_id" widget="selection"/>
|
||||
<field name="plan_id" widget="selection"/>
|
||||
|
|
|
@ -21,5 +21,4 @@
|
|||
|
||||
import hr_evaluation_mail
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -28,7 +28,7 @@ class hr_evaluation_reminder(osv.osv_memory):
|
|||
'evaluation_id': fields.many2one('hr_evaluation.evaluation', 'Evaluations', required=True)
|
||||
}
|
||||
|
||||
def send_mail(self, cr, uid, ids, context={}):
|
||||
def send_mail(self, cr, uid, ids, context=None):
|
||||
hr_evaluation_obj = self.pool.get('hr_evaluation.evaluation')
|
||||
evaluation_data = self.read(cr, uid, ids, context=context)[0]
|
||||
for waiting_id in hr_evaluation_obj.browse(cr, uid, evaluation_data['evaluation_id'], context=context).survey_request_ids:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
|
||||
<data>
|
||||
|
||||
<record id="view_hr_evaluation_send_mail" model="ir.ui.view">
|
||||
<field name="name">hr.evaluation.send.mail</field>
|
||||
<field name="model">hr.evaluation.reminder</field>
|
||||
|
|
|
@ -52,7 +52,8 @@
|
|||
'report/hr_expense_report_view.xml',
|
||||
'board_hr_expense_view.xml',
|
||||
],
|
||||
'demo_xml': ['hr_expense_demo.xml',
|
||||
'demo_xml': [
|
||||
'hr_expense_demo.xml',
|
||||
# 'hr.expense.expense.csv'
|
||||
],
|
||||
'test': ['test/test_hr_expense.yml'],
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="action_my_expense" model="ir.actions.act_window">
|
||||
<field name="name">My Expenses</field>
|
||||
<field name="res_model">hr.expense.expense</field>
|
||||
|
@ -20,5 +21,6 @@
|
|||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -37,12 +37,12 @@ class hr_expense_expense(osv.osv):
|
|||
default.update({'invoice_id': False, 'date_confirm': False, 'date_valid': False, 'user_valid': False})
|
||||
return super(hr_expense_expense, self).copy(cr, uid, id, default, context)
|
||||
|
||||
def _amount(self, cr, uid, ids, field_name, arg, context):
|
||||
def _amount(self, cr, uid, ids, field_name, arg, context=None):
|
||||
cr.execute("SELECT s.id,COALESCE(SUM(l.unit_amount*l.unit_quantity),0) AS amount FROM hr_expense_expense s LEFT OUTER JOIN hr_expense_line l ON (s.id=l.expense_id) WHERE s.id IN %s GROUP BY s.id ", (tuple(ids),))
|
||||
res = dict(cr.fetchall())
|
||||
return res
|
||||
|
||||
def _get_currency(self, cr, uid, context):
|
||||
def _get_currency(self, cr, uid, context=None):
|
||||
user = self.pool.get('res.users').browse(cr, uid, [uid])[0]
|
||||
if user.company_id:
|
||||
return user.company_id.currency_id.id
|
||||
|
@ -158,18 +158,17 @@ class hr_expense_expense(osv.osv):
|
|||
'fiscal_position': exp.employee_id.address_id.partner_id.property_account_position.id
|
||||
}
|
||||
if payment_term_id:
|
||||
to_update = invoice_obj.onchange_payment_term_date_invoice(cr, uid, [],
|
||||
payment_term_id, None)
|
||||
to_update = invoice_obj.onchange_payment_term_date_invoice(cr, uid, [], payment_term_id, None)
|
||||
if to_update:
|
||||
inv.update(to_update['value'])
|
||||
if exp.journal_id:
|
||||
inv['journal_id']=exp.journal_id.id
|
||||
inv_id = invoice_obj.create(cr, uid, inv, {'type': 'in_invoice'})
|
||||
invoice_obj.button_compute(cr, uid, [inv_id], {'type':'in_invoice'},
|
||||
set_total=True)
|
||||
invoice_obj.button_compute(cr, uid, [inv_id], {'type': 'in_invoice'}, set_total=True)
|
||||
self.write(cr, uid, [exp.id], {'invoice_id': inv_id, 'state': 'invoiced'})
|
||||
res = inv_id
|
||||
return res
|
||||
|
||||
hr_expense_expense()
|
||||
|
||||
class product_product(osv.osv):
|
||||
|
@ -184,7 +183,7 @@ class hr_expense_line(osv.osv):
|
|||
_name = "hr.expense.line"
|
||||
_description = "Expense Line"
|
||||
|
||||
def _amount(self, cr, uid, ids, field_name, arg, context):
|
||||
def _amount(self, cr, uid, ids, field_name, arg, context=None):
|
||||
if not len(ids):
|
||||
return {}
|
||||
cr.execute("SELECT l.id,COALESCE(SUM(l.unit_amount*l.unit_quantity),0) AS amount FROM hr_expense_line l WHERE id IN %s GROUP BY l.id ",(tuple(ids),))
|
||||
|
@ -206,8 +205,8 @@ class hr_expense_line(osv.osv):
|
|||
'sequence' : fields.integer('Sequence', help="Gives the sequence order when displaying a list of expense lines."),
|
||||
}
|
||||
_defaults = {
|
||||
'unit_quantity': lambda *a: 1,
|
||||
'date_value' : lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'unit_quantity': 1,
|
||||
'date_value': time.strftime('%Y-%m-%d'),
|
||||
}
|
||||
_order = "sequence"
|
||||
|
||||
|
@ -218,13 +217,11 @@ class hr_expense_line(osv.osv):
|
|||
if product_id:
|
||||
product=self.pool.get('product.product').browse(cr, uid, product_id, context=context)
|
||||
v['name']=product.name
|
||||
|
||||
# Compute based on pricetype of employee company
|
||||
pricetype_id = self.pool.get('hr.employee').browse(cr, uid, employee_id).user_id.company_id.property_valuation_price_type.id
|
||||
context['currency_id']=self.pool.get('hr.employee').browse(cr, uid, employee_id).user_id.company_id.currency_id.id
|
||||
pricetype=self.pool.get('product.price.type').browse(cr, uid, pricetype_id)
|
||||
amount_unit=product.price_get(pricetype.field, context)[product.id]
|
||||
|
||||
v['unit_amount']=amount_unit
|
||||
if not uom_id:
|
||||
v['uom_id']=product.uom_id.id
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field eval="1.0" name="unit_quantity"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_expense_line_basicpcserverforseagate0" model="hr.expense.line">
|
||||
<field name="name">Basic PC - Server for Seagate</field>
|
||||
<field name="date_value">2010-05-03</field>
|
||||
|
@ -68,7 +69,9 @@
|
|||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field eval="1.0" name="unit_quantity"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
<data noupdate="1">
|
||||
<record id="hr_expense_expense_septemberexpenses1" model="hr.expense.expense">
|
||||
<field name="currency_id" ref="base.EUR"/>
|
||||
|
@ -79,6 +82,7 @@
|
|||
<field name="date">2010-04-20</field>
|
||||
<field name="state">draft</field>
|
||||
</record>
|
||||
|
||||
<record id="hr_expense_line_hotelexpensesthymbra0" model="hr.expense.line">
|
||||
<field name="name">Hotel Expenses - Thymbra</field>
|
||||
<field name="date_value">2010-05-03</field>
|
||||
|
@ -89,6 +93,7 @@
|
|||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field eval="5.0" name="unit_quantity"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_expense_line_car_travel" model="hr.expense.line">
|
||||
<field name="name">Bruxelles - Paris</field>
|
||||
<field name="date_value">2010-05-03</field>
|
||||
|
@ -100,6 +105,5 @@
|
|||
<field eval="622.0" name="unit_quantity"/>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<report auto="False" id="hr_expenses" model="hr.expense.expense" name="hr.expense" rml="hr_expense/report/expense.rml" string="HR expenses"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="seq_type_hr_expense_invoice" model="ir.sequence.type">
|
||||
<field name="name">Expense invoice</field>
|
||||
<field name="code">hr.expense.invoice</field>
|
||||
</record>
|
||||
|
||||
<record id="seq_hr_expense_invoice" model="ir.sequence">
|
||||
<field name="name">Expense invoice</field>
|
||||
<field name="code">hr.expense.invoice</field>
|
||||
<field name="prefix">EXP/</field>
|
||||
<field name="padding">3</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -81,8 +81,8 @@
|
|||
<form string="Expense Lines">
|
||||
<field name="product_id" on_change="onchange_product_id(product_id, uom_id, parent.employee_id)"/>
|
||||
<field name="uom_id" on_change="onchange_product_id(product_id, uom_id, parent.employee_id)" widget="selection"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="date_value" select="1"/>
|
||||
<field name="name" />
|
||||
<field name="date_value" />
|
||||
<field name="unit_quantity"/>
|
||||
<field name="unit_amount"/>
|
||||
<field name="ref"/>
|
||||
|
@ -126,28 +126,17 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Expense">
|
||||
<group>
|
||||
<filter
|
||||
icon="terp-document-new"
|
||||
domain="[('state','=','draft')]"
|
||||
string="Draft"
|
||||
help="Draft Expense"/>
|
||||
<filter icon="terp-document-new" domain="[('state','=','draft')]" string="Draft" help="Draft Expense"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter
|
||||
icon="terp-gtk-go-back-rtl"
|
||||
domain="[('state','=','confirm')]"
|
||||
string="To Validate"
|
||||
<filter icon="terp-gtk-go-back-rtl" domain="[('state','=','confirm')]" string="To Validate"
|
||||
help="Confirmed Expense"/>
|
||||
<filter
|
||||
icon="terp-gtk-go-back-rtl"
|
||||
domain="[('state','=','accepted')]"
|
||||
string="To Pay"
|
||||
<filter icon="terp-gtk-go-back-rtl" domain="[('state','=','accepted')]" string="To Pay"
|
||||
help="Expenses to Invoice"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select='1'/>
|
||||
<field name="date" select='1'/>
|
||||
<field name="user_id" select="1" string="User">
|
||||
<filter icon="terp-personal+"
|
||||
domain="[('department_id','=',context.get('department_id',False))]"
|
||||
<field name="user_id" string="User">
|
||||
<filter icon="terp-personal+" domain="[('department_id','=',context.get('department_id',False))]"
|
||||
string="Expenses of My Department"/>
|
||||
</field>
|
||||
<field name="department_id" widget="selection" groups="base.group_extended"/>
|
||||
|
@ -171,11 +160,8 @@
|
|||
<field name="search_view_id" ref="view_hr_expense_filter"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="next_id_49" name="Expenses" sequence="4"
|
||||
parent="hr.menu_hr_root"/>
|
||||
|
||||
<menuitem action="expense_all" id="menu_expense_all" name="Expenses"
|
||||
parent="next_id_49" groups="hr.group_hr_manager"/>
|
||||
<menuitem id="next_id_49" name="Expenses" sequence="4" parent="hr.menu_hr_root"/>
|
||||
<menuitem action="expense_all" id="menu_expense_all" name="Expenses" parent="next_id_49" groups="hr.group_hr_manager"/>
|
||||
|
||||
<record id="view_product_hr_expense_form" model="ir.ui.view">
|
||||
<field name="name">product.product.expense.form</field>
|
||||
|
|
|
@ -27,18 +27,21 @@
|
|||
<field name="kind">function</field>
|
||||
<field name="action">write({'state': 'draft'})</field>
|
||||
</record>
|
||||
|
||||
<record id="act_confirm" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_expenses"/>
|
||||
<field name="name">confirm</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">expense_confirm()</field>
|
||||
</record>
|
||||
|
||||
<record id="act_accepted" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_expenses"/>
|
||||
<field name="name">accepted</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">expense_accept()</field>
|
||||
</record>
|
||||
|
||||
<record id="act_paid" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_expenses"/>
|
||||
<field name="name">paid</field>
|
||||
|
@ -46,6 +49,7 @@
|
|||
<field name="action">expense_paid()</field>
|
||||
<field name="flow_stop">True</field>
|
||||
</record>
|
||||
|
||||
<record id="act_refused" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_expenses"/>
|
||||
<field name="name">refused</field>
|
||||
|
@ -53,6 +57,7 @@
|
|||
<field name="action">expense_canceled()</field>
|
||||
<!-- <field name="flow_stop">True</field>-->
|
||||
</record>
|
||||
|
||||
<record id="act_invoice" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_expenses"/>
|
||||
<field name="name">invoice</field>
|
||||
|
@ -66,24 +71,28 @@
|
|||
<field name="act_to" ref="act_confirm"/>
|
||||
<field name="signal">confirm</field>
|
||||
</record>
|
||||
|
||||
<record id="t2" model="workflow.transition">
|
||||
<field name="act_from" ref="act_confirm"/>
|
||||
<field name="act_to" ref="act_accepted"/>
|
||||
<field name="signal">validate</field>
|
||||
<field name="role_id" ref="HR"/>
|
||||
</record>
|
||||
|
||||
<!--record model="workflow.transition" id="t3">
|
||||
<field name="act_from" ref="act_accepted" />
|
||||
<field name="act_to" ref="act_paid" />
|
||||
<field name="signal">paid</field>
|
||||
<field name="role_id" ref="HR"/>
|
||||
</record-->
|
||||
|
||||
<record id="t4" model="workflow.transition">
|
||||
<field name="act_from" ref="act_confirm"/>
|
||||
<field name="act_to" ref="act_refused"/>
|
||||
<field name="signal">refuse</field>
|
||||
<field name="role_id" ref="HR"/>
|
||||
</record>
|
||||
|
||||
<record id="t5" model="workflow.transition">
|
||||
<field name="act_from" ref="act_draft"/>
|
||||
<field name="act_to" ref="act_refused"/>
|
||||
|
@ -96,33 +105,39 @@
|
|||
<field name="signal">refuse</field>
|
||||
<field name="role_id" ref="HR"/>
|
||||
</record>
|
||||
|
||||
<record id="t7" model="workflow.transition">
|
||||
<field name="act_from" ref="act_confirm"/>
|
||||
<field name="act_to" ref="act_draft"/>
|
||||
<field name="signal">draft</field>
|
||||
<field name="role_id" ref="HR"/>
|
||||
</record>
|
||||
|
||||
<record id="t8" model="workflow.transition">
|
||||
<field name="act_from" ref="act_accepted"/>
|
||||
<field name="act_to" ref="act_invoice"/>
|
||||
<field name="signal">invoice</field>
|
||||
<field name="role_id" ref="HR_INV"/>
|
||||
</record>
|
||||
|
||||
<record id="t9" model="workflow.transition">
|
||||
<field name="act_from" ref="act_invoice"/>
|
||||
<field name="act_to" ref="act_paid"/>
|
||||
<field name="signal">subflow.paid</field>
|
||||
</record>
|
||||
|
||||
<record id="t10" model="workflow.transition">
|
||||
<field name="act_from" ref="act_invoice"/>
|
||||
<field name="act_to" ref="act_refused"/>
|
||||
<field name="signal">subflow.cancel</field>
|
||||
</record>
|
||||
|
||||
<record id="t11" model="workflow.transition">
|
||||
<field name="act_from" ref="act_refused"/>
|
||||
<field name="act_to" ref="act_draft"/>
|
||||
<field name="signal">draft</field>
|
||||
<field name="role_id" ref="HR"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import expense
|
||||
import hr_expense_report
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue