[Erp5-dev] TaskConstraint proposition
Romain Courteaud
romain at nexedi.com
Mon May 19 11:08:39 CEST 2008
* Mikolaj Antoszkiewicz [2008-05-16 19:18:47 +0200]:
> Hi All,
Hi Mikolaj,
> Since the Order_validateData script for task_workflow has been removed,
> I propose a proper TaskConstraint replacement to verify task consistency
> before confirmation, so that Task Report could be generated.
Thanks for your contribution.
> TaskLineCategoryExistence constraint class handles the more complicated
> check for existence of specific category ('reference' in our case) on
> all contained Task Lines.
I don't understand why such Constraint class is required.
It seems easier to configure a PropertySheet on the Task Line Level
which uses CategoryExistence constraint, isn't it?
> Index: TaskReport_notifyAssignee.xml
> ===================================================================
> --- TaskReport_notifyAssignee.xml (revision 20916)
> +++ TaskReport_notifyAssignee.xml (working copy)
> @@ -65,15 +65,24 @@
> </item>
> <item>
> <key> <string>_body</string> </key>
> - <value> <string>packing_list = state_change[\'object\']\n
> + <value> <string>task_report = state_change[\'object\']\n
> +from Products.ERP5Type.Message import Message\n
> +T_ = lambda msg: Message(\'ui\', msg)\n
This T_ variable does not follow the ERP5 convention.
Can you please use N_ variable instead.
> Index: TaskReport_copyOrderPropertiesAndNotifyAssignee.xml
> ===================================================================
As your modifying this script, I think it could also be a good idea to
improve his name, by changing it to something like:
TaskReport_copyOrderPropertyAndNotifyAssignee or
TaskReport_copyOrderPropertyListAndNotifyAssignee.
Regards,
Romain
More information about the Erp5-dev
mailing list