parent
d315518200
commit
ca24f48de3
|
@ -463,7 +463,7 @@ class account_fiscalyear(osv.osv):
|
|||
'date_start': fields.date('Start date', required=True),
|
||||
'date_stop': fields.date('End date', required=True),
|
||||
'period_ids': fields.one2many('account.period', 'fiscalyear_id', 'Periods'),
|
||||
'state': fields.selection([('draft','Draft'), ('done','Done')], 'State', redonly=True),
|
||||
'state': fields.selection([('draft','Draft'), ('done','Done')], 'Status', redonly=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
@ -510,7 +510,7 @@ class account_period(osv.osv):
|
|||
'date_start': fields.date('Start of period', required=True, states={'done':[('readonly',True)]}),
|
||||
'date_stop': fields.date('End of period', required=True, states={'done':[('readonly',True)]}),
|
||||
'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done':[('readonly',True)]}, select=True),
|
||||
'state': fields.selection([('draft','Draft'), ('done','Done')], 'State', readonly=True)
|
||||
'state': fields.selection([('draft','Draft'), ('done','Done')], 'Status', readonly=True)
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
|
@ -552,7 +552,7 @@ class account_journal_period(osv.osv):
|
|||
'period_id': fields.many2one('account.period', 'Period', required=True, ondelete="cascade"),
|
||||
'icon': fields.function(_icon_get, method=True, string='Icon', type='string'),
|
||||
'active': fields.boolean('Active', required=True),
|
||||
'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'State', required=True, readonly=True)
|
||||
'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'Status', required=True, readonly=True)
|
||||
}
|
||||
|
||||
def _check(self, cr, uid, ids, context={}):
|
||||
|
@ -627,7 +627,7 @@ class account_move(osv.osv):
|
|||
'ref': fields.char('Ref', size=64),
|
||||
'period_id': fields.many2one('account.period', 'Period', required=True, states={'posted':[('readonly',True)]}),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True, states={'posted':[('readonly',True)]}),
|
||||
'state': fields.selection([('draft','Draft'), ('posted','Posted')], 'State', required=True, readonly=True),
|
||||
'state': fields.selection([('draft','Draft'), ('posted','Posted')], 'Status', required=True, readonly=True),
|
||||
'line_id': fields.one2many('account.move.line', 'move_id', 'Entries', states={'posted':[('readonly',True)]}),
|
||||
}
|
||||
_defaults = {
|
||||
|
@ -1447,7 +1447,7 @@ class account_subscription(osv.osv):
|
|||
'period_total': fields.integer('Number of period', required=True),
|
||||
'period_nbr': fields.integer('Period', required=True),
|
||||
'period_type': fields.selection([('day','days'),('month','month'),('year','year')], 'Period Type', required=True),
|
||||
'state': fields.selection([('draft','Draft'),('running','Running'),('done','Done')], 'State', required=True, readonly=True),
|
||||
'state': fields.selection([('draft','Draft'),('running','Running'),('done','Done')], 'Status', required=True, readonly=True),
|
||||
|
||||
'lines_id': fields.one2many('account.subscription.line', 'subscription_id', 'Subscription Lines')
|
||||
}
|
||||
|
|
|
@ -267,7 +267,7 @@ class account_move_line(osv.osv):
|
|||
'centralisation': fields.selection([('normal','Normal'),('credit','Credit Centralisation'),('debit','Debit Centralisation')], 'Centralisation', size=6),
|
||||
'balance': fields.function(_balance, method=True, string='Balance'),
|
||||
'active': fields.boolean('Active'),
|
||||
'state': fields.selection([('draft','Draft'), ('valid','Valid')], 'State', readonly=True),
|
||||
'state': fields.selection([('draft','Draft'), ('valid','Valid')], 'Status', readonly=True),
|
||||
'tax_code_id': fields.many2one('account.tax.code', 'Tax Account'),
|
||||
'tax_amount': fields.float('Tax/Base Amount', digits=(16,2), select=True),
|
||||
'invoice': fields.function(_invoice, method=True, string='Invoice',
|
||||
|
|
|
@ -22,7 +22,7 @@ class crossovered_budget(osv.osv):
|
|||
'validating_user_id': fields.many2one('res.users','Validate User', readonly=True),
|
||||
'date_from': fields.date('Start Date',required=True,states={'done':[('readonly',True)]}),
|
||||
'date_to': fields.date('End Date',required=True,states={'done':[('readonly',True)]}),
|
||||
'state' : fields.selection([('draft','Draft'),('confirm','Confirmed'),('validate','Validated'),('done','Done'),('cancel', 'Cancelled')], 'State', select=True, required=True, readonly=True),
|
||||
'state' : fields.selection([('draft','Draft'),('confirm','Confirmed'),('validate','Validated'),('done','Done'),('cancel', 'Cancelled')], 'Status', select=True, required=True, readonly=True),
|
||||
'crossovered_budget_line': fields.one2many('crossovered.budget.lines', 'crossovered_budget_id', 'Budget Lines',states={'done':[('readonly',True)]} ),
|
||||
}
|
||||
|
||||
|
|
|
@ -82,8 +82,7 @@ class auction_dates(osv.osv):
|
|||
'acc_income': fields.many2one('account.account', 'Income Account', required=True),
|
||||
'acc_expense': fields.many2one('account.account', 'Expense Account', required=True),
|
||||
'adj_total': fields.function(_adjudication_get, method=True, string='Total Adjudication',store=True),
|
||||
# 'state': fields.selection((('draft','Draft'),('closed','Closed')),'State',select=1, readonly=True),
|
||||
'state': fields.selection((('draft','Draft'),('close','Closed')),'State',select=1, readonly=True),
|
||||
'state': fields.selection((('draft','Draft'),('close','Closed')),'Status',select=1, readonly=True),
|
||||
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True),
|
||||
|
||||
}
|
||||
|
@ -453,7 +452,7 @@ class auction_lots(osv.osv):
|
|||
# 'paid_vnd':fields.function(_is_paid_vnd,string='Seller Paid',method=True,type='boolean',store=True),
|
||||
'paid_vnd':fields.boolean('Seller Paid'),
|
||||
'paid_ach':fields.function(_is_paid_ach,string='Buyer invoice reconciled',method=True, type='boolean',store=True),
|
||||
'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('sold','Sold'),('taken_away','Taken away')),'State', required=True, readonly=True),
|
||||
'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('sold','Sold'),('taken_away','Taken away')),'Status', required=True, readonly=True),
|
||||
'buyer_price': fields.function(_buyerprice, method=True, string='Buyer price',store=True),
|
||||
'seller_price': fields.function(_sellerprice, method=True, string='Seller price',store=True),
|
||||
'gross_revenue':fields.function(_grossprice, method=True, string='Gross revenue',store=True),
|
||||
|
@ -995,7 +994,7 @@ class report_seller_auction(osv.osv):
|
|||
'avg_price':fields.float('Avg adjudication',readonly=True),
|
||||
'avg_estimation':fields.float('Avg estimation',readonly=True),
|
||||
'date': fields.date('Create Date', required=True, select=1),
|
||||
'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('sold','Sold')),'State',readonly=True, select=1)
|
||||
'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('sold','Sold')),'Status',readonly=True, select=1)
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
|
@ -1204,7 +1203,7 @@ class report_auction_adjudication(osv.osv):
|
|||
_auto = False
|
||||
_columns = {
|
||||
'name': fields.many2one('auction.dates','Auction date',readonly=True,select=1),
|
||||
'state': fields.selection((('draft','Draft'),('close','Closed')),'State', select=1),
|
||||
'state': fields.selection((('draft','Draft'),('close','Closed')),'Status', select=1),
|
||||
'adj_total': fields.float('Total Adjudication'),
|
||||
'date': fields.date('Date', readonly=True,select=1),
|
||||
'user_id':fields.many2one('res.users', 'User',select=1)
|
||||
|
@ -1310,7 +1309,7 @@ class report_object_encoded(osv.osv):
|
|||
_description = "Object encoded"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('invoiced','Invoiced')),'State', required=True,select=1),
|
||||
'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('invoiced','Invoiced')),'Status', required=True,select=1),
|
||||
'user_id':fields.many2one('res.users', 'User', select=1),
|
||||
'estimation': fields.float('Estimation',select=2),
|
||||
'date': fields.date('Create Date', required=True),
|
||||
|
@ -1380,7 +1379,7 @@ class report_unclassified_objects(osv.osv):
|
|||
'obj_num': fields.integer('Catalog Number'),
|
||||
'obj_price': fields.float('Adjudication price'),
|
||||
'lot_num': fields.integer('List Number', required=True, select=1 ),
|
||||
'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('sold','Sold')),'State', required=True, readonly=True),
|
||||
'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('sold','Sold')),'Status', required=True, readonly=True),
|
||||
'obj_comm': fields.boolean('Commission'),
|
||||
'bord_vnd_id': fields.many2one('auction.deposit', 'Depositer Inventory', required=True),
|
||||
'ach_login': fields.char('Buyer Username',size=64),
|
||||
|
|
|
@ -288,7 +288,7 @@ from
|
|||
'model_ids': fields.many2many('ir.model', 'base_report_creator_report_model_rel', 'report_id','model_id', 'Reported Objects'),
|
||||
'field_ids': fields.one2many('base_report_creator.report.fields', 'report_id', 'Fields to Display'),
|
||||
'filter_ids': fields.one2many('base_report_creator.report.filter', 'report_id', 'Filters'),
|
||||
'state': fields.selection([('draft','Draft'),('valid','Valid')], 'State', required=True),
|
||||
'state': fields.selection([('draft','Draft'),('valid','Valid')], 'Status', required=True),
|
||||
'sql_query': fields.function(_sql_query_get, method=True, type="text", string='SQL Query', store=True),
|
||||
'group_ids': fields.many2many('res.groups', 'base_report_creator_group_rel','report_id','group_id','Authorized Groups'),
|
||||
}
|
||||
|
|
|
@ -340,7 +340,7 @@ class crm_case(osv.osv):
|
|||
'user_id': fields.many2one('res.users', 'User Responsible'),
|
||||
'history_line': fields.one2many('crm.case.history', 'case_id', 'Communication'),
|
||||
'log_ids': fields.one2many('crm.case.log', 'case_id', 'Logs History'),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
|
||||
'ref' : fields.reference('Reference', selection=_links_get, size=128),
|
||||
'ref2' : fields.reference('Reference 2', selection=_links_get, size=128),
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ class crm_segmentation(osv.osv):
|
|||
'description': fields.text('Description'),
|
||||
'categ_id': fields.many2one('res.partner.category', 'Partner Category', required=True, help='The partner category that will be added to partners that match the segmentation criterions after computation.'),
|
||||
'exclusif': fields.boolean('Exclusive', help='Check if the category is limited to partners that match the segmentation criterions. If checked, remove the category from partners that doesn\'t match segmentation criterions'),
|
||||
'state': fields.selection([('not running','Not Running'),('running','Running')], 'Execution State', readonly=True),
|
||||
'state': fields.selection([('not running','Not Running'),('running','Running')], 'Execution Status', readonly=True),
|
||||
'partner_id': fields.integer('Max Partner ID processed'),
|
||||
'segmentation_line': fields.one2many('crm.segmentation.line', 'segmentation_id', 'Criteria', required=True),
|
||||
'som_interval': fields.integer('Days per Periode', help="A period is the average number of days between two cycle of sale or purchase for this segmentation. It's mainly used to detect if a partner has not purchased or buy for a too long time, so we suppose that his state of mind has decreased because he probably bought goods to another supplier. Use this functionnality for recurring businesses."),
|
||||
|
|
|
@ -133,7 +133,7 @@ class event(osv.osv):
|
|||
'task_ids': one2many_mod_task('project.task', 'project_id', "Project tasks", readonly=True, domain="[('state','<>', 'done')]"),
|
||||
'date_begin': fields.datetime('Beginning date', required=True),
|
||||
'date_end': fields.datetime('Ending date', required=True),
|
||||
'state': fields.selection([('draft','Draft'),('confirm','Confirmed'),('done','Done'),('cancel','Canceled')], 'State', readonly=True, required=True),
|
||||
'state': fields.selection([('draft','Draft'),('confirm','Confirmed'),('done','Done'),('cancel','Canceled')], 'Status', readonly=True, required=True),
|
||||
'mail_auto_registr':fields.boolean('Mail Auto Register',help='A mail is send when the registration is confirmed'),
|
||||
'mail_auto_confirm':fields.boolean('Mail Auto Confirm',help='A mail is send when the event is confimed'),
|
||||
'mail_registr':fields.text('Mail Register',help='Template for the mail'),
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
* Employees and hierarchies
|
||||
* Work hours sheets
|
||||
* Attendances and sign in/out system
|
||||
* Holidays
|
||||
|
||||
Different reports are also provided, mainly for attendance statistics.
|
||||
""",
|
||||
|
@ -45,7 +44,6 @@
|
|||
"init_xml" : [],
|
||||
"demo_xml" : [
|
||||
"hr_demo.xml",
|
||||
"hr_bel_holidays_2005.xml",
|
||||
"hr_department_demo.xml",
|
||||
],
|
||||
"update_xml" : [
|
||||
|
|
|
@ -255,30 +255,3 @@ class hr_attendance(osv.osv):
|
|||
_order = 'name desc'
|
||||
hr_attendance()
|
||||
|
||||
class hr_holidays_status(osv.osv):
|
||||
_name = "hr.holidays.status"
|
||||
_description = "Holidays Status"
|
||||
_columns = {
|
||||
'name' : fields.char('Holiday Status', size=64, required=True, translate=True),
|
||||
}
|
||||
hr_holidays_status()
|
||||
|
||||
class hr_holidays(osv.osv):
|
||||
_name = "hr.holidays"
|
||||
_description = "Holidays"
|
||||
_columns = {
|
||||
'name' : fields.char('Description', required=True, size=64),
|
||||
'date_from' : fields.datetime('Vacation start day', required=True),
|
||||
'date_to' : fields.datetime('Vacation end day'),
|
||||
'holiday_status' : fields.many2one("hr.holidays.status", "Holiday's Status"),
|
||||
'employee_id' : fields.many2one('hr.employee', 'Employee', select=True),
|
||||
}
|
||||
_defaults = {
|
||||
'employee_id' : _employee_get
|
||||
}
|
||||
_order = 'date_from desc'
|
||||
hr_holidays()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<terp>
|
||||
<data noupdate="1">
|
||||
<record id="jf" model="hr.holidays.status">
|
||||
<field name="name">Public holidays</field>
|
||||
</record>
|
||||
|
||||
<record model="hr.holidays">
|
||||
<field name="name">New Year</field>
|
||||
<field name="date_from">2005-01-01 00:00</field>
|
||||
<field name="date_to">2005-01-02 00:00</field>
|
||||
<field name="holiday_status" ref="jf"/>
|
||||
</record>
|
||||
<record model="hr.holidays">
|
||||
<field name="name">Easter Monday</field>
|
||||
<field name="date_from">2005-03-28 00:00</field>
|
||||
<field name="date_to">2005-03-29 00:00</field>
|
||||
<field name="holiday_status" ref="jf"/>
|
||||
</record>
|
||||
<record model="hr.holidays">
|
||||
<field name="name">Labor Day</field>
|
||||
<field name="date_from">2005-05-01 00:00</field>
|
||||
<field name="date_to">2005-05-02 00:00</field>
|
||||
<field name="holiday_status" ref="jf"/>
|
||||
</record>
|
||||
<record model="hr.holidays">
|
||||
<field name="name">Ascension</field>
|
||||
<field name="date_from">2005-05-05 00:00</field>
|
||||
<field name="date_to">2005-05-06 00:00</field>
|
||||
<field name="holiday_status" ref="jf"/>
|
||||
</record>
|
||||
<record model="hr.holidays">
|
||||
<field name="name">Ascension Day</field>
|
||||
<field name="date_from">2005-05-16 00:00</field>
|
||||
<field name="date_to">2005-05-17 00:00</field>
|
||||
<field name="holiday_status" ref="jf"/>
|
||||
</record>
|
||||
<record model="hr.holidays">
|
||||
<field name="name">Pentecost Monday</field>
|
||||
<field name="date_from">2005-05-16 00:00</field>
|
||||
<field name="date_to">2005-05-17 00:00</field>
|
||||
<field name="holiday_status" ref="jf"/>
|
||||
</record>
|
||||
<record model="hr.holidays">
|
||||
<field name="name">National day</field>
|
||||
<field name="date_from">2005-07-21 00:00</field>
|
||||
<field name="date_to">2005-07-22 00:00</field>
|
||||
<field name="holiday_status" ref="jf"/>
|
||||
</record>
|
||||
<record model="hr.holidays">
|
||||
<field name="name">All Saints</field>
|
||||
<field name="date_from">2005-11-01 00:00</field>
|
||||
<field name="date_to">2005-11-02 00:00</field>
|
||||
<field name="holiday_status" ref="jf"/>
|
||||
</record>
|
||||
<record model="hr.holidays">
|
||||
<field name="name">Christmas</field>
|
||||
<field name="date_from">2005-12-25 00:00</field>
|
||||
<field name="date_to">2005-12-26 00:00</field>
|
||||
<field name="holiday_status" ref="jf"/>
|
||||
</record>
|
||||
</data>
|
||||
</terp>
|
|
@ -1,9 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<terp>
|
||||
<data>
|
||||
<!-- <record model="res.groups" id="hr_id">-->
|
||||
<!-- <field name="name">HR</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record model="hr.action.reason">
|
||||
<field name="name">Start of shift</field>
|
||||
|
@ -30,23 +27,6 @@
|
|||
<field name="action_type">sign_out</field>
|
||||
</record>
|
||||
|
||||
<record id="status_unpaid" model="hr.holidays.status">
|
||||
<field name="name">Unpaid holidays</field>
|
||||
</record>
|
||||
<record id="ca" model="hr.holidays.status">
|
||||
<field name="name">Annual holidays</field>
|
||||
</record>
|
||||
<record id="status_sick" model="hr.holidays.status">
|
||||
<field name="name">Sickness holidays</field>
|
||||
</record>
|
||||
<record id="ma" model="hr.holidays.status">
|
||||
<field name="name">Maternity holidays</field>
|
||||
</record>
|
||||
<record id="status_unauth" model="hr.holidays.status">
|
||||
<field name="name">Unauthorised holidays</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Example employee -->
|
||||
|
||||
<record id="timesheet_group1" model="hr.timesheet.group">
|
||||
|
@ -129,21 +109,6 @@
|
|||
<field name="tgroup_id" ref="timesheet_group1"/>
|
||||
</record>
|
||||
|
||||
<record model="hr.holidays">
|
||||
<field name="name">Bali Trip</field>
|
||||
<field name="date_from">2005-05-11 08:00</field>
|
||||
<field name="date_to">2005-05-25 18:00</field>
|
||||
<field name="holiday_status" ref="ca"/>
|
||||
<field name="employee_id" ref="employee1"/>
|
||||
</record>
|
||||
<record model="hr.holidays">
|
||||
<field name="name">Paternity holiday</field>
|
||||
<field name="date_from">2005-06-02 08:00</field>
|
||||
<field name="date_to">2005-06-13 18:00</field>
|
||||
<field name="holiday_status" ref="ma"/>
|
||||
<field name="employee_id" ref="employee1"/>
|
||||
</record>
|
||||
|
||||
<record id="attendance1" model="hr.attendance">
|
||||
<field eval="time.strftime('%Y-%m-01 08:21')" name="name"/>
|
||||
<field name="action">sign_in</field>
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
<data>
|
||||
<report auto="False" id="attendance_error_report" keyword="client_print_multi" menu="False" model="hr.employee" multi="True" name="hr.timesheet.attendance.error" rml="hr/report/attendance_errors.rml" string="Attendance Error Report"/>
|
||||
</data>
|
||||
</terp>
|
||||
</terp>
|
||||
|
|
|
@ -155,45 +155,5 @@
|
|||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<!-- Holiday Status security -->
|
||||
<record id="access_hr_holiday_status" model="ir.model.access">
|
||||
<field name="name">HR Holiday Status</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'hr.holidays.status')]"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="False" name="perm_write"/>
|
||||
<field eval="False" name="perm_create"/>
|
||||
<field eval="False" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_hr_holiday_status_manager" model="ir.model.access">
|
||||
<field name="name">HR Holiday Status</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'hr.holidays.status')]"/>
|
||||
<field name="group_id" ref="group_hr_manager"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<!-- Holidays security -->
|
||||
<record id="access_hr_holiday" model="ir.model.access">
|
||||
<field name="name">HR Holidays</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'hr.holidays')]"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="False" name="perm_write"/>
|
||||
<field eval="False" name="perm_create"/>
|
||||
<field eval="False" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_hr_holiday_employee" model="ir.model.access">
|
||||
<field name="name">HR Holidays</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'hr.holidays')]"/>
|
||||
<field name="group_id" ref="group_hr_employee"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
</data>
|
||||
</terp>
|
||||
</terp>
|
||||
|
|
|
@ -323,90 +323,6 @@
|
|||
<menuitem action="open_view_attendance" groups="base.group_admin" id="menu_open_view_attendance" parent="hr.menu_hr_attendance"/>
|
||||
|
||||
|
||||
<!-- Holidays -->
|
||||
<record id="edit_holiday" model="ir.ui.view">
|
||||
<field name="name">hr.holidays.form</field>
|
||||
<field name="model">hr.holidays</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Employee holidays">
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<field name="date_from" select="1"/>
|
||||
<field name="date_to" select="1"/>
|
||||
<newline/>
|
||||
<field name="holiday_status" select="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_holiday" model="ir.ui.view">
|
||||
<field name="name">hr.holidays.tree</field>
|
||||
<field name="model">hr.holidays</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Employee holidays">
|
||||
<field name="name"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="holiday_status"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="ask_holiday" model="ir.ui.view">
|
||||
<field name="name">hr.holidays.ask_form</field>
|
||||
<field name="model">hr.holidays</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Vacations requests">
|
||||
<field name="name" select="1"/>
|
||||
<field name="holiday_status"/>
|
||||
<field colspan="4" name="employee_id" select="1"/>
|
||||
<newline/>
|
||||
<field name="date_from" select="1"/>
|
||||
<field name="date_to" select="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="open_ask_holidays" model="ir.actions.act_window">
|
||||
<field name="name">Vacation Requests</field>
|
||||
<field name="res_model">hr.holidays</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_holiday"/>
|
||||
</record>
|
||||
<menuitem action="open_ask_holidays" groups="base.group_admin" id="menu_open_ask_holidays" parent="hr.menu_hr_attendance"/>
|
||||
|
||||
<!-- Some Configuration (holiday type, attendance reasons) -->
|
||||
|
||||
<record id="edit_holiday_status" model="ir.ui.view">
|
||||
<field name="name">hr.holidays.status.form</field>
|
||||
<field name="model">hr.holidays.status</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Define holiday status">
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_holiday_status" model="ir.ui.view">
|
||||
<field name="name">hr.holidays.status.tree</field>
|
||||
<field name="model">hr.holidays.status</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Holiday status">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="open_view_holiday_status" model="ir.actions.act_window">
|
||||
<field name="name">Holiday Status</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">hr.holidays.status</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_holiday_status"/>
|
||||
</record>
|
||||
<menuitem action="open_view_holiday_status" groups="base.group_admin" id="menu_open_view_holiday_status" parent="hr.menu_hr_configuration"/>
|
||||
|
||||
<record id="edit_attendance_reason" model="ir.ui.view">
|
||||
<field name="name">hr.action.reason.form</field>
|
||||
<field name="model">hr.action.reason</field>
|
||||
|
|
|
@ -1,191 +0,0 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved.
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# WARNING: This program as such is intended to be used by professional
|
||||
# programmers who take the whole responsability of assessing all potential
|
||||
# consequences resulting from its eventual inadequacies and bugs
|
||||
# End users who are looking for a ready-to-use solution with commercial
|
||||
# garantees and support are strongly adviced to contract a Free Software
|
||||
# Service Company
|
||||
#
|
||||
# This program is Free Software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from mx import DateTime
|
||||
from mx.DateTime import now
|
||||
|
||||
import netsvc
|
||||
import pooler
|
||||
|
||||
from report.interface import report_rml
|
||||
from report.interface import toxml
|
||||
|
||||
one_week = DateTime.RelativeDateTime(days=7)
|
||||
num2day = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
|
||||
|
||||
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):
|
||||
service = netsvc.LocalService('object_proxy')
|
||||
|
||||
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
|
||||
|
||||
user_xml = []
|
||||
|
||||
jf_sql = """select hol.date_from, hol.date_to from hr_holidays as hol, hr_holidays_status as stat
|
||||
where hol.holiday_status = stat.id and stat.name = 'Public holidays' """
|
||||
cr.execute(jf_sql)
|
||||
jfs = []
|
||||
jfs = [(DateTime.strptime(l['date_from'], '%Y-%m-%d %H:%M:%S'), DateTime.strptime(l['date_to'], '%Y-%m-%d %H:%M:%S')) for l in cr.dictfetchall()]
|
||||
|
||||
for employee_id in ids:
|
||||
emp = service.execute(cr.dbname, uid, 'hr.employee', 'read', [employee_id], ['id', 'name'])[0]
|
||||
monday, n_monday = first_monday, first_monday + one_week
|
||||
stop, week_xml = False, []
|
||||
user_repr = '''
|
||||
<user>
|
||||
<name>%s</name>
|
||||
%%s
|
||||
</user>
|
||||
''' % toxml(emp['name'])
|
||||
while monday != last_monday:
|
||||
#### Work hour calculation
|
||||
sql = '''
|
||||
select action, att.name
|
||||
from hr_employee as emp inner join hr_attendance as att
|
||||
on emp.id = att.employee_id
|
||||
where att.name between '%s' and '%s' and emp.id = %s
|
||||
order by att.name
|
||||
'''
|
||||
for idx in range(7):
|
||||
cr.execute(sql, (monday, monday + DateTime.RelativeDateTime(days=idx+1), employee_id))
|
||||
attendences = cr.dictfetchall()
|
||||
week_wh = {}
|
||||
if attendences and attendences[0]['action'] == 'sign_out':
|
||||
attendences.insert(0, {'name': monday.strftime('%Y-%m-%d %H:%M:%S'), 'action':'sign_in'})
|
||||
if attendences and attendences[-1]['action'] == 'sign_in':
|
||||
attendences.append({'name' : n_monday.strftime('%Y-%m-%d %H:%M:%S'), 'action':'sign_out'})
|
||||
for att in attendences:
|
||||
dt = DateTime.strptime(att['name'], '%Y-%m-%d %H:%M:%S')
|
||||
if att['action'] == 'sign_out':
|
||||
week_wh[ldt.day_of_week] = week_wh.get(ldt.day_of_week, 0) + (dt - ldt).hours
|
||||
ldt = dt
|
||||
|
||||
#### Theoretical workhour calculation
|
||||
week_twh = {}
|
||||
sql = '''
|
||||
select t.hour_from, t.hour_to
|
||||
from hr_timesheet as t
|
||||
inner join (hr_timesheet_group as g inner join hr_timesheet_employee_rel as rel
|
||||
on rel.tgroup_id = g.id and rel.emp_id = %s)
|
||||
on t.tgroup_id = g.id
|
||||
where dayofweek = %s
|
||||
and date_from = (select max(date_from)
|
||||
from hr_timesheet inner join (hr_timesheet_employee_rel
|
||||
inner join hr_timesheet_group
|
||||
on hr_timesheet_group.id = hr_timesheet_employee_rel.tgroup_id
|
||||
and hr_timesheet_employee_rel.emp_id = %s)
|
||||
on hr_timesheet.tgroup_id = hr_timesheet_group.id
|
||||
where dayofweek = %s and date_from <= '%s')
|
||||
order by date_from desc
|
||||
'''
|
||||
for idx in range(7):
|
||||
day = monday + DateTime.RelativeDateTime(days=idx+1)
|
||||
# Is this a public holiday ?
|
||||
isPH = False
|
||||
for jf_start, jf_end in jfs:
|
||||
if jf_start <= day < jf_end:
|
||||
isPH = True
|
||||
break
|
||||
if isPH:
|
||||
week_twh[idx] = 0
|
||||
else:
|
||||
cr.execute(sql, (emp['id'], day.day_of_week, emp['id'], day.day_of_week, day))
|
||||
dhs = cr.dictfetchall()
|
||||
week_twh[idx] = reduce(lambda x,y:x+(DateTime.strptime(y['hour_to'], '%H:%M:%S') - DateTime.strptime(y['hour_from'], '%H:%M:%S')).hours,dhs, 0)
|
||||
|
||||
#### Holiday calculation
|
||||
sql = '''
|
||||
select hol.date_from, hol.date_to, stat.name as status
|
||||
from hr_employee as emp
|
||||
inner join (hr_holidays as hol left join hr_holidays_status as stat
|
||||
on hol.holiday_status = stat.id)
|
||||
on emp.id = hol.employee_id
|
||||
where ((hol.date_from <= '%s' and hol.date_to >= '%s')
|
||||
or (hol.date_from < '%s' and hol.date_to >= '%s')
|
||||
or (hol.date_from > '%s' and hol.date_to < '%s')
|
||||
and stat.name != 'Public holidays') and emp.id = %s
|
||||
order by hol.date_from
|
||||
'''
|
||||
cr.execute(sql, (monday, monday, n_monday, n_monday, monday, n_monday, employee_id))
|
||||
holidays = cr.dictfetchall()
|
||||
week_hol = {}
|
||||
for hol in holidays:
|
||||
df = DateTime.strptime(hol['date_from'], '%Y-%m-%d %H:%M:%S')
|
||||
dt = DateTime.strptime(hol['date_to'], '%Y-%m-%d %H:%M:%S')
|
||||
for idx in range(7):
|
||||
day = monday + DateTime.RelativeDateTime(days=idx+1)
|
||||
if (df.year, df.month, df.day) <= (day.year, day.month, day.day) <= (dt.year, dt.month, dt.day):
|
||||
if (df.year, df.month, df.day) == (dt.year, dt.month, dt.day):
|
||||
week_hol[idx] = {'status' : hol['status'], 'hours' : (dt - df).hours}
|
||||
else:
|
||||
week_hol[idx] = {'status' : hol['status'], 'hours' : week_twh[idx]}
|
||||
|
||||
# Week xml representation
|
||||
week_repr = ['<week>', '<weekstart>%s</weekstart>' % monday.strftime('%Y-%m-%d'), '<weekend>%s</weekend>' % n_monday.strftime('%Y-%m-%d')]
|
||||
for idx in range(7):
|
||||
week_repr.append('<%s>' % num2day[idx])
|
||||
week_repr.append('<theoretical>%sh%02d</theoretical>' % to_hour(week_twh[idx]))
|
||||
if idx in week_wh:
|
||||
week_repr.append('<workhours>%sh%02d</workhours>' % to_hour(week_wh[idx]))
|
||||
if idx in week_hol and week_hol[idx]['hours']:
|
||||
week_repr.append('<holidayhours type="%(status)s">%(hours)s</holidayhours>' % week_hol[idx])
|
||||
week_repr.append('</%s>' % num2day[idx])
|
||||
week_repr.append('<total>')
|
||||
week_repr.append('<theoretical>%sh%02d</theoretical>' % to_hour(reduce(lambda x,y:x+y, week_twh.values(), 0)))
|
||||
week_repr.append('<worked>%sh%02d</worked>' % to_hour(reduce(lambda x,y:x+y, week_wh.values(), 0)))
|
||||
week_repr.append('<holiday>%sh%02d</holiday>' % to_hour(reduce(lambda x,y:x+y, [day['hours'] for day in week_hol.values()], 0)))
|
||||
week_repr.append('</total>')
|
||||
week_repr.append('</week>')
|
||||
if len(week_repr) > 30: # 30 = minimal length of week_repr
|
||||
week_xml.append('\n'.join(week_repr))
|
||||
|
||||
monday, n_monday = n_monday, n_monday + one_week
|
||||
user_xml.append(user_repr % '\n'.join(week_xml))
|
||||
|
||||
xml = '''<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<report>
|
||||
%s
|
||||
</report>
|
||||
''' % '\n'.join(user_xml)
|
||||
return self.post_process_xml_data(cr, uid, xml, context)
|
||||
|
||||
report_custom('report.hr.timesheet.allweeks', 'hr.employee', '', 'addons/hr/report/timesheet.xsl')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -1,241 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
|
||||
<xsl:import href="../../custom/corporate_defaults.xsl"/>
|
||||
<xsl:import href="../../base/report/rml_template.xsl"/>
|
||||
<xsl:variable name="page_format">a4_normal</xsl:variable>
|
||||
|
||||
<xsl:template name="stylesheet">
|
||||
<blockTableStyle id="week">
|
||||
<blockFont name="Helvetica-BoldOblique" size="12" start="0,0" stop="-1,0"/>
|
||||
<blockBackground colorName="grey" start="0,0" stop="-1,0"/>
|
||||
<blockTextColor colorName="red" start="-1,0" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="grey" start="-1,0" stop="-1,-1"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:call-template name="rml" />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="story">
|
||||
<xsl:apply-templates select="report/user"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="user">
|
||||
<para>
|
||||
<b>Name:</b>
|
||||
<i><xsl:value-of select="name" /></i>
|
||||
</para>
|
||||
<blockTable colWidths="4cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm" style="week">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Mon</td>
|
||||
<td>Tue</td>
|
||||
<td>Wed</td>
|
||||
<td>Thu</td>
|
||||
<td>Fri</td>
|
||||
<td>Sat</td>
|
||||
<td>Sun</td>
|
||||
<td>Tot</td>
|
||||
</tr>
|
||||
<xsl:for-each select="week">
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td>Week :</td>
|
||||
<td></td>
|
||||
<td>from <xsl:value-of select="weekstart" /> to <xsl:value-of select="weekend" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Theoretical workhours</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Monday/theoretical">
|
||||
<xsl:value-of select="Monday/theoretical" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Tuesday/theoretical">
|
||||
<xsl:value-of select="Tuesday/theoretical" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Wednesday/theoretical">
|
||||
<xsl:value-of select="Wednesday/theoretical" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Thursday/theoretical">
|
||||
<xsl:value-of select="Thursday/theoretical" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Friday/theoretical">
|
||||
<xsl:value-of select="Friday/theoretical" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Saturday/theoretical">
|
||||
<xsl:value-of select="Saturday/theoretical" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Sunday/theoretical">
|
||||
<xsl:value-of select="Sunday/theoretical" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="total/theoretical" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Workhours</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Monday/workhours">
|
||||
<xsl:value-of select="Monday/workhours" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Tuesday/workhours">
|
||||
<xsl:value-of select="Tuesday/workhours" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Wednesday/workhours">
|
||||
<xsl:value-of select="Wednesday/workhours" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Thursday/workhours">
|
||||
<xsl:value-of select="Thursday/workhours" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Friday/workhours">
|
||||
<xsl:value-of select="Friday/workhours" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Saturday/workhours">
|
||||
<xsl:value-of select="Saturday/workhours" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Sunday/workhours">
|
||||
<xsl:value-of select="Sunday/workhours" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="total/worked" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Holiday hours</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Monday/holidayhours">
|
||||
<xsl:value-of select="Monday/holidayhours" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Tuesday/holidayhours">
|
||||
<xsl:value-of select="Tuesday/holidayhours" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Wednesday/holidayhours">
|
||||
<xsl:value-of select="Wednesday/holidayhours" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Thursday/holidayhours">
|
||||
<xsl:value-of select="Thursday/holidayhours" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Friday/holidayhours">
|
||||
<xsl:value-of select="Friday/holidayhours" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Saturday/holidayhours">
|
||||
<xsl:value-of select="Saturday/holidayhours" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Sunday/holidayhours">
|
||||
<xsl:value-of select="Sunday/holidayhours" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="total/holiday" />
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</blockTable>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -52,7 +52,7 @@ class hr_holidays(osv.osv):
|
|||
_description = "Holidays"
|
||||
_columns = {
|
||||
'name' : fields.char('Description', required=True, readonly=True, size=64, states={'draft':[('readonly',False)]}),
|
||||
'state': fields.selection([('draft', 'draft'), ('confirm', 'Confirmed'), ('refuse', 'Refused'), ('validate', 'Validate'), ('cancel', 'Cancel')], 'State', readonly=True),
|
||||
'state': fields.selection([('draft', 'draft'), ('confirm', 'Confirmed'), ('refuse', 'Refused'), ('validate', 'Validate'), ('cancel', 'Cancel')], 'Status', readonly=True),
|
||||
'date_from' : fields.datetime('Vacation start day', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'date_to' : fields.datetime('Vacation end day',required=True,readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'holiday_status' : fields.many2one("hr.holidays.status", "Holiday's Status", required=True,readonly=True, states={'draft':[('readonly',False)]}),
|
||||
|
@ -176,6 +176,7 @@ class hr_holidays_status(osv.osv):
|
|||
_inherit = 'hr.holidays.status'
|
||||
_description = "Holidays Status"
|
||||
_columns = {
|
||||
'name' : fields.char('Holiday Status', size=64, required=True, translate=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Section'),
|
||||
'color_name' : fields.selection([('red', 'Red'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color of the status', required=True),
|
||||
}
|
||||
|
|
|
@ -6,10 +6,15 @@
|
|||
<record model="ir.ui.view" id="edit_holiday_inherit_new">
|
||||
<field name="name">hr.holidays.form.inherit</field>
|
||||
<field name="model">hr.holidays</field>
|
||||
<field name="inherit_id" ref="hr.edit_holiday"/>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" eval="False"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="holiday_status" position="after">
|
||||
<form string="Employee holidays">
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<field name="date_from" select="1"/>
|
||||
<field name="date_to" select="1"/>
|
||||
<newline/>
|
||||
<field name="holiday_status" select="1"/>
|
||||
<group col="12" colspan="2">
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow"/>
|
||||
<button string="Validate" name="validate" states="confirm" type="workflow"/>
|
||||
|
@ -25,6 +30,7 @@
|
|||
<field name="employee_id" select="1" />
|
||||
<newline />
|
||||
<field name="number_of_days" colspan="2"/>
|
||||
</form>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -32,12 +38,16 @@
|
|||
<record model="ir.ui.view" id="view_holiday">
|
||||
<field name="name">hr.holidays.tree</field>
|
||||
<field name="model">hr.holidays</field>
|
||||
<field name="inherit_id" ref="hr.view_holiday"/>
|
||||
<field name="inherit_id" eval="False"/>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="holiday_status" position="after">
|
||||
<tree string="Employee holidays">
|
||||
<field name="name"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="holiday_status"/>
|
||||
<field name="state"/>
|
||||
</field>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
@ -58,27 +68,37 @@
|
|||
<record model="ir.ui.view" id="edit_holiday_status_form">
|
||||
<field name="name">hr.holidays.status.form</field>
|
||||
<field name="model">hr.holidays.status</field>
|
||||
<field name="inherit_id" ref="hr.edit_holiday_status"/>
|
||||
<field name="inherit_id" eval="False"/>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="after">
|
||||
<form string="Define holiday status">
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<field name="color_name" select="2"/>
|
||||
<field name="section_id" select="1" />
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_holiday_status_tree">
|
||||
<field name="name">hr.holidays.status.tree</field>
|
||||
<field name="model">hr.holidays.status</field>
|
||||
<field name="inherit_id" ref="hr.view_holiday_status"/>
|
||||
<field name="inherit_id" eval="False"/>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="after">
|
||||
<tree string="Holiday status">
|
||||
<field name="name"/>
|
||||
<field name="color_name" />
|
||||
<field name="section_id" />
|
||||
</field>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="open_view_holiday_status" model="ir.actions.act_window">
|
||||
<field name="name">Holiday Status</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">hr.holidays.status</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="open_view_holiday_status" groups="base.group_admin" id="menu_open_view_holiday_status" parent="hr.menu_hr_configuration"/>
|
||||
|
||||
<!-- holidays per user -->
|
||||
<record model="ir.ui.view" id="view_holidays_per_user_form">
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('invoice_id','=',False),('to_invoice','!=',False)]</field>
|
||||
</record>
|
||||
<menuitem action="action_hr_analytic_timesheet_tree_invoiced" id="menu_hr_analytic_timesheet_tree_invoiced" parent="hr_timesheet_invoice.menu_hr_analytic_timesheet_tree"/>
|
||||
<menuitem action="action_hr_analytic_timesheet_tree_invoiced" id="menu_hr_analytic_timesheet_tree_invoiced" parent="menu_hr_analytic_timesheet_tree"/>
|
||||
|
||||
|
||||
|
||||
|
@ -124,7 +124,7 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('invoice_id','=',False),('to_invoice','!=',False),('user_id','=',uid)]</field>
|
||||
</record>
|
||||
<menuitem action="action_hr_analytic_timesheet_tree_invoiced_my" id="menu_hr_analytic_timesheet_tree_invoiced_my" parent="hr_timesheet_invoice.menu_hr_analytic_timesheet_tree_invoiced"/>
|
||||
<menuitem action="action_hr_analytic_timesheet_tree_invoiced_my" id="menu_hr_analytic_timesheet_tree_invoiced_my" parent="menu_hr_analytic_timesheet_tree"/>
|
||||
|
||||
|
||||
<record id="action_open_analytic_accounts" model="ir.actions.act_window">
|
||||
|
|
|
@ -222,8 +222,8 @@ class hr_timesheet_sheet(osv.osv):
|
|||
'new': [('readonly', False)]}
|
||||
),
|
||||
'attendances_ids' : one2many_mod2('hr.attendance', 'sheet_id', 'Attendances', readonly=True, states={'draft':[('readonly',False)],'new':[('readonly',False)]}),
|
||||
'state' : fields.selection([('new', 'New'),('draft','Draft'),('confirm','Confirmed'),('done','Done')], 'State', select=True, required=True, readonly=True),
|
||||
'state_attendance' : fields.function(_state_attendance, method=True, type='selection', selection=[('absent', 'Absent'), ('present', 'Present'),('none','No employee defined')], string='Current state'),
|
||||
'state' : fields.selection([('new', 'New'),('draft','Draft'),('confirm','Confirmed'),('done','Done')], 'Status', select=True, required=True, readonly=True),
|
||||
'state_attendance' : fields.function(_state_attendance, method=True, type='selection', selection=[('absent', 'Absent'), ('present', 'Present'),('none','No employee defined')], string='Current Status'),
|
||||
'total_attendance_day': fields.function(_total_day, method=True, string='Total Attendance'),
|
||||
'total_timesheet_day': fields.function(_total_day, method=True, string='Total Timesheet'),
|
||||
'total_difference_day': fields.function(_total_day, method=True, string='Difference'),
|
||||
|
|
|
@ -127,7 +127,7 @@ class idea_idea(osv.osv):
|
|||
'count_votes' : fields.function(_vote_count, method=True, string="Count of votes", type="integer"),
|
||||
'count_comments': fields.function(_comment_count, method=True, string="Count of comments", type="integer"),
|
||||
'category_id': fields.many2one('idea.category', 'Category', required=True ),
|
||||
'state': fields.selection([('draft','Draft'),('open','Opened'),('close','Accepted'),('cancel','Canceled')], 'State', readonly=True),
|
||||
'state': fields.selection([('draft','Draft'),('open','Opened'),('close','Accepted'),('cancel','Canceled')], 'Status', readonly=True),
|
||||
'stat_vote_ids': fields.one2many('idea.vote.stat', 'idea_id', 'Statistics', readonly=True),
|
||||
}
|
||||
|
||||
|
|
|
@ -332,7 +332,7 @@ class mrp_production(osv.osv):
|
|||
'product_lines': fields.one2many('mrp.production.product.line', 'production_id', 'Scheduled goods'),
|
||||
'workcenter_lines': fields.one2many('mrp.production.workcenter.line', 'production_id', 'Workcenters Utilisation'),
|
||||
|
||||
'state': fields.selection([('draft','Draft'),('picking_except', 'Packing Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Canceled'),('done','Done')],'State', readonly=True)
|
||||
'state': fields.selection([('draft','Draft'),('picking_except', 'Packing Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Canceled'),('done','Done')],'Status', readonly=True)
|
||||
}
|
||||
_defaults = {
|
||||
'priority': lambda *a: '1',
|
||||
|
@ -685,7 +685,7 @@ class mrp_procurement(osv.osv):
|
|||
'property_ids': fields.many2many('mrp.property', 'mrp_procurement_property_rel', 'procurement_id','property_id', 'Properties'),
|
||||
|
||||
'message': fields.char('Latest error', size=64),
|
||||
'state': fields.selection([('draft','Draft'),('confirmed','Confirmed'),('exception','Exception'),('running','Running'),('cancel','Cancel'),('done','Done'),('waiting','Waiting')], 'State')
|
||||
'state': fields.selection([('draft','Draft'),('confirmed','Confirmed'),('exception','Exception'),('running','Running'),('cancel','Cancel'),('done','Done'),('waiting','Waiting')], 'Status')
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
|
|
|
@ -62,7 +62,7 @@ class mrp_production_workcenter_line(osv.osv):
|
|||
return result
|
||||
|
||||
_columns = {
|
||||
'state': fields.selection([('draft','Draft'),('confirm', 'Confirm'),('cancel','Canceled'),('done','Done')],'State', readonly=True),
|
||||
'state': fields.selection([('draft','Draft'),('confirm', 'Confirm'),('cancel','Canceled'),('done','Done')],'Status', readonly=True),
|
||||
# 'date_start': fields.datetime('Start Date'),
|
||||
# 'date_finnished': fields.datetime('End Date'),
|
||||
# 'delay': fields.function(_calc_delay, method=True, string='Delay', help="This is delay between operation start and stop in this workcenter"),
|
||||
|
@ -127,7 +127,7 @@ class mrp_operations_operation_code(osv.osv):
|
|||
_columns={
|
||||
'name': fields.char('Operation Name',size=64, required=True),
|
||||
'code': fields.char('Code', size=16, required=True),
|
||||
'start_stop': fields.selection([('start','Start'),('stop','Stop'),('done','Done')], 'State', required=True),
|
||||
'start_stop': fields.selection([('start','Start'),('stop','Stop'),('done','Done')], 'Status', required=True),
|
||||
}
|
||||
mrp_operations_operation_code()
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ class project(osv.osv):
|
|||
'warn_footer': fields.text('Mail footer'),
|
||||
'notes': fields.text('Notes'),
|
||||
'timesheet_id': fields.many2one('hr.timesheet.group', 'Working hours'),
|
||||
'state': fields.selection([('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', required=True),
|
||||
'state': fields.selection([('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'Status', required=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
@ -230,7 +230,7 @@ class task(osv.osv):
|
|||
'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Importance'),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
'type': fields.many2one('project.task.type', 'Type'),
|
||||
'state': fields.selection([('draft', 'Draft'),('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State'),
|
||||
'state': fields.selection([('draft', 'Draft'),('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'Status'),
|
||||
'date_start': fields.datetime('Date'),
|
||||
'date_deadline': fields.datetime('Deadline'),
|
||||
'date_close': fields.datetime('Date Closed', readonly=True),
|
||||
|
|
|
@ -143,7 +143,7 @@ class purchase_order(osv.osv):
|
|||
|
||||
'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}, help="The pricelist sets the currency used for this purchase order. It also computes the supplier price for the selected products/quantities."),
|
||||
|
||||
'state': fields.selection([('draft', 'Request for Quotation'), ('wait', 'Waiting'), ('confirmed', 'Confirmed'), ('approved', 'Approved'),('except_picking', 'Shipping Exception'), ('except_invoice', 'Invoice Exception'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Order State', readonly=True, help="The state of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' state. Then the order has to be confirmed by the user, the state switch to 'Confirmed'. Then the supplier must confirm the order to change the state to 'Approved'. When the purchase order is paid and received, the state becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the state becomes in exception.", select=True),
|
||||
'state': fields.selection([('draft', 'Request for Quotation'), ('wait', 'Waiting'), ('confirmed', 'Confirmed'), ('approved', 'Approved'),('except_picking', 'Shipping Exception'), ('except_invoice', 'Invoice Exception'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Order Status', readonly=True, help="The state of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' state. Then the order has to be confirmed by the user, the state switch to 'Confirmed'. Then the supplier must confirm the order to change the state to 'Approved'. When the purchase order is paid and received, the state becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the state becomes in exception.", select=True),
|
||||
'order_line': fields.one2many('purchase.order.line', 'order_id', 'Order Lines', states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}),
|
||||
'validator' : fields.many2one('res.users', 'Validated by', readonly=True),
|
||||
'notes': fields.text('Notes'),
|
||||
|
|
|
@ -45,7 +45,7 @@ class report_account_analytic_planning(osv.osv):
|
|||
'stat_ids': fields.one2many('report_account_analytic.planning.stat', 'planning_id', 'Planning analysis', readonly=True),
|
||||
'stat_user_ids': fields.one2many('report_account_analytic.planning.stat.user', 'planning_id', 'Planning by user', readonly=True),
|
||||
'stat_account_ids': fields.one2many('report_account_analytic.planning.stat.account', 'planning_id', 'Planning by account', readonly=True),
|
||||
'state': fields.selection([('open','Open'),('done','Done')], 'State', required=True)
|
||||
'state': fields.selection([('open','Open'),('done','Done')], 'Status', required=True)
|
||||
}
|
||||
_defaults = {
|
||||
'name': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
|
|
|
@ -51,7 +51,7 @@ class report_crm_case_user(osv.osv):
|
|||
'amount_revenue_prob': fields.float('Est. Rev*Prob.', readonly=True),
|
||||
'nbr': fields.integer('# of Cases', readonly=True),
|
||||
'probability': fields.float('Avg. Probability', readonly=True),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
|
||||
'delay_close': fields.char('Delay to close', size=20, readonly=True),
|
||||
}
|
||||
_order = 'name desc, user_id, section_id'
|
||||
|
@ -89,7 +89,7 @@ class report_crm_case_categ(osv.osv):
|
|||
'amount_revenue_prob': fields.float('Est. Rev*Prob.', readonly=True),
|
||||
'nbr': fields.integer('# of Cases', readonly=True),
|
||||
'probability': fields.float('Avg. Probability', readonly=True),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
|
||||
'delay_close': fields.char('Delay Close', size=20, readonly=True),
|
||||
}
|
||||
_order = 'name desc, categ_id, section_id'
|
||||
|
|
|
@ -40,7 +40,7 @@ class report_task_user_pipeline_open (osv.osv):
|
|||
'task_hrs': fields.float('Task Hours', readonly=True),
|
||||
'task_progress': fields.float('Task Progress', readonly=True),
|
||||
'company_id' : fields.many2one('res.company', 'Company'),
|
||||
'task_state': fields.selection([('draft', 'Draft'),('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done'),('no','No Task')], 'State', readonly=True),
|
||||
'task_state': fields.selection([('draft', 'Draft'),('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done'),('no','No Task')], 'Status', readonly=True),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
|
|
|
@ -655,7 +655,7 @@ class sale_order_line(osv.osv):
|
|||
'number_packages': fields.function(_number_packages, method=True, type='integer', string='Number packages'),
|
||||
'notes': fields.text('Notes'),
|
||||
'th_weight' : fields.float('Weight'),
|
||||
'state': fields.selection([('draft','Draft'),('confirmed','Confirmed'),('done','Done'),('cancel','Canceled')], 'State', required=True, readonly=True),
|
||||
'state': fields.selection([('draft','Draft'),('confirmed','Confirmed'),('done','Done'),('cancel','Canceled')], 'Status', required=True, readonly=True),
|
||||
}
|
||||
_order = 'sequence, id'
|
||||
_defaults = {
|
||||
|
|
|
@ -107,7 +107,7 @@ class scrum_sprint(osv.osv):
|
|||
'progress': fields.function(_calc_progress, method=True, string='Progress (0-100)'),
|
||||
'effective_hours': fields.function(_calc_effective, method=True, string='Effective hours'),
|
||||
'planned_hours': fields.function(_calc_planned, method=True, string='Planned Hours'),
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'),('done','Done')], 'State', required=True),
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'),('done','Done')], 'Status', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
|
@ -175,7 +175,7 @@ class scrum_product_backlog(osv.osv):
|
|||
'sequence' : fields.integer('Sequence'),
|
||||
'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Priority'),
|
||||
'tasks_id': fields.one2many('scrum.task', 'product_backlog_id', 'Tasks Details'),
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'),('done','Done')], 'State', required=True),
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'),('done','Done')], 'Status', required=True),
|
||||
'progress': fields.function(_calc_progress, method=True, string='Progress (0-100)'),
|
||||
'effective_hours': fields.function(_calc_effective, method=True, string='Effective hours'),
|
||||
'planned_hours': fields.function(_calc_planned, method=True, string='Planned Hours')
|
||||
|
|
|
@ -392,7 +392,7 @@ class stock_picking(osv.osv):
|
|||
('assigned','Assigned'),
|
||||
('done','Done'),
|
||||
('cancel','Cancel'),
|
||||
], 'State', readonly=True, select=True),
|
||||
], 'Status', readonly=True, select=True),
|
||||
'date':fields.datetime('Date create'),
|
||||
|
||||
'move_lines': fields.one2many('stock.move', 'picking_id', 'Move lines'),
|
||||
|
@ -402,7 +402,7 @@ class stock_picking(osv.osv):
|
|||
'invoice_state':fields.selection([
|
||||
("invoiced","Invoiced"),
|
||||
("2binvoiced","To be invoiced"),
|
||||
("none","Not from Packing")], "Invoice state",
|
||||
("none","Not from Packing")], "Invoice Status",
|
||||
select=True),
|
||||
}
|
||||
_defaults = {
|
||||
|
@ -801,7 +801,7 @@ class stock_move(osv.osv):
|
|||
|
||||
'note': fields.text('Notes'),
|
||||
|
||||
'state': fields.selection([('draft','Draft'),('waiting','Waiting'),('confirmed','Confirmed'),('assigned','Assigned'),('done','Done'),('cancel','cancel')], 'State', readonly=True, select=True),
|
||||
'state': fields.selection([('draft','Draft'),('waiting','Waiting'),('confirmed','Confirmed'),('assigned','Assigned'),('done','Done'),('cancel','cancel')], 'Status', readonly=True, select=True),
|
||||
'price_unit': fields.float('Unit Price',
|
||||
digits=(16, int(config['price_accuracy']))),
|
||||
}
|
||||
|
@ -1041,7 +1041,7 @@ class stock_inventory(osv.osv):
|
|||
'date_done': fields.datetime('Date done'),
|
||||
'inventory_line_id': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'move_ids': fields.many2many('stock.move', 'stock_inventory_move_rel', 'inventory_id', 'move_id', 'Created Moves'),
|
||||
'state': fields.selection( (('draft','Draft'),('done','Done')), 'State', readonly=True),
|
||||
'state': fields.selection( (('draft','Draft'),('done','Done')), 'Status', readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
|
|
|
@ -79,7 +79,7 @@ class subscription_subscription(osv.osv):
|
|||
'interval_type': fields.selection([('days', 'Days'), ('weeks', 'Weeks'), ('months', 'Months')], 'Interval Unit'),
|
||||
'exec_init': fields.integer('Number of documents'),
|
||||
'date_init': fields.datetime('First Date'),
|
||||
'state': fields.selection([('draft','Draft'),('running','Running'),('done','Done')], 'State'),
|
||||
'state': fields.selection([('draft','Draft'),('running','Running'),('done','Done')], 'Status'),
|
||||
'doc_source': fields.reference('Source Document', required=True, selection=_get_document_types, size=128),
|
||||
'doc_lines': fields.one2many('subscription.subscription.history', 'subscription_id', 'Documents created', readonly=True),
|
||||
'cron_id': fields.many2one('ir.cron', 'Cron Job')
|
||||
|
|
Loading…
Reference in New Issue