mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[MRG] Add buttons to access to related pickings from claim
This commit is contained in:
@@ -348,6 +348,8 @@ class crm_claim(orm.Model):
|
||||
|
||||
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):
|
||||
number = claim.number and str(claim.number) or ''
|
||||
res.append((claim.id, '[' + number + '] ' + claim.name))
|
||||
|
||||
@@ -306,6 +306,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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user