Thomas Auer has proposed merging lp:hr-timesheet/6.1 into lp:hr-timesheet. Commit message: I want to develop an interface to enable project time tracking through voice recognition
Requested reviews: Thomas Auer (thomas-auer) For more details, see: https://code.launchpad.net/~hr-core-editors/hr-timesheet/6.1/+merge/213140 Development of an interface for time recording using Phyton Speech -- https://code.launchpad.net/~hr-core-editors/hr-timesheet/6.1/+merge/213140 Your team OpenERP Community Reviewer/Maintainer is subscribed to branch lp:hr-timesheet.
=== modified file 'hr_timesheet_reminder/company.py' --- hr_timesheet_reminder/company.py 2012-12-13 17:01:55 +0000 +++ hr_timesheet_reminder/company.py 2014-03-27 20:13:39 +0000 @@ -35,6 +35,7 @@ employee_obj = self.pool.get('hr.employee') +<<<<<<< TREE for company in self.browse(cr, uid, ids, context=context): employee_ids = employee_obj.search( cr, uid, @@ -45,6 +46,14 @@ if not employee_ids: continue +======= + for company in self.browse(cr, uid, ids, context=context): + employee_ids = employee_obj.search( + cr, uid, + [('company_id', '=', company.id), + ('active', '=', True)], + context=context) +>>>>>>> MERGE-SOURCE employees = employee_obj.browse(cr, uid, employee_ids, context=context) #periods === added directory 'hr_timesheet_sheet_approved_by' === added file 'hr_timesheet_sheet_approved_by/__init__.py' --- hr_timesheet_sheet_approved_by/__init__.py 1970-01-01 00:00:00 +0000 +++ hr_timesheet_sheet_approved_by/__init__.py 2014-03-27 20:13:39 +0000 @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 Therp BV (<http://therp.nl>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## +import model === added file 'hr_timesheet_sheet_approved_by/__openerp__.py' --- hr_timesheet_sheet_approved_by/__openerp__.py 1970-01-01 00:00:00 +0000 +++ hr_timesheet_sheet_approved_by/__openerp__.py 2014-03-27 20:13:39 +0000 @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 Therp BV (<http://therp.nl>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## +{ + "name" : "See how approved a timesheet", + "version" : "1.0", + "depends" : [ + 'hr_timesheet_sheet', + ], + "author" : "Therp BV", + "complexity": "normal", + "description": """This addons saves the user who approved a timesheet.""", + "category" : "Human Resources", + "data" : [ + 'view/hr_timesheet_sheet.xml', + ], + "js": [ + ], + "css": [ + ], + "auto_install": False, + "installable": True, + "external_dependencies" : { + 'python' : [], + }, +} === added directory 'hr_timesheet_sheet_approved_by/model' === added file 'hr_timesheet_sheet_approved_by/model/__init__.py' --- hr_timesheet_sheet_approved_by/model/__init__.py 1970-01-01 00:00:00 +0000 +++ hr_timesheet_sheet_approved_by/model/__init__.py 2014-03-27 20:13:39 +0000 @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 Therp BV (<http://therp.nl>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## +import hr_timesheet_sheet === added file 'hr_timesheet_sheet_approved_by/model/hr_timesheet_sheet.py' --- hr_timesheet_sheet_approved_by/model/hr_timesheet_sheet.py 1970-01-01 00:00:00 +0000 +++ hr_timesheet_sheet_approved_by/model/hr_timesheet_sheet.py 2014-03-27 20:13:39 +0000 @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 Therp BV (<http://therp.nl>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## +from openerp.osv.orm import Model +from openerp.osv import fields + + +class hr_timesheet_sheet(Model): + _inherit = 'hr_timesheet_sheet.sheet' + + _columns = { + 'done_uid': fields.many2one('res.users', string='Approved by', + readonly=True), + } + + def write(self, cr, uid, ids, vals, context=None): + + if 'state' in vals: + if vals['state'] == 'done': + vals['done_uid'] = uid + else: + vals['done_uid'] = False + + return super(hr_timesheet_sheet, self).write(cr, uid, ids, vals, + context=context) === added directory 'hr_timesheet_sheet_approved_by/view' === added file 'hr_timesheet_sheet_approved_by/view/hr_timesheet_sheet.xml' --- hr_timesheet_sheet_approved_by/view/hr_timesheet_sheet.xml 1970-01-01 00:00:00 +0000 +++ hr_timesheet_sheet_approved_by/view/hr_timesheet_sheet.xml 2014-03-27 20:13:39 +0000 @@ -0,0 +1,17 @@ +<openerp> + <data> + <record id="hr_timesheet_sheet_form" model="ir.ui.view"> + <field name="name">hr.timesheet.sheet.form</field> + <field name="model">hr_timesheet_sheet.sheet</field> + <field name="type">form</field> + <field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form" /> + <field name="arch" type="xml"> + <data> + <field name="state" position="after"> + <field name="done_uid" attrs="{'invisible': [('state','!=','done')]}" /> + </field> + </data> + </field> + </record> + </data> +</openerp>
-- Mailing list: https://launchpad.net/~openerp-community-reviewer Post to : openerp-community-reviewer@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-community-reviewer More help : https://help.launchpad.net/ListHelp