[MERGE] from trunk

bzr revid: fva@openerp.com-20120903094840-vd63m4i8vkqxjij2
This commit is contained in:
Frédéric van der Essen 2012-09-03 11:48:40 +02:00
commit a77587e064
11 changed files with 3646 additions and 158 deletions

View File

@ -0,0 +1,546 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-09-02 09:46+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\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: 2012-09-03 05:21+0000\n"
"X-Generator: Launchpad (build 15890)\n"
#. module: account_analytic_plans
#: view:analytic.plan.create.model:0
msgid ""
"This distribution model has been saved.You will be able to reuse it later."
msgstr ""
"Denne fordeling modellen har vært lagret. Du vil kunne bruke den senere."
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,plan_id:0
msgid "Plan Id"
msgstr "Plan ID"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "From Date"
msgstr "Fra dato"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
#: view:account.crossovered.analytic:0
#: model:ir.actions.act_window,name:account_analytic_plans.action_account_crossovered_analytic
#: model:ir.actions.report.xml,name:account_analytic_plans.account_analytic_account_crossovered_analytic
msgid "Crossovered Analytic"
msgstr "Krysset Analyse"
#. module: account_analytic_plans
#: view:account.analytic.plan:0
#: field:account.analytic.plan,name:0
#: field:account.analytic.plan.line,plan_id:0
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_plan_form_action
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan
#: model:ir.ui.menu,name:account_analytic_plans.menu_account_analytic_plan_action
msgid "Analytic Plan"
msgstr "Analytisk Plan"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,journal_id:0
#: view:account.crossovered.analytic:0
#: field:account.crossovered.analytic,journal_ids:0
msgid "Analytic Journal"
msgstr "Analytisk journal"
#. module: account_analytic_plans
#: view:account.analytic.plan.line:0
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_line
msgid "Analytic Plan Line"
msgstr "Analytisk plan linje"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/account_crossovered_analytic.py:61
#, python-format
msgid "User Error"
msgstr "Brukerfeil"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance
msgid "Analytic Plan Instance"
msgstr "Analytisk Plan forekomst"
#. module: account_analytic_plans
#: view:analytic.plan.create.model:0
msgid "Ok"
msgstr "Ok"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,plan_id:0
msgid "Model's Plan"
msgstr "Modell Plan"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account2_ids:0
msgid "Account2 Id"
msgstr "Konto2 ID"
#. module: account_analytic_plans
#: sql_constraint:account.invoice:0
msgid "Invoice Number must be unique per Company!"
msgstr "Fakturanummer må være unik pr. firma!"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Amount"
msgstr "Beløp"
#. module: account_analytic_plans
#: constraint:account.journal:0
msgid ""
"Configuration error! The currency chosen should be shared by the default "
"accounts too."
msgstr ""
"Konfigurasjon feil! Den valgte valutaen bør deles av standard kontoer også."
#. module: account_analytic_plans
#: sql_constraint:account.move.line:0
msgid "Wrong credit or debit value in accounting entry !"
msgstr "Feil kredit eller debet beløp i regnskaps oppføringen !"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account6_ids:0
msgid "Account6 Id"
msgstr "Konto6 ID"
#. module: account_analytic_plans
#: model:ir.ui.menu,name:account_analytic_plans.menu_account_analytic_multi_plan_action
msgid "Multi Plans"
msgstr "Multi Planer"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_bank_statement_line
msgid "Bank Statement Line"
msgstr "Kontoutskriftlinje"
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_plan_form_action_installer
msgid "Define your Analytic Plans"
msgstr "Definer dine analytiske planer."
#. module: account_analytic_plans
#: constraint:account.invoice:0
msgid "Invalid BBA Structured Communication !"
msgstr "Ugyldig BBA Strukturert Kommunikasjon!"
#. module: account_analytic_plans
#: constraint:account.bank.statement:0
msgid "The journal and period chosen have to belong to the same company."
msgstr "Tidsskriftet og perioden valgt å tilhøre samme selskap."
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid ""
"The date of your Journal Entry is not in the defined period! You should "
"change the date or remove this constraint from the journal."
msgstr ""
"Datoen for din bilagsregistrering ikke er i den definerte perioden! Du bør "
"endre datoen eller fjerne denne begrensningen fra tidsskriftet."
#. module: account_analytic_plans
#: sql_constraint:account.journal:0
msgid "The code of the journal must be unique per company !"
msgstr "Journalkoden må være unik pr firma!"
#. module: account_analytic_plans
#: field:account.crossovered.analytic,ref:0
msgid "Analytic Account Reference"
msgstr "Analytisk konto Referanse."
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_sale_order_line
msgid "Sales Order Line"
msgstr "Salgsordrelinje"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:47
#: view:analytic.plan.create.model:0
#, python-format
msgid "Distribution Model Saved"
msgstr "Distribusjon Model Lagret"
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_plan_instance_action
msgid "Analytic Distribution's Models"
msgstr "Analytisk distribusjon modeller"
#. module: account_analytic_plans
#: view:account.crossovered.analytic:0
msgid "Print"
msgstr "Skriv ut"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
#: field:account.analytic.line,percentage:0
msgid "Percentage"
msgstr "Prosentdel"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:221
#, python-format
msgid "A model having this name and code already exists !"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
msgid "No analytic plan defined !"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,rate:0
msgid "Rate (%)"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan:0
#: field:account.analytic.plan,plan_ids:0
#: field:account.journal,plan_id:0
msgid "Analytic Plans"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Perc(%)"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,max_required:0
msgid "Maximum Allowed (%)"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Printing date"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan.line:0
msgid "Analytic Plan Lines"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.bank.statement.line:0
msgid ""
"The amount of the voucher must be the same amount as the one on the "
"statement line"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_invoice_line
msgid "Invoice Line"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid ""
"The selected account of your Journal Entry forces to provide a secondary "
"currency. You should remove the secondary currency on the account or select "
"a multi-currency view on the journal."
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Currency"
msgstr ""
#. module: account_analytic_plans
#: field:account.crossovered.analytic,date1:0
msgid "Start Date"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account_ids:0
msgid "Account Id"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account5_ids:0
msgid "Account5 Id"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance_line
msgid "Analytic Instance Line"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,root_analytic_id:0
msgid "Root Account"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "To Date"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:341
#: code:addons/account_analytic_plans/account_analytic_plans.py:485
#, python-format
msgid "You have to define an analytic journal on the '%s' journal!"
msgstr ""
#. module: account_analytic_plans
#: field:account.crossovered.analytic,empty_line:0
msgid "Dont show empty lines"
msgstr ""
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.action_analytic_plan_create_model
msgid "analytic.plan.create.model.action"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_line
msgid "Analytic Line"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Analytic Account :"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Analytic Account Reference:"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,name:0
msgid "Plan Name"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan,default_instance_id:0
msgid "Default Entries"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_move_line
msgid "Journal Items"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account1_ids:0
msgid "Account1 Id"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,min_required:0
msgid "Minimum Allowed (%)"
msgstr ""
#. module: account_analytic_plans
#: help:account.analytic.plan.line,root_analytic_id:0
msgid "Root account of this plan."
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:221
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
msgid "Error"
msgstr ""
#. module: account_analytic_plans
#: view:analytic.plan.create.model:0
msgid "Save This Distribution as a Model"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid "You can not create journal items on an account of type view."
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Quantity"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
#, python-format
msgid "Please put a name and a code before saving the model !"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_crossovered_analytic
msgid "Print Crossovered Analytic"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:341
#: code:addons/account_analytic_plans/account_analytic_plans.py:485
#, python-format
msgid "No Analytic Journal !"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,analytic_account_id:0
msgid "Analytic Account"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_bank_statement
msgid "Bank Statement"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account3_ids:0
msgid "Account3 Id"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.analytic.line:0
msgid "You can not create analytic line on view account."
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_invoice
msgid "Invoice"
msgstr ""
#. module: account_analytic_plans
#: view:account.crossovered.analytic:0
#: view:analytic.plan.create.model:0
msgid "Cancel"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account4_ids:0
msgid "Account4 Id"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid "Company must be the same for its related account and period."
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0
msgid "Analytic Distribution Lines"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
#, python-format
msgid "The Total Should be Between %s and %s"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "at"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Account Name"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0
msgid "Analytic Distribution Line"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,code:0
msgid "Distribution Code"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "%"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "100.00%"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.default,analytics_id:0
#: view:account.analytic.plan.instance:0
#: field:account.analytic.plan.instance,name:0
#: field:account.bank.statement.line,analytics_id:0
#: field:account.invoice.line,analytics_id:0
#: field:account.move.line,analytics_id:0
#: model:ir.model,name:account_analytic_plans.model_account_analytic_default
msgid "Analytic Distribution"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_journal
msgid "Journal"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Code"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_analytic_plan_create_model
msgid "analytic.plan.create.model"
msgstr ""
#. module: account_analytic_plans
#: field:account.crossovered.analytic,date2:0
msgid "End Date"
msgstr ""
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_instance_model_open
msgid "Distribution Models"
msgstr ""
#. module: account_analytic_plans
#: model:ir.actions.act_window,help:account_analytic_plans.account_analytic_plan_form_action_installer
msgid ""
"To setup a multiple analytic plans environment, you must define the root "
"analytic accounts for each plan set. Then, you must attach a plan set to "
"your account journals."
msgstr ""
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid "You can not create journal items on closed account."
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Company"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,sequence:0
msgid "Sequence"
msgstr ""
#. module: account_analytic_plans
#: sql_constraint:account.journal:0
msgid "The name of the journal must be unique per company !"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
#, python-format
msgid "Value Error"
msgstr ""

