Add contracts to Employees. See the Products.plonehrm package.
History of plonehrm.contracts
We should start sending the new notifications for contract ending after
1 februari 2015, if fired they should receive the letter before 31 december.
Report deadline for reporting when a notification letter must be sent.
Do not notify about end of contract when there is already a
correspondence about it.
Use must_check_end_fixed_contract helper function before checking.
Add checker for end of fixed contract. A month before the end, you
must send a notification letter. We warn a month before that date
and again a week before that date if no correspondence has been
added. Note that if a new contract has been added, the expiry date
is automatically later, so the checker will not kick in, which is
Make start date field of contracts and letters required.
In my copy of the database there are 11 contracts and 4 letters
without a start date, out of a bit over 2000.
Add methods getContractIsFixedDuration, getContractDuration and
getContractExpirydate to get these fields from the contract
belonging to a letter.
Do not use the isFixedDuration, duration or expirydate fields for
change letters. Change letters are supposed to automatically end
when their contract ends or when a new change letter is made. We
explicitly return the defaults.
Register ‘edit’ action for Contracts, but keep it invisible. When a
validation error occurs, we can then still be redirected to the edit
form without getting ‘ValueError: No edit action found’.
Added post validation for contracts, especially for expiry and start
Added expirydate field to allow explicitly setting an expiry date.
Added z3c.autoinclude.plugin entry point for plone.
Fixed subscriber + added logging. [vincent]
Merge 3.3.1 and 3.4. [vincent]
Bugfix in get_worklocation that was not working for some
Fixed a bug in trial period checker + added tests for the
Updated notifications. [vincent]
bugfix in contract object: with copied worklocations, the
getPercentage() method was raising an error as it was impossible to
cast into float objects. [vincent]
Bugfix in notifications/events/TrialPeriodEndingEvent. It was still
using the ‘@@contracts’ view that has been deleted in previous
Moved browser package to Products.plonehrm. [vincent]
Updated checkers so they also work when the context is not the
added overflow for contract widget/spread table. [vincent]
bugfix in test. [vincent]
Updated tool to inherit from template_tool from plonehrm. [vincent]
Added message in viewlet when terminating contract to explain that
changes can not be undone. [vincent]
hidden sign buttons when user do not have the ‘plonehrm: sign
documents’ permission. [vincent]
Various CSS changes. [laurens]
added custom_filter function in content/tool.py to allow easy
patching for external products. [vincent]
bugfix in contract.getPercentage: if no value has been given to
HoursPerWeek, we obtained a TypeError. [vincent]
updated contract_popup to use JQuery. [vincent]
updated contract_history and added some hints on the buttons. [vincent]
updated schema to have a better organizaton in contract edit
updated Contract so it is a subclass of PloneHRMDocument. [vincent]
Added ‘Notified persons’ to notifications recipients. [vincent]
bugfix: the viewlet did not show the correct date for the start of
Changed translation of ‘Wage’ into ‘Salaris’. [vincent]
The viewlet now displays the current contract or the incoming one if
no current one if found. [vincent]
removed the no-wrap on cell showing end employment reason. [vincent]
bugfix: if user does not fill value in hours spread, it’s
considered as zero. [vincent]
allow contract with 0h/0days. [vincent]
added start date in the viewlet. [vincent]
contract viewlet does not display the ‘Add contract’ button when the
employee has a contract without fixed duration. [vincent]
updated viewlet so it does not display end date for contracts
without fixed duration. [vincent]
the contract widget now asks for a duration greater than 0 if
‘isFixedDuration’ has been set. [vincent]
Added isFixedDuration to contracts schema, so we can define
contracts without duration. [vincent]
bugfix: in base_contract, the contract adapter was adapting
‘self.context’ instead of parent, which causes errors when creating
JobPerformance interview. [vincent]
refactoring to use the contractAdapter. [vincent]
all users can now spread the hours like Arbo managers. [vincent]
the contract viewlet now displays the way hours are spreaded in the
current contract. [vincent]
hours spreading now allows comma when typing float numbers, not only
automatic spreading of hours do not anymore round to quarter of
hours, but only to two decimals. [vincent]
changed date in the contract settings so we can ahve an employee who
started in 1920. [vincent]
added a ‘has_hour_spread’ property to Contract objects. This should
always be checked before accessing the ‘hour_spread’ object of a
contract. If a manager accesses a contract created by a normal user,
it will create an empty hour spread property, which will be used to
compute absence length. [vincent]
bugfix: display of hours/week for ARBO managers did not work
typo fixing. [vincent]
numbers of hours and number of days per week can be floats. [vincent]
bugfix: updated translations in notification + used
employee.officialName instead of employee.Title. [vincent]
Added new notification sent the day after the employee’s last
contract expiration date. [vincent]
Added new mail notification sent when a trial period is close to
Updated notification template when a contract is close to expire. [vincent]
The viewlet is now guarded by the ‘plonehrm: view contracts viewlet’
permission. The several buttons are guarded by ‘plonehrm: manage
contracts’. The two add buttons are also guarded by ‘plonehrm: Add
bugfix release as the previous one’s egg was unusable [vincent]
Updated notifications of contract expiration to make a link to
create a new Letter or a new Contract depending on the settings of
the worklocation. [vincent]
Updated viewlet so it displays the end date for the last ending
contract instead of the current contract [vincent]
Added the possibility for a Letter to have a duration, so it can be
used to extend a contract. [vincent]
Added title attribute on the image used to open the contract/letter
pop-up so it displays the type of the object and its title. [vincent]
Updated notification for contract expiration so it does not take
into account current contract, but the one that ends the last. [vincent]
Updated method to compute contract expiration date. [vincent]
Hidden Title from edit form and hidden edit tab in contract view. [vincent]
added link to delete contracts in the viewlet and merged ‘Start date’
and ‘Expiration date’ columns. [vincent]
bugfix: on IE, when selecting ‘hour spread mode’, the table to set
hour spread did not work. [vincent]
Changed display in the viewlet to distinct contracts and letters. [vincent]
Corrected bugs in contract viewlet for Arbo manager. The KSS
validation of the form now checks values/total amount of time and
the way the viewlet is displayed by default is correct. [vincent]
Display number of hours in contract viewlet. [vincent]
Changed next release number (bug fix for deploiment). [vincent]
Fixed some typo’s in dutch translation. [mirella]
Added class to document type to th and to the last td. [mirella]
Updated viewlet to allow Arbo managers to spread hours more
Fixed error where change letters did not get their template applied.
When notifing that a new contract needs to be created, use the new
checklist API, with link_url and date.
Avoid error during kss refreshing when ending the employment.
updated viewlet to display more usefull information. [vincent]
Added a form to end employment in contract viewlet. [vincent]
Updated contracts viewlet to update/hide status message when
performing actions. [vincent]
Updated translations [jladage]
Now the default date when adding a contract is end date of the
previous contract plus one day. [mark+vincent]
Contracts and letter now use ‘Template’ objects as templates and do
not take into account simple pages. When creating a contract, only
Template for which the type is set to contract appears. The same
principle is aplied to letter. [vincent]
We take the title of the chosen template usually when creating a
contract or change letter, but now we allow to override this again
by specifically filling in a title.
Added KSS in the viewlet. Now, it is possible to add contracts and
letters form the viewlet. It is also possible to set a start date for
the employee from this viewlet. A new pop-up has been created to
display the contract. [vincent]
Updated translations [jladage]
Fixed error when removing contracts as this triggered a wrong kss
Catch AttributeErrors and KeyErrors thrown by brain.getObject().
Removed the setting of the viewlets in the plonehrm_properties to
the setuphandlers in Products.plonehrm, where we only set the order
Fixed error when substituting with a template that is not in the
first portal_contracts tool. [maurits]
Fixed error where the default value of days per week was a string
instead of an integer.
Added expiry_date method to Contract. [maurits]
Add field to store the number of day per week the employee
works. [mike + mark]
Added a listTemplates method to the ContractTool, which lists the
templates in this tool. Optionally this lists the templates from a
higher level portal_contracts tool as well. This is done by trying
to call getUseHigherLevelTool on the current tool. This method
is not available by default, but can be implemented by third party
products. Default is False. If you always want this to be True,
add a python script getUseHigherLevelTool in the
portal_skins/custom folder that just returns True.
The ContractTool is no longer a unique object, which means you can
add this tool for example inside a WorkLocation (from the ZMI or
with some custom python code) so you can have contract templates
specific for this WorkLocation. [maurits]
ContractTool: really make sure the tool is not indexed.
The contract’s title does not anymore appear in the contract
view. This is done in order to simplify contracts
Moved the template field of Contracts to the top of the schema.
Moved the setTemplate method into a new event handler that is called
when the Contract (or Letter) is initialized. And refactored the
Made the title field of Contracts and Letters invisible on the edit
form. Instead we take the title of the chosen template and append
1, 2, 3, etc. [maurits+vincent]
Added a link from the contract page to the employee.
cut and pasted the default methods from letter.py to contract.py
in content, and the base_contracts method.[maurits+mike]
When creating a Letter, use the hours and employmentType from the
current contract. [maurits+mike]
Added string property ‘currency’, with default value ‘€’. This
is put in the contract viewlet before the wage. [maurits]
Override Contract.getWage() so it returns the wage with a comma
instead of a dot depending on the default language of the portal.
Currently we do this only for Dutch, German and French, as we know
those languages want a comma here. There must be some other way.
Add remove icon (and link) to delete contracts and letters in the
viewlet itself. [vincent + mark]
Allow using a comma in the wage. Added a isCurrency validator for
that (mostly taken from isDecimal). [maurits]
Removed .mo files from locales. This means those translations will
not be visible in the old Plone 3.0. [maurits]
Use collective.autopermission to register permissions.
Set end-of-line style as native and set svn:ignore. [maurits]
Do not do the hrm notification checks when the checks have been
switched off in our control panel. [maurits]
Using hrm_properties to get the notification warning period.
Using group icon for control panel. [maurits]
Using new function get_employees_for_checking to get on ly the
active Employees. [maurits]