← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 783915] [NEW] Entries analysis: current year and period filters doesn't work in

 

Public bug reported:

Observed in trunk and v6

To reproduce: create two account moves, one in the current period and
one in a previous one. Go to Account/Statistics/entries analysis and try
the "current year" and "current period" buttons. There is no effect.

This has to do with stuff going on in 
http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/account/report/account_entries_report_view.xml#L77

pressing the "this period" button sets che context, whereas in

http://bazaar.launchpad.net/~openerp/openobject-
addons/trunk/view/head:/account/report/account_entries_report.py#L83

not the context, but the domain search args are used.

Changing the xml to set the args instead of the context quickly fixes that, i.e. substituting line 
http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/account/report/account_entries_report_view.xml#L77
with 
domain="[('period_id','=','current_period')]"

Still, before proposing a merge, can someone come up with something
cleaner that writing strange stuff into "args" and then deleting it in
the 'search' method?

Thanks a lot

** Affects: openobject-addons
     Importance: Undecided
         Status: New


** Tags: account

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/783915

Title:
  Entries analysis: current year and period filters doesn't work in

Status in OpenERP Modules (addons):
  New

Bug description:
  Observed in trunk and v6

  To reproduce: create two account moves, one in the current period and
  one in a previous one. Go to Account/Statistics/entries analysis and
  try the "current year" and "current period" buttons. There is no
  effect.

  This has to do with stuff going on in 
  http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/account/report/account_entries_report_view.xml#L77

  pressing the "this period" button sets che context, whereas in

  http://bazaar.launchpad.net/~openerp/openobject-
  addons/trunk/view/head:/account/report/account_entries_report.py#L83

  not the context, but the domain search args are used.

  Changing the xml to set the args instead of the context quickly fixes that, i.e. substituting line 
  http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/account/report/account_entries_report_view.xml#L77
  with 
  domain="[('period_id','=','current_period')]"

  Still, before proposing a merge, can someone come up with something
  cleaner that writing strange stuff into "args" and then deleting it in
  the 'search' method?

  Thanks a lot


Follow ups

References