View File

@ -25,6 +25,7 @@ import datetime, time
from itertools import groupby
from operator import itemgetter
import math
import netsvc
from osv import fields, osv
from tools.translate import _
@ -112,7 +113,7 @@ class hr_holidays(osv.osv):
return result
_columns = {
'name': fields.char('Description', required=True, size=64),
'name': fields.char('Description', size=64),
'state': fields.selection([('draft', 'To Submit'), ('cancel', 'Cancelled'),('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')],
'State', readonly=True, help='The state is set to \'To Submit\', when a holiday request is created.\
\nThe state is \'To Approve\', when holiday request is confirmed by user.\
@ -123,8 +124,6 @@ class hr_holidays(osv.osv):
'date_to': fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'holiday_status_id': fields.many2one("hr.holidays.status", "Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'employee_id': fields.many2one('hr.employee', "Employee", select=True, invisible=False, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, help='Leave Manager can let this field empty if this leave request/allocation is for every employee'),
#'manager_id': fields.many2one('hr.employee', 'Leave Manager', invisible=False, readonly=True, help='This area is automatically filled by the user who validate the leave'),
#'notes': fields.text('Notes',readonly=True, states={'draft':[('readonly',False)]}),
'manager_id': fields.many2one('hr.employee', 'First Approval', invisible=False, readonly=True, help='This area is automatically filled by the user who validate the leave'),
'notes': fields.text('Reasons',readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'number_of_days_temp': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
@ -134,8 +133,8 @@ class hr_holidays(osv.osv):
'parent_id': fields.many2one('hr.holidays', 'Parent'),
'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=True),
'category_id': fields.many2one('hr.employee.category', "Category", help='Category of Employee'),
'holiday_type': fields.selection([('employee','By Employee'),('category','By Employee Category')], 'Allocation Type', help='By Employee: Allocation/Request for individual Employee, By Employee Category: Allocation/Request for group of employees in category', required=True),
'category_id': fields.many2one('hr.employee.category', "Category", help='Category of Employee', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'holiday_type': fields.selection([('employee','By Employee'),('category','By Employee Category')], 'Allocation Mode', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, help='By Employee: Allocation/Request for individual Employee, By Employee Category: Allocation/Request for group of employees in category', required=True),
'manager_id2': fields.many2one('hr.employee', 'Second Approval', readonly=True, help='This area is automaticly filled by the user who validate the leave with second level (If Leave type need second validation)'),
'double_validation': fields.related('holiday_status_id', 'double_validation', type='boolean', relation='hr.holidays.status', string='Apply Double Validation'),
}
@ -147,16 +146,11 @@ class hr_holidays(osv.osv):
'holiday_type': 'employee'
}
_sql_constraints = [
('type_value', "CHECK( (holiday_type='employee' AND employee_id IS NOT NULL) or (holiday_type='category' AND category_id IS NOT NULL))", "You have to select an employee or a category."),
('type_value', "CHECK( (holiday_type='employee' AND employee_id IS NOT NULL) or (holiday_type='category' AND category_id IS NOT NULL))", "The employee or employee category of this request is missing."),
('date_check2', "CHECK ( (type='add') OR (date_from <= date_to))", "The start date must be before the end date !"),
('date_check', "CHECK ( number_of_days_temp >= 0 )", "The number of days must be greater than 0 !"),
]
def create(self, cr, uid, vals, context=None):
obj_id = super(hr_holidays, self).create(cr, uid, vals, context=context)
self.create_notificate(cr, uid, [obj_id], context=context)
return obj_id
def _create_resource_leave(self, cr, uid, leaves, context=None):
'''This method will create entry in resource calendar leave object at the time of holidays validated '''
obj_res_leave = self.pool.get('resource.calendar.leaves')
@ -201,8 +195,8 @@ class hr_holidays(osv.osv):
def unlink(self, cr, uid, ids, context=None):
for rec in self.browse(cr, uid, ids, context=context):
if rec.state<>'draft':
raise osv.except_osv(_('Warning!'),_('You cannot delete a leave which is not in draft state !'))
if rec.state not in ['draft', 'cancel', 'confirm']:
raise osv.except_osv(_('Warning!'),_('You cannot delete a leave which is in %s state!')%(rec.state))
return super(hr_holidays, self).unlink(cr, uid, ids, context)
def onchange_date_from(self, cr, uid, ids, date_to, date_from):
@ -210,7 +204,7 @@ class hr_holidays(osv.osv):
if date_to and date_from:
diff_day = self._get_number_of_days(date_from, date_to)
result['value'] = {
'number_of_days_temp': round(diff_day)+1
'number_of_days_temp': round(math.floor(diff_day))+1
}
return result
result['value'] = {
@ -244,29 +238,30 @@ class hr_holidays(osv.osv):
self.unlink(cr, uid, to_unlink, context=context)
return True
def holidays_validate(self, cr, uid, ids, context=None):
def holidays_first_validate(self, cr, uid, ids, context=None):
self.check_holidays(cr, uid, ids, context=context)
obj_emp = self.pool.get('hr.employee')
ids2 = obj_emp.search(cr, uid, [('user_id', '=', uid)])
manager = ids2 and ids2[0] or False
self.holidays_validate_notificate(cr, uid, ids, context=context)
self.holidays_first_validate_notificate(cr, uid, ids, context=context)
return self.write(cr, uid, ids, {'state':'validate1', 'manager_id': manager})
def holidays_validate2(self, cr, uid, ids, context=None):
def holidays_validate(self, cr, uid, ids, context=None):
self.check_holidays(cr, uid, ids, context=context)
obj_emp = self.pool.get('hr.employee')
ids2 = obj_emp.search(cr, uid, [('user_id', '=', uid)])
manager = ids2 and ids2[0] or False
self.write(cr, uid, ids, {'state':'validate'})
data_holiday = self.browse(cr, uid, ids)
holiday_ids = []
for record in data_holiday:
if record.holiday_status_id.double_validation:
holiday_ids.append(record.id)
if record.double_validation:
self.write(cr, uid, [record.id], {'manager_id2': manager})
else:
self.write(cr, uid, [record.id], {'manager_id': manager})
if record.holiday_type == 'employee' and record.type == 'remove':
meeting_obj = self.pool.get('crm.meeting')
meeting_vals = {
'name': record.name,
'name': record.name or _('Leave Request'),
'categ_ids': record.holiday_status_id.categ_id and [(6,0,[record.holiday_status_id.categ_id.id])] or [],
'duration': record.number_of_days_temp * 8,
'description': record.notes,
@ -301,25 +296,27 @@ class hr_holidays(osv.osv):
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'confirm', cr)
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'validate', cr)
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'second_validate', cr)
if holiday_ids:
self.holidays_valid2_notificate(cr, uid, holiday_ids, context=context)
self.write(cr, uid, holiday_ids, {'manager_id2': manager})
self.holidays_validate_notificate(cr, uid, ids, context=context)
return True
def holidays_confirm(self, cr, uid, ids, context=None):
self.check_holidays(cr, uid, ids, context=context)
for record in self.browse(cr, uid, ids, context=context):
if record.employee_id and record.employee_id.parent_id and record.employee_id.parent_id.user_id:
self.message_subscribe(cr, uid, [record.id], user_ids=[record.employee_id.parent_id.user_id.id], context=context)
self.holidays_confirm_notificate(cr, uid, ids, context=context)
return self.write(cr, uid, ids, {'state':'confirm'})
def holidays_refuse(self, cr, uid, ids, approval, context=None):
def holidays_refuse(self, cr, uid, ids, context=None):
obj_emp = self.pool.get('hr.employee')
ids2 = obj_emp.search(cr, uid, [('user_id', '=', uid)])
manager = ids2 and ids2[0] or False
if approval == 'first_approval':
self.write(cr, uid, ids, {'state': 'refuse', 'manager_id': manager})
else:
self.write(cr, uid, ids, {'state': 'refuse', 'manager_id2': manager})
self.holidays_refuse_notificate(cr, uid, ids, approval, context=context)
for holiday in self.browse(cr, uid, ids, context=context):
if holiday.state == 'validate1':
self.write(cr, uid, [holiday.id], {'state': 'refuse', 'manager_id': manager})
else:
self.write(cr, uid, [holiday.id], {'state': 'refuse', 'manager_id2': manager})
self.holidays_refuse_notificate(cr, uid, ids, context=context)
self.holidays_cancel(cr, uid, ids, context=context)
return True
@ -333,7 +330,7 @@ class hr_holidays(osv.osv):
# If a category that created several holidays, cancel all related
wf_service = netsvc.LocalService("workflow")
for request in record.linked_request_ids or []:
wf_service.trg_validate(uid, 'hr.holidays', request.id, 'cancel', cr)
wf_service.trg_validate(uid, 'hr.holidays', request.id, 'refuse', cr)
self._remove_resource_leave(cr, uid, ids, context=context)
return True
@ -355,7 +352,7 @@ class hr_holidays(osv.osv):
def get_needaction_user_ids(self, cr, uid, ids, context=None):
result = super(hr_holidays, self).get_needaction_user_ids(cr, uid, ids, context=context)
for obj in self.browse(cr, uid, ids, context=context):
if obj.state == 'confirm' and obj.employee_id.parent_id:
if obj.state == 'confirm' and obj.holiday_type == 'employee' and obj.employee_id.parent_id:
result[obj.id] = [obj.employee_id.parent_id.user_id.id]
elif obj.state == 'validate1':
# get group_hr_manager: everyone will be warned of second validation
@ -369,44 +366,38 @@ class hr_holidays(osv.osv):
def message_get_monitored_follower_fields(self, cr, uid, ids, context=None):
""" Add 'user_id' and 'manager' to the monitored fields """
res = super(hr_holidays, self).message_get_monitored_follower_fields(cr, uid, ids, context=context)
# TODO: add manager
return res + ['user_id']
def create_notificate(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_append_note(cr, uid, ids, _('System notification'),
_("The %s request has been <b>created</b> and is waiting confirmation.")
% ('leave' if obj.type == 'remove' else 'allocation',), type='notification', context=context)
_("The request has been <b>created</b> and is waiting confirmation."), type='notification', context=context)
return True
def holidays_confirm_notificate(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids):
self.message_append_note(cr, uid, [obj.id], _('System notification'),
_("The %s request has been <b>confirmed</b> and is waiting for validation by the manager.")
% ('leave' if obj.type == 'remove' else 'allocation',), type='notification')
_("The request has been <b>submitted</b> and is waiting for validation by the manager."), type='notification')
def holidays_first_validate_notificate(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_append_note(cr, uid, [obj.id], _('System notification'),
_("The request has been <b>approved</b>. A second validation is necessary and is now pending."), type='notification', context=context)
def holidays_validate_notificate(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids):
if obj.holiday_status_id.double_validation:
if obj.double_validation:
self.message_append_note(cr, uid, [obj.id], _('System notification'),
_("The %s request has been <b>approved</b>. A second validation is necessary and is now pending.")
% ('leave' if obj.type == 'remove' else 'allocation',), type='notification', context=context)
_("The request has been <b>double validated</b>. The validation process is now over."), type='notification', context=context)
else:
self.message_append_note(cr, uid, [obj.id], _('System notification'),
_("The %s request has been <b>approved</b>. The validation process is now over.")
% ('leave' if obj.type == 'remove' else 'allocation',), type='notification', context=context)
_("The request has been <b>approved</b>. The validation process is now over."), type='notification', context=context)
def holidays_valid2_notificate(self, cr, uid, ids, context=None):
def holidays_refuse_notificate(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids):
self.message_append_note(cr, uid, [obj.id], _('System notification'),
_("The %s request has been <b>double validated</b>. The validation process is now over.")
% ('leave' if obj.type == 'remove' else 'allocation',), type='notification', context=context)
def holidays_refuse_notificate(self, cr, uid, ids, approval, context=None):
for obj in self.browse(cr, uid, ids):
self.message_append_note(cr, uid, [obj.id], _('System notification'),
_("The %s request has been <b>refused</b>. The validation process is now over.")
% ('leave' if obj.type == 'remove' else 'allocation',), type='notification', context=context)
_("The request has been <b>refused</b>. The validation process is now over."), type='notification', context=context)
hr_holidays()

