mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[IMP] Adapt to v7
This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
<field name="state"/>
|
||||
<field name="substate_id"/>
|
||||
<field name="name"/>
|
||||
<field name="product_id"/>
|
||||
<field name="prodlot_id"/>
|
||||
<field name="warning"/>
|
||||
<field name="product_returned_quantity"/>
|
||||
@@ -217,10 +218,13 @@
|
||||
<field name="model">crm.claim</field>
|
||||
<field name="inherit_id" ref="crm_claim.crm_case_claims_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Follow Up" position="after">
|
||||
<field name="type_action" position="after">
|
||||
<separator string="Invoice and Picking" colspan="4"/>
|
||||
<b><label string="Invoice" /></b>
|
||||
<field name="invoice_ids" colspan="4" nolabel="1" readonly="1"/>
|
||||
<b><label string="Picking" /></b>
|
||||
<field name="picking_ids" colspan="4" nolabel="1" readonly="1"/>
|
||||
</page>
|
||||
</field>
|
||||
<!--
|
||||
<xpath expr="/form/group/notebook/page[@string='Communication & History']/field" position="after">
|
||||
<field name="invoice_ids" colspan="4" nolabel="1" readonly="1"/>
|
||||
|
||||
@@ -33,6 +33,16 @@ class stock_picking(osv.osv):
|
||||
'claim_picking': fields.boolean('Picking from Claim'),
|
||||
}
|
||||
|
||||
def create(self, cr, user, vals, context=None):
|
||||
if ('name' not in vals) or (vals.get('name')=='/'):
|
||||
if vals['type'] != 'internal':
|
||||
seq_obj_name = 'stock.picking.' + vals['type']
|
||||
else:
|
||||
seq_obj_name = self._name
|
||||
vals['name'] = self.pool.get('ir.sequence').get(cr, user, seq_obj_name)
|
||||
new_id = super(stock_picking, self).create(cr, user, vals, context)
|
||||
return new_id
|
||||
|
||||
class stock_warehouse(osv.osv):
|
||||
|
||||
_inherit = "stock.warehouse"
|
||||
@@ -58,4 +68,4 @@ class stock_move(osv.osv):
|
||||
picking = self.pool.get('stock.picking').browse(cr, uid, vals['picking_id'], context=context)
|
||||
if picking.claim_picking and picking.type == u'in':
|
||||
move = self.write(cr, uid, move_id, {'state': 'confirmed'}, context=context)
|
||||
return move_id
|
||||
return move_id
|
||||
|
||||
@@ -97,8 +97,8 @@ class claim_make_picking(osv.osv_memory):
|
||||
claim_picking = False
|
||||
if context.get('picking_type') in ['in', 'loss']:
|
||||
p_type = 'in'
|
||||
view_xml_id = 'view_picking_in_form'
|
||||
view_name = 'stock.picking.in.form'
|
||||
view_xml_id = 'stock_picking_form'
|
||||
view_name = 'stock.picking.form'
|
||||
write_field = 'move_in_id'
|
||||
if context.get('picking_type') == 'in':
|
||||
claim_picking = True
|
||||
@@ -112,10 +112,11 @@ class claim_make_picking(osv.osv_memory):
|
||||
write_field = 'move_out_id'
|
||||
note = 'RMA picking out'
|
||||
name = 'Customer picking out'
|
||||
view_xml_id = 'view_picking_in_form'
|
||||
view_name = 'stock.picking.in.form'
|
||||
view_xml_id = 'stock_picking_form'
|
||||
view_name = 'stock.picking.form'
|
||||
view_id = view_obj.search(cr, uid, [
|
||||
('xml_id', '=', view_xml_id),
|
||||
('model', '=', 'stock.picking'),
|
||||
('type', '=', 'form'),
|
||||
('name', '=', view_name)
|
||||
], context=context)[0]
|
||||
|
||||
Reference in New Issue
Block a user