Merge lp:~vauxoo/addons-vauxoo/7.0-amf_search-dev-saul into lp:addons-vauxoo/7.0

Proposed by Saul Gonzalez
Status: Merged
Merged at revision: 874
Proposed branch: lp:~vauxoo/addons-vauxoo/7.0-amf_search-dev-saul
Merge into: lp:addons-vauxoo/7.0
Diff against target: 73 lines (+33/-9)
2 files modified
account_move_folio/model/account_move_folio.py (+9/-9)
account_move_folio/view/view.xml (+24/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/7.0-amf_search-dev-saul
Reviewer Review Type Date Requested Status
hbto [Vauxoo] http://www.vauxoo.com Approve
Review via email: mp+191839@code.launchpad.net

Description of the change

* Crear una vista search al modulo account.move.folio (AMF)
La vista de permitir:
-- Filtrar los AMF cuyo move_id _no_ esté establecido, [DONE]
-- Filtrar los AMF cuyo move_id _si_esté establecido, [DONE]
-- Filtar los AMF cuyo move_state == 'posted' [DONE]
-- Filtar los AMF cuyo move_state == 'draft' [DONE]
-- Filtar los AMF cuyo move_state _no_ esté establecido [DONE]
-- Filtar los AMF cuyo period_state == 'posted' [DONE]
-- Filtar los AMF cuyo period_state == 'draft' [DONE]
-- Filtar los AMF cuyo period_state _no_ esté establecido [DONE]

-- Agrupar por:
++ company_id, [DONE]
++ journal_id, [DONE]
++ move_state [DONE]
++ period_state [DONE]

To post a comment you must log in.
Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_move_folio/model/account_move_folio.py'
2--- account_move_folio/model/account_move_folio.py 2013-10-15 22:05:10 +0000
3+++ account_move_folio/model/account_move_folio.py 2013-10-18 16:53:50 +0000
4@@ -6,18 +6,18 @@
5 _order = 'company_id, journal_id, name'
6 _description = "Records of Folios in Journal Entries"
7 _columns = {
8- 'name':fields.char('Folio', 256, help='Folio Number', required = True),
9- 'move_id':fields.many2one('account.move', 'Journal Entry', help='Journal Entry'),
10- 'journal_id':fields.many2one('account.journal', 'Journal', help='Entry Journal'),
11- 'period_id':fields.many2one('account.period', 'Period', help='Entry Period'),
12- 'date':fields.date('Date', help='Entry Date'),
13- 'company_id':fields.many2one('res.company', 'Company', help='Entry Company'),
14+ 'name':fields.char('Folio', 256, help='Folio Number', required = True),
15+ 'move_id':fields.many2one('account.move', 'Journal Entry', help='Journal Entry'),
16+ 'journal_id':fields.many2one('account.journal', 'Journal', help='Entry Journal'),
17+ 'period_id':fields.many2one('account.period', 'Period', help='Entry Period'),
18+ 'date':fields.date('Date', help='Entry Date'),
19+ 'company_id':fields.many2one('res.company', 'Company', help='Entry Company'),
20 'move_state':fields.related('move_id','state', type='selection',
21 selection=[('draft','Unposted'), ('posted','Posted')], store=True,
22- string='Entry State', help='Entry State'),
23+ string='Entry State', help='Entry State'),
24 'period_state':fields.related('period_id','state', type='selection',
25 selection=[('draft','Open'), ('done','Closed')], store=True,
26- string='Period State', help='Period State'),
27+ string='Period State', help='Period State'),
28 }
29
30 _defaults = {
31@@ -59,7 +59,7 @@
32 folio_id = folio_obj.create(cr, uid, values,context=context)
33 move.write({'folio_id':folio_id},context=context)
34 return True
35-
36+
37 def post(self, cr, uid, ids, context=None):
38 context = context or {}
39 super(account_move, self).post(cr, uid, ids, context=context)
40
41=== modified file 'account_move_folio/view/view.xml'
42--- account_move_folio/view/view.xml 2013-10-14 01:22:27 +0000
43+++ account_move_folio/view/view.xml 2013-10-18 16:53:50 +0000
44@@ -59,5 +59,29 @@
45 </tree>
46 </field>
47 </record>
48+ <record model="ir.ui.view" id="account_move_folio_search_view">
49+ <field name="name">move.folio.search</field>
50+ <field name="model">account.move.folio</field>
51+ <field name="arch" type="xml">
52+ <search string="Folio Search">
53+ <filter string="Entries: Set" name="move_id_set" domain="[('move_id','!=',None)]"/>
54+ <filter string="Entries: Not Set" name="move_id_not_set" domain="[('move_id','=',None)]"/>
55+ <newline/>
56+ <filter string="Entries State: Posted" name="move_state_posted" domain="[('move_state','=','posted')]"/>
57+ <filter string="Entries State: Unposted" name="move_state_drafted" domain="[('move_state','=','draft')]"/>
58+ <filter string="Entries State: Not Set" name="move_state_unset" domain="[('move_state','=',None)]"/>
59+ <newline/>
60+ <filter string="Period: Open" name="period_state_draft" domain="[('period_state','=','draft')]"/>
61+ <filter string="Period: Close" name="period_state_done" domain="[('period_state','=','done')]"/>
62+ <filter string="Period: Not Set" name="period_state_not_set" domain="[('period_state','=',None)]"/>
63+ <group expand="0" string="Group By...">
64+ <filter name="company_id_group" string="Company" context="{'group_by': 'company_id'}"/>
65+ <filter name="journal_id_group" string="Journal" context="{'group_by': 'journal_id'}"/>
66+ <filter name="move_state_group" string="Entries State" context="{'group_by': 'move_state'}"/>
67+ <filter name="period_state_group" string="Period State" context="{'group_by': 'period_state'}"/>
68+ </group>
69+ </search>
70+ </field>
71+ </record>
72 </data>
73 </openerp>