View File

@ -12,7 +12,7 @@
<record model="hr.holidays" id="hr_holidays_employee1_cl">
<field name="name">Trip with Family</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field name="holiday_status_id" ref="holiday_status_comp"/>
<field eval="time.strftime('%Y-%m-01')" name="date_from"/>
<field eval="time.strftime('%Y-%m-03')" name="date_to"/>
<field name="type">remove</field>
@ -52,13 +52,10 @@
<field name="employee_id" ref="hr.employee_fp"/>
</record>
<workflow action="confirm" model="hr.holidays" ref="hr_holidays_employee1_allocation_cl"/>
<workflow action="validate" model="hr.holidays" ref="hr_holidays_employee1_allocation_cl"/>
<workflow action="confirm" model="hr.holidays" ref="hr_holidays_employee1_sl"/>
<workflow action="validate" model="hr.holidays" ref="hr_holidays_employee1_sl"/>
<workflow action="confirm" model="hr.holidays" ref="hr_holidays_employee1_int_tour"/>
<workflow action="validate" model="hr.holidays" ref="hr_holidays_employee1_int_tour"/>
</data>
</openerp>

View File

@ -84,56 +84,42 @@
</field>
</record>
<record model="ir.ui.view" id="edit_holiday_new">
<record model="ir.ui.view" id="edit_holiday_new">
<field name="name">Leave Request</field>
<field name="model">hr.holidays</field>
<field name="priority">1</field>
<field name="arch" type="xml">
<form string="Leave Request" version="7.0">
<header>
<button string="Submit to Manager" name="confirm" states="draft" type="workflow" class="oe_highlight"/>
<button string="Approve" name="validate" states="confirm" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
<button string="Validate" name="second_validate" states="validate1" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" groups="base.group_hr_user,base.group_hr_manager" class="oe_highlight"/>
<button string="Reset to New" name="set_to_draft" states="refuse,validate" type="object" groups="base.group_hr_user" />
<button string="Refuse" name="refuse" states="confirm,validate1,validate" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
<button string="Reset to New" name="set_to_draft" states="refuse" type="object" groups="base.group_hr_user" />
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
</header>
<sheet string="Leave Request">
<group>
<group>
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/>
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')],'invisible':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'invisible':[('holiday_type','=','employee')], 'readonly':[('state','!=','draft'), ('state','!=','confirm')]}"/>
<field name="department_id" attrs="{'readonly':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
</group>
<group>
<field name="holiday_status_id" on_change="onchange_status_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
<label for="number_of_days_temp" string="Duration"/>
<div>
<field name="date_from" on_change="onchange_date_from(date_to, date_from)" required="1" class="oe_inline"/> -
<field name="date_to" on_change="onchange_date_from(date_to, date_from)" required="1" class="oe_inline"/>
<group col="3">
<field name="date_from" nolabel="1" on_change="onchange_date_from(date_to, date_from)" required="1" class="oe_inline"/><label string="-" class="oe_inline" />
<field name="date_to" nolabel="1" on_change="onchange_date_from(date_to, date_from)" required="1" class="oe_inline"/>
</group>
<div>
<field name="number_of_days_temp" class="oe_inline"/> days
</div>
</div>
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'invisible':[('holiday_type','=','employee')], 'readonly':[('state','!=','draft'), ('state','!=','confirm')]}"/>
</group>
<group>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/>
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')],'invisible':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
<field name="department_id" attrs="{'readonly':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
</group>
</group>
<notebook colspan="4">
<page string="General">
<group>
<group>
<field name="manager_id" groups="base.group_no_one"/>
<field name="double_validation" invisible="1"/>
</group>
<group>
<field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}" groups="base.group_no_one"/>
</group>
</group>
<newline/>
<field name="notes" nolabel="1" colspan="4" placeholder="Add a reason..."/>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
@ -150,37 +136,27 @@
<field name="arch" type="xml">
<form string="Allocation Request" version="7.0">
<header>
<button string="Submit to Manager" name="confirm" states="draft" type="workflow" class="oe_highlight"/>
<button string="Approve" name="validate" states="confirm" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
<button string="Validate" name="second_validate" states="validate1" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
<button string="Reset to New" name="set_to_draft" states="cancel,validate,refuse" type="object" groups="base.group_hr_user" />
<button string="Refuse" name="refuse" states="confirm,validate,validate1" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
<button string="Reset to New" name="set_to_draft" states="cancel,refuse" type="object" groups="base.group_hr_user" />
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
</header>
<sheet>
<group>
<group>
<field name="name"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Mode" groups="base.group_hr_manager"/>
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')], 'invisible':[('holiday_type','=','category')]}"/>
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')], 'invisible':[('holiday_type','=','employee')]}"/>
<field name="department_id" attrs="{'readonly':['|', ('holiday_type','=','category'), ('state','not in' ,('draft', 'confirm'))]}"/>
</group>
<group>
<field name="name" required="1" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
<field name="holiday_status_id" on_change="onchange_status_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
<field name="number_of_days_temp"/>
</group>
<group>
<field name="holiday_type" on_change="onchange_type(holiday_type)"/>
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')], 'invisible':[('holiday_type','=','category')]}"/>
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'invisible':[('holiday_type','=','employee')]}"/>
<field name="department_id" attrs="{'invisible':[('holiday_type','=','category')]}"/>
</group>
</group>
<notebook>
<page string="General">
<group col="4">
<field name="double_validation" invisible="1"/>
<field name="manager_id"/>
<field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}"/>
</group>
<field name="notes" placeholder="Add a reason..."/>
</page>
</notebook>
<field name="notes" nolabel="1" colspan="4" placeholder="Add a reason..."/>
</sheet>
<div class="oe_chatter">
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
@ -225,7 +201,6 @@
<field name="state"/>
</header>
<group col="4">
<field name="name"/>
<field name="holiday_status_id"/>
<field name="type"/>
<field name="date_from" on_change="onchange_date_from(date_to, date_from)" attrs="{'readonly':[('type','=','add')], 'required':[('type','=','remove')]}"/>
@ -233,7 +208,7 @@
<field name="number_of_days_temp"/>
<field name="manager_id"/>
</group>
<field name="notes"/>
<field name="name" placeholder="Add a reason..."/>
</form>
</field>
</record>
@ -288,12 +263,12 @@
<menuitem name="Leaves" parent="hr.menu_hr_root" id="menu_open_ask_holidays" sequence="20"/>
<record model="ir.actions.act_window" id="open_ask_holidays">
<field name="name">Leave Requests</field>
<field name="name">My Leave Requests</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="view_id" ref="edit_holiday_new"/>
<field name="context">{}</field>
<field name="domain">[('type','=','remove')]</field>
<field name="domain">[('type','=','remove'),('employee_id.user_id','=', uid)]</field>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
@ -327,7 +302,7 @@
<field name="view_id" ref="view_holiday_new_calendar"/>
<field name="act_window_id" ref="open_ask_holidays"/>
</record>
<menuitem name="My Leave Requests" parent="menu_open_ask_holidays" id="menu_open_ask_holidays_new" action="open_ask_holidays"/>
<record model="ir.actions.act_window" id="request_approve_holidays">
@ -357,11 +332,11 @@
<menuitem name="Leave Requests to Approve" parent="menu_open_ask_holidays" id="menu_request_approve_holidays" action="request_approve_holidays" groups="base.group_hr_user"/>
<record model="ir.actions.act_window" id="open_allocation_holidays">
<field name="name">Allocation Requests</field>
<field name="name">My Allocation Requests</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="context">{'default_type':'add'}</field>
<field name="domain">[('type','=','add')]</field>
<field name="domain">[('type','=','add'),('employee_id.user_id','=', uid)]</field>
<field name="view_id" ref="allocation_leave_new"/>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
</record>
@ -380,7 +355,7 @@
<field name="act_window_id" ref="open_allocation_holidays"/>
</record>
<menuitem name="Allocation Requests" parent="menu_open_ask_holidays" id="menu_open_allocation_holidays" action="open_allocation_holidays"/>
<menuitem name="My Allocation Requests" parent="menu_open_ask_holidays" id="menu_open_allocation_holidays" action="open_allocation_holidays"/>
<record model="ir.actions.act_window" id="open_company_allocation">
<field name="name">Leaves Summary</field>

