Commit 680d5e47 authored by Fabien Morin's avatar Fabien Morin

- Now PaySheetModelLine inherite from TradeModelLine.

- Add newCellContent method to be able to use Pay Sheet Model Cell in Pay Sheet Model Line
- add Reference propertysheet
- add edited_property_list


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27414 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 980ce468
############################################################################## ##############################################################################
# #
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2007-2009 Nexedi SA and Contributors. All Rights Reserved.
# Fabien Morin <fabien@nexedi.com> # Fabien Morin <fabien@nexedi.com>
# #
# WARNING: This program as such is intended to be used by professional # WARNING: This program as such is intended to be used by professional
...@@ -28,18 +28,17 @@ ...@@ -28,18 +28,17 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.Predicate import Predicate from Products.ERP5.Document.TradeModelLine import TradeModelLine
from Products.ERP5.Document.PaySheetLine import PaySheetLine
from zLOG import LOG class PaySheetModelLine(TradeModelLine):
class PaySheetModelLine(PaySheetLine, Predicate):
""" """
A PaySheetModelLine object allows to implement lines in A PaySheetModelLine object allows to implement lines in
PaySheetModel. PaySheetModel.
A PaySheetModelLine contain all parameters witch make it possible to A PaySheetModelLine contain all parameters witch make it possible to
calculate a service contribution. calculate a service contribution.
""" """
edited_property_list = ['price', 'causality','resource','quantity',
'title', 'base_application_list', 'base_contribution_list']
meta_type = 'ERP5 Pay Sheet Model Line' meta_type = 'ERP5 Pay Sheet Model Line'
portal_type = 'Pay Sheet Model Line' portal_type = 'Pay Sheet Model Line'
...@@ -67,4 +66,14 @@ class PaySheetModelLine(PaySheetLine, Predicate): ...@@ -67,4 +66,14 @@ class PaySheetModelLine(PaySheetLine, Predicate):
, PropertySheet.MappedValue , PropertySheet.MappedValue
, PropertySheet.PaySheetModelLine , PropertySheet.PaySheetModelLine
, PropertySheet.Predicate , PropertySheet.Predicate
, PropertySheet.Reference
) )
security.declareProtected( Permissions.ModifyPortalContent,
'newCellContent' )
def newCellContent(self, id, portal_type='Pay Sheet Model Cell', **kw):
"""
This method can be overriden
"""
self.invokeFactory(type_name=portal_type,id=id)
return self.get(id)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment