← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~camptocamp/openerp-rma/7.0-crm_claim_rma-add-picking-buttons into lp:openerp-rma

 

Yannick Vaucher @ Camptocamp has proposed merging lp:~camptocamp/openerp-rma/7.0-crm_claim_rma-add-picking-buttons into lp:openerp-rma.

Commit message:
Add buttons to access to related pickings from claim

Requested reviews:
  OpenERP RMA (openerprma)

For more details, see:
https://code.launchpad.net/~camptocamp/openerp-rma/7.0-crm_claim_rma-add-picking-buttons/+merge/208334
-- 
https://code.launchpad.net/~camptocamp/openerp-rma/7.0-crm_claim_rma-add-picking-buttons/+merge/208334
Your team OpenERP RMA is requested to review the proposed merge of lp:~camptocamp/openerp-rma/7.0-crm_claim_rma-add-picking-buttons into lp:openerp-rma.
=== modified file 'crm_claim_rma/crm_claim_rma.py'
--- crm_claim_rma/crm_claim_rma.py	2013-12-03 10:38:43 +0000
+++ crm_claim_rma/crm_claim_rma.py	2014-02-26 11:13:16 +0000
@@ -343,6 +343,8 @@
 
     def name_get(self, cr, uid, ids, context=None):
         res = []
+        if isinstance(ids, (int, long)):
+            ids = [ids]
         for claim in self.browse(cr, uid, ids, context=context):
             res.append((claim.id, '[' + claim.number + '] ' + claim.name))
         return res

=== modified file 'crm_claim_rma/crm_claim_rma_view.xml'
--- crm_claim_rma/crm_claim_rma_view.xml	2013-12-13 12:45:43 +0000
+++ crm_claim_rma/crm_claim_rma_view.xml	2014-02-26 11:13:16 +0000
@@ -305,6 +305,16 @@
                                 attrs="{'invisible': ['|',('partner_id','=', False),('claim_type','in', ['customer','other'])]}"
                                 context="{'search_default_partner_id': [partner_id],'search_default_user_id':False}"
                                />
+                        <button name="%(act_crm_claim_rma_picking_in)d" type="action"
+                                string="Returned Products"
+                                attrs="{'invisible': ['|',('partner_id','=', False),('claim_type','in', ['supplier','other'])]}"
+                                context="{'search_default_claim_id': active_id,'search_default_user_id':False}"
+                               />
+                        <button name="%(act_crm_claim_rma_picking_out)d" type="action"
+                                string="Deliveries"
+                                attrs="{'invisible': ['|',('partner_id','=', False),('claim_type','in', ['supplier','other'])]}"
+                                context="{'search_default_partner_id': [partner_id],'search_default_user_id':False}"
+                               />
                     </div>
                 </xpath>
             </field>

=== modified file 'crm_claim_rma/stock_view.xml'
--- crm_claim_rma/stock_view.xml	2013-11-14 10:07:54 +0000
+++ crm_claim_rma/stock_view.xml	2014-02-26 11:13:16 +0000
@@ -33,6 +33,7 @@
                 <filter string="To Invoice" name="to_invoice" icon="terp-dolar" domain="[('invoice_state', '=', '2binvoiced')]" position="after">
                     <separator/>
                     <filter string="RMA" icon="terp-accessories-archiver-minus" domain="[('claim_id', '!=', 'False')]" />
+                    <field name="claim_id" string="RMA" invisible="True"/>
                 </filter>
             </field>
         </record>


Follow ups