View File

@ -2,7 +2,16 @@
<openerp>
<data>
<!-- Workflow definition -->
<!-- Workflow definition
1. draft->submitted (no signal)
2. submitted->accepted (validate signal) if not double_validation
2. submitted -> first_accepted (validate signal) if double_validation
2. submitted->refused (refuse signal)
3. accepted->refused (refuse signal)
4. first_accepted -> accepted (second_validate signal)
4. first_accepted -> refused (refuse signal)
-->
<record model="workflow" id="wkf_holidays">
<field name="name">hr.wkf.holidays</field>
@ -10,13 +19,13 @@
<field name="on_create">True</field>
</record>
<record model="workflow.activity" id="act_draft">
<record model="workflow.activity" id="act_draft"> <!-- draft -->
<field name="wkf_id" ref="wkf_holidays" />
<field name="flow_start">True</field>
<field name="name">draft</field>
</record>
<record model="workflow.activity" id="act_confirm">
<record model="workflow.activity" id="act_confirm"> <!-- submitted -->
<field name="wkf_id" ref="wkf_holidays" />
<field name="name">confirm</field>
<field name="kind">function</field>
@ -24,74 +33,94 @@
<field name="split_mode">OR</field>
</record>
<record model="workflow.activity" id="act_validate">
<record model="workflow.activity" id="act_validate"> <!-- accepted -->
<field name="wkf_id" ref="wkf_holidays" />
<field name="name">validate</field>
<field name="kind">function</field>
<field name="action">holidays_validate()</field>
</record>
<record model="workflow.activity" id="act_validate1">
<record model="workflow.activity" id="act_validate1"> <!-- first_accepted -->
<field name="wkf_id" ref="wkf_holidays" />
<field name="name">second_validate</field>
<field name="name">first_validate</field>
<field name="kind">function</field>
<field name="action">holidays_validate2()</field>
<field name="action">holidays_first_validate()</field>
<field name="split_mode">OR</field>
</record>
<record model="workflow.activity" id="act_refuse">
<record model="workflow.activity" id="act_refuse"> <!-- refused -->
<field name="wkf_id" ref="wkf_holidays" />
<field name="name">refuse</field>
<field name="flow_stop">True</field>
<field name="kind">stopall</field>
<field name="kind">function</field>
<field name="action">holidays_refuse()</field>
</record>
<!--
workflow transition
-->
<record model="workflow.transition" id="t1">
<record model="workflow.transition" id="holiday_draft2confirm"> <!-- 1. draft->submitted (no signal) -->
<field name="act_from" ref="act_draft" />
<field name="act_to" ref="act_confirm" />
<field name="signal">confirm</field>
</record>
<record model="workflow.transition" id="t2">
<record model="workflow.transition" id="holiday_confirm2validate"> <!-- 2. submitted->accepted (validate signal) if not double_validation-->
<field name="act_from" ref="act_confirm" />
<field name="act_to" ref="act_validate" />
<field name="signal">validate</field>
<field name="condition">not double_validation</field>
<field name="group_id" ref="base.group_hr_user"/>
</record>
<record model="workflow.transition" id="holiday_confirm2validate1"> <!-- 2. submitted -> first_accepted (validate signal) if double_validation-->
<field name="act_from" ref="act_confirm" />
<field name="act_to" ref="act_validate1" />
<field name="condition">double_validation</field>
<field name="group_id" ref="base.group_hr_user"/>
</record>
<record model="workflow.transition" id="holiday_confirm2refuse"> <!-- 2. submitted->refused (refuse signal) -->
<field name="act_from" ref="act_confirm" />
<field name="act_to" ref="act_refuse" />
<field name="signal">refuse</field>
<field name="condition">True</field>
<field name="group_id" ref="base.group_hr_user"/>
</record>
<record model="workflow.transition" id="t3">
<field name="act_from" ref="act_confirm" />
<field name="act_to" ref="act_refuse" />
<field name="signal">refuse</field>
<field name="condition">holidays_refuse('first_approval')</field>
<field name="group_id" ref="base.group_hr_user"/>
</record>
<record model="workflow.transition" id="t4">
<record model="workflow.transition" id="holiday_validate2refuse"> <!-- 3. accepted->refused (refuse signal) -->
<field name="act_from" ref="act_validate" />
<field name="act_to" ref="act_refuse" />
<field name="signal">refuse</field>
<field name="condition">holidays_refuse('second_approval')</field>
<field name="condition">True</field>
<field name="group_id" ref="base.group_hr_user"/>
</record>
<record model="workflow.transition" id="t8">
<record model="workflow.transition" id="holiday_validate2refuse"> <!-- 3. accepted->refused (refuse signal) -->
<field name="act_from" ref="act_validate" />
<field name="act_to" ref="act_validate1" />
<field name="act_to" ref="act_refuse" />
<field name="signal">refuse</field>
<field name="condition">True</field>
<field name="group_id" ref="base.group_hr_user"/>
</record>
<record model="workflow.transition" id="holiday_validate1_validate"> <!-- 4. first_accepted -> accepted (second_validate signal) -->
<field name="act_from" ref="act_validate1" />
<field name="act_to" ref="act_validate" />
<field name="condition">True</field>
<field name="signal">second_validate</field>
<field name="group_id" ref="base.group_hr_manager" />
<field name="group_id" ref="base.group_hr_user"/>
</record>
<record model="workflow.transition" id="t11">
<field name="act_from" ref="act_validate" />
<field name="act_to" ref="act_validate1" />
<field name="condition">not holiday_status_id.double_validation</field>
<field name="signal" eval="False"/>
<record model="workflow.transition" id="holiday_validate1_refuse"> <!-- 4. first_accepted->refused (refuse signal) -->
<field name="act_from" ref="act_validate1" />
<field name="act_to" ref="act_refuse" />
<field name="signal">refuse</field>
<field name="condition">True</field>
<field name="group_id" ref="base.group_hr_user"/>
</record>
</data>

