0001-use-misc.compute-instead-of-kflowStatusItem.compute.patch
extra/modules/clicrdv.py | ||
---|---|---|
11 | 11 |
import vobject |
12 | 12 | |
13 | 13 |
from qommon import get_cfg |
14 |
from qommon.misc import format_time |
|
14 |
from qommon.misc import format_time, compute
|
|
15 | 15 |
from qommon.form import * |
16 | 16 | |
17 | 17 |
from wcs.data_sources import register_data_source_function |
... | ... | |
243 | 243 |
def perform(self, formdata): |
244 | 244 |
args = {} |
245 | 245 |
for parameter in self.get_parameters(): |
246 |
args[parameter] = self.compute(getattr(self, parameter))
|
|
246 |
args[parameter] = compute(getattr(self, parameter)) |
|
247 | 247 |
if not args.get(parameter): |
248 | 248 |
del args[parameter] |
249 | 249 |
message = {'appointment': |
extra/modules/payments.py | ||
---|---|---|
25 | 25 |
from qommon.storage import StorableObject |
26 | 26 |
from qommon.form import htmltext, StringWidget, TextWidget, SingleSelectWidget, \ |
27 | 27 |
WidgetDict |
28 |
from qommon.misc import simplify |
|
28 |
from qommon.misc import simplify, compute
|
|
29 | 29 | |
30 | 30 |
from wcs.formdef import FormDef |
31 | 31 |
from wcs.formdata import Evolution |
... | ... | |
273 | 273 |
invoice.formdata_id = formdata.id |
274 | 274 |
invoice.next_status = self.next_status |
275 | 275 |
if self.subject: |
276 |
invoice.subject = template_on_formdata(formdata, self.compute(self.subject))
|
|
276 |
invoice.subject = template_on_formdata(formdata, compute(self.subject)) |
|
277 | 277 |
else: |
278 | 278 |
invoice.subject = _('%(form_name)s #%(formdata_id)s') % { |
279 | 279 |
'form_name': formdata.formdef.name, |
280 | 280 |
'formdata_id': formdata.id } |
281 |
invoice.details = template_on_formdata(formdata, self.compute(self.details))
|
|
282 |
invoice.amount = Decimal(self.compute(self.amount))
|
|
281 |
invoice.details = template_on_formdata(formdata, compute(self.details)) |
|
282 |
invoice.amount = Decimal(compute(self.amount)) |
|
283 | 283 |
invoice.date = dt.now() |
284 | 284 |
invoice.request_kwargs = {} |
285 | 285 |
if self.request_kwargs: |
286 |
- |