openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #27418
[Bug 1291072] [NEW] [7] weekday doest work in xml filter
Public bug reported:
Sys: Ubuntu 12.04 server. Oerp 7. Addons, server, and web about 1 week
ago
I want to make a last week filter for Sales Orders, or Invoices, or
other models, but I can't because weekday keyword argument is not
working in relativedelta.
I mean I add the following filter <filter string="Last Week"
name="LastWeek" icon="terp-go-month"
domain="[('date_order','>=',(context_today()+relativedelta(weeks=-1,
weekday=0)).strftime('%Y-%m-%d')),('date_order','<=',(context_today()+relativedelta(weeks=-1,
weekday=4)).strftime('%Y-%m-%d'))]"/>
I tried first with weekday=MO and weekday=FR but I had no success,
than I switched to number, but the same result.
See also: http://help.openerp.com/question/44899/how-filter-last-week/
Thanks
TArpi
** Affects: openobject-addons
Importance: Undecided
Status: New
** Tags: filter relativedelta weekday
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1291072
Title:
[7] weekday doest work in xml filter
Status in OpenERP Addons (modules):
New
Bug description:
Sys: Ubuntu 12.04 server. Oerp 7. Addons, server, and web about 1 week
ago
I want to make a last week filter for Sales Orders, or Invoices, or
other models, but I can't because weekday keyword argument is not
working in relativedelta.
I mean I add the following filter <filter string="Last Week"
name="LastWeek" icon="terp-go-month"
domain="[('date_order','>=',(context_today()+relativedelta(weeks=-1,
weekday=0)).strftime('%Y-%m-%d')),('date_order','<=',(context_today()+relativedelta(weeks=-1,
weekday=4)).strftime('%Y-%m-%d'))]"/>
I tried first with weekday=MO and weekday=FR but I had no success,
than I switched to number, but the same result.
See also: http://help.openerp.com/question/44899/how-filter-last-
week/
Thanks
TArpi
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1291072/+subscriptions
Follow ups
References