View File

@ -4,5 +4,5 @@ access_hr_holidays_user,hr.holidays.user,model_hr_holidays,base.group_hr_user,1,
access_hr_holidays_employee,hr.holidays.employee,model_hr_holidays,base.group_user,1,1,1,1
access_hr_holydays_status_employee,hr.holidays.status employee,model_hr_holidays_status,base.group_user,1,0,0,0
access_hr_holidays_remain_user,hr.holidays.ramain.user,model_hr_holidays_remaining_leaves_user,base.group_hr_user,1,1,1,1
access_resource_calendar_leaves_manager,resource_calendar_leaves_manager,resource.model_resource_calendar_leaves,base.group_hr_manager,1,1,1,1
access_resource_calendar_leaves_user,resource_calendar_leaves_user,resource.model_resource_calendar_leaves,base.group_hr_user,1,1,1,1
access_crm_meeting_type_manager,crm.meeting.type.manager,base_calendar.model_crm_meeting_type,base.group_hr_manager,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
4 access_hr_holidays_employee hr.holidays.employee model_hr_holidays base.group_user 1 1 1 1
5 access_hr_holydays_status_employee hr.holidays.status employee model_hr_holidays_status base.group_user 1 0 0 0
6 access_hr_holidays_remain_user hr.holidays.ramain.user model_hr_holidays_remaining_leaves_user base.group_hr_user 1 1 1 1
7 access_resource_calendar_leaves_manager access_resource_calendar_leaves_user resource_calendar_leaves_manager resource_calendar_leaves_user resource.model_resource_calendar_leaves base.group_hr_manager base.group_hr_user 1 1 1 1
8 access_crm_meeting_type_manager crm.meeting.type.manager base_calendar.model_crm_meeting_type base.group_hr_manager 1 1 1 1

View File

@ -1,6 +1,19 @@
<?xml version="1.0"?>
<openerp>
<data>
<record id="property_rule_holidays_employee" model="ir.rule">
<field name="name">Employee Holidays</field>
<field model="ir.model" name="model_id" ref="model_hr_holidays"/>
<field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>
<record id="property_rule_holidays_officer" model="ir.rule">
<field name="name">Holidays Officer</field>
<field model="ir.model" name="model_id" ref="model_hr_holidays"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4,ref('base.group_hr_user'))]"/>
</record>
</data>
</openerp>

View File

@ -0,0 +1,217 @@
# Mongolian translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-08-31 07:21+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Mongolian <mn@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: 2012-09-01 04:55+0000\n"
"X-Generator: Launchpad (build 15890)\n"
#. module: import_google
#: help:synchronize.google.import,group_name:0
msgid "Choose which group to import, By default it takes all."
msgstr ""
#. module: import_google
#: view:synchronize.google.import:0
msgid "Import Google Calendar Events"
msgstr ""
#. module: import_google
#: view:synchronize.google.import:0
msgid "_Import Events"
msgstr ""
#. module: import_google
#: code:addons/import_google/wizard/import_google_data.py:71
#, python-format
msgid ""
"No Google Username or password Defined for user.\n"
"Please define in user view"
msgstr ""
#. module: import_google
#: code:addons/import_google/wizard/import_google_data.py:127
#, python-format
msgid ""
"Invalid login detail !\n"
" Specify Username/Password."
msgstr ""
#. module: import_google
#: field:synchronize.google.import,supplier:0
msgid "Supplier"
msgstr ""
#. module: import_google
#: view:synchronize.google.import:0
msgid "Import Options"
msgstr ""
#. module: import_google
#: field:synchronize.google.import,group_name:0
msgid "Group Name"
msgstr ""
#. module: import_google
#: model:ir.model,name:import_google.model_crm_case_categ
msgid "Category of Case"
msgstr ""
#. module: import_google
#: model:ir.actions.act_window,name:import_google.act_google_login_contact_form
#: model:ir.ui.menu,name:import_google.menu_sync_contact
msgid "Import Google Contacts"
msgstr ""
#. module: import_google
#: view:google.import.message:0
msgid "Import Google Data"
msgstr ""
#. module: import_google
#: view:crm.meeting:0
msgid "Meeting Type"
msgstr ""
#. module: import_google
#: code:addons/import_google/wizard/import_google.py:38
#: code:addons/import_google/wizard/import_google_data.py:28
#, python-format
msgid ""
"Please install gdata-python-client from http://code.google.com/p/gdata-"
"python-client/downloads/list"
msgstr ""
#. module: import_google
#: model:ir.model,name:import_google.model_google_login
msgid "Google Contact"
msgstr ""
#. module: import_google
#: view:synchronize.google.import:0
msgid "Import contacts from a google account"
msgstr ""
#. module: import_google
#: code:addons/import_google/wizard/import_google_data.py:133
#, python-format
msgid "Please specify correct user and password !"
msgstr ""
#. module: import_google
#: field:synchronize.google.import,customer:0
msgid "Customer"
msgstr ""
#. module: import_google
#: view:synchronize.google.import:0
msgid "_Cancel"
msgstr ""
#. module: import_google
#: model:ir.model,name:import_google.model_synchronize_google_import
msgid "synchronize.google.import"
msgstr ""
#. module: import_google
#: view:synchronize.google.import:0
msgid "_Import Contacts"
msgstr ""
#. module: import_google
#: model:ir.actions.act_window,name:import_google.act_google_login_form
#: model:ir.ui.menu,name:import_google.menu_sync_calendar
msgid "Import Google Calendar"
msgstr ""
#. module: import_google
#: code:addons/import_google/wizard/import_google_data.py:50
#, python-format
msgid "Import google"
msgstr ""
#. module: import_google
#: code:addons/import_google/wizard/import_google_data.py:127
#: code:addons/import_google/wizard/import_google_data.py:133
#, python-format
msgid "Error"
msgstr ""
#. module: import_google
#: code:addons/import_google/wizard/import_google_data.py:71
#, python-format
msgid "Warning !"
msgstr ""
#. module: import_google
#: field:synchronize.google.import,create_partner:0
msgid "Options"
msgstr "Тохируулга"
#. module: import_google
#: view:google.import.message:0
msgid "_Ok"
msgstr ""
#. module: import_google
#: code:addons/import_google/wizard/import_google.py:38
#: code:addons/import_google/wizard/import_google_data.py:28
#, python-format
msgid "Google Contacts Import Error!"
msgstr ""
#. module: import_google
#: model:ir.model,name:import_google.model_google_import_message
msgid "Import Message"
msgstr ""
#. module: import_google
#: field:synchronize.google.import,calendar_name:0
msgid "Calendar Name"
msgstr ""
#. module: import_google
#: help:synchronize.google.import,supplier:0
msgid "Check this box to set newly created partner as Supplier."
msgstr ""
#. module: import_google
#: selection:synchronize.google.import,create_partner:0
msgid "Import only address"
msgstr "Зөвхөн хаяг оруулах"
#. module: import_google
#: field:crm.case.categ,user_id:0
msgid "User"
msgstr ""
#. module: import_google
#: view:synchronize.google.import:0
msgid "Partner Status for this Group:"
msgstr ""
#. module: import_google
#: field:google.import.message,name:0
msgid "Message"
msgstr ""
#. module: import_google
#: selection:synchronize.google.import,create_partner:0
msgid "Create partner for each contact"
msgstr ""
#. module: import_google
#: help:synchronize.google.import,customer:0
msgid "Check this box to set newly created partner as Customer."
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -7,30 +7,30 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:37+0000\n"
"PO-Revision-Date: 2012-08-18 17:40+0000\n"
"Last-Translator: Heling Yao <Unknown>\n"
"PO-Revision-Date: 2012-08-31 14:59+0000\n"
"Last-Translator: ccdos <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 06:07+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-01 04:55+0000\n"
"X-Generator: Launchpad (build 15890)\n"
#. module: sale_crm
#: field:sale.order,categ_id:0
msgid "Category"
msgstr ""
msgstr "分类"
#. module: sale_crm
#: sql_constraint:sale.order:0
msgid "Order Reference must be unique per Company!"
msgstr ""
msgstr "订单号必须在一个公司范围内唯一"
#. module: sale_crm
#: code:addons/sale_crm/wizard/crm_make_sale.py:112
#, python-format
msgid "Converted to Sales Quotation(%s)."
msgstr ""
msgstr "转换为销售报价单(%s)。"
#. module: sale_crm
#: view:crm.make.sale:0
@ -73,7 +73,7 @@ msgstr "在生成销售订单后检查是否关闭商机。"
#. module: sale_crm
#: view:board.board:0
msgid "My Opportunities"
msgstr ""
msgstr "我的商机"
#. module: sale_crm
#: view:crm.lead:0
@ -104,13 +104,13 @@ msgstr "关闭商机"
#. module: sale_crm
#: view:board.board:0
msgid "My Planned Revenues by Stage"
msgstr ""
msgstr "这阶段我的计划收入"
#. module: sale_crm
#: code:addons/sale_crm/wizard/crm_make_sale.py:110
#, python-format
msgid "Opportunity '%s' is converted to Quotation."
msgstr ""
msgstr "商机 '%s' 被转换为报价单"
#. module: sale_crm
#: view:sale.order:0

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:37+0000\n"
"PO-Revision-Date: 2011-06-28 05:04+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2012-08-31 14:59+0000\n"
"Last-Translator: ccdos <Unknown>\n"
"Language-Team: Chinese (Simplified) <zh_CN@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: 2012-08-28 06:34+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-01 04:55+0000\n"
"X-Generator: Launchpad (build 15890)\n"
#. module: sale_mrp
#: help:mrp.production,sale_ref:0
@ -40,12 +40,12 @@ msgstr "销售名称"
#. module: sale_mrp
#: sql_constraint:mrp.production:0
msgid "Reference must be unique per Company!"
msgstr ""
msgstr "编号必须在公司内唯一!"
#. module: sale_mrp
#: constraint:mrp.production:0
msgid "Order quantity cannot be negative or zero!"
msgstr ""
msgstr "订单数量不能是负数或者0"
#. module: sale_mrp
#: help:mrp.production,sale_name:0