bzr revid: nel@tinyerp.com-20100614113256-00nc7srjaru3ulub
This commit is contained in:
nel@tinyerp.com
2010-06-14 13:32:56 +02:00
20 changed files with 119 additions and 63 deletions
@@ -36,6 +36,7 @@ If you don't think you need any of these right now, you can easily install them
<field name="profile_association" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="profile_auction" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="profile_bookstore" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
<field name="product_expiry" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
</group>
</data>
</field>
+3
View File
@@ -75,6 +75,9 @@ class base_setup_installer(osv.osv_memory):
"OpenERP's report creation."),
'thunderbird' :fields.boolean('Thunderbird'),
# Vertical modules
'product_expiry':fields.boolean('Food Industry',
help="Installs a preselected set of OpenERP "
"applications which will help you manage foods."),
'profile_association':fields.boolean('Associations',
help="Installs a preselected set of OpenERP "
"applications which will help you manage your association "
+17
View File
@@ -295,5 +295,22 @@
</field>
</record>
<act_window
domain="[('partner_id', '=', active_id)]"
context="{'default_partner_id': active_id}"
id="act_claim_partner"
name="Report a Claim"
res_model="crm.claim"
src_model="res.partner"/>
<act_window
domain="[('partner_address_id', '=', active_id)]"
context="{'default_partner_address_id': active_id}"
id="act_claim_partner_address"
name="Report a Claim"
res_model="crm.claim"
src_model="res.partner.address"/>
</data>
</openerp>
+1 -1
View File
@@ -273,7 +273,7 @@
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page[@string='Sale Order']/group[1]/button[@name='button_dummy']" position="after">
<button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-execute" context="{'order_id':id}"/>
<button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-add" context="{'order_id':id}"/>
</xpath>
</field>
</record>
+17 -5
View File
@@ -633,6 +633,18 @@ class email_template_preview(osv.osv_memory):
_name = "email_template.preview"
_description = "Email Template Preview"
def _get_model_recs(self, cr, uid, context=None):
if context is None:
context = {}
#Fills up the selection box which allows records from the selected object to be displayed
self.context = context
if 'template_id' in context.keys():
ref_obj_id = self.pool.get('email.template').read(cr, uid, context['template_id'], ['object_name'], context)
ref_obj_name = self.pool.get('ir.model').read(cr, uid, ref_obj_id['object_name'][0], ['model'], context)['model']
ref_obj_ids = self.pool.get(ref_obj_name).search(cr, uid, [], context=context)
ref_obj_recs = self.pool.get(ref_obj_name).name_get(cr, uid, ref_obj_ids, context)
return ref_obj_recs
def _default_model(self, cursor, user, context=None):
"""
Returns the default value for model field
@@ -643,7 +655,7 @@ class email_template_preview(osv.osv_memory):
return self.pool.get('email.template').read(
cursor,
user,
context['active_id'],
context['template_id'],
['object_name'],
context)['object_name']
@@ -652,6 +664,7 @@ class email_template_preview(osv.osv_memory):
'email.template',
'Template', readonly=True),
'rel_model':fields.many2one('ir.model', 'Model', readonly=True),
'rel_model_ref':fields.selection(_get_model_recs, 'Referred Document'),
'to':fields.char('To', size=250, readonly=True),
'cc':fields.char('CC', size=250, readonly=True),
'bcc':fields.char('BCC', size=250, readonly=True),
@@ -661,10 +674,9 @@ class email_template_preview(osv.osv_memory):
'report':fields.char('Report Name', size=100, readonly=True),
}
_defaults = {
'ref_template': lambda self, cr, uid, ctx:ctx['active_id'],
'ref_template': lambda self, cr, uid, ctx:ctx['template_id'],
'rel_model': _default_model
}
# Need to check
def on_change_ref(self, cr, uid, ids, rel_model_ref, context=None):
if context is None:
context = {}
@@ -673,13 +685,13 @@ class email_template_preview(osv.osv_memory):
vals = {}
if context == {}:
context = self.context
template = self.pool.get('email.template').browse(cr, uid, context['active_id'], context)
template = self.pool.get('email.template').browse(cr, uid, context['template_id'], context)
#Search translated template
lang = get_value(cr, uid, rel_model_ref, template.lang, template, context)
if lang:
ctx = context.copy()
ctx.update({'lang':lang})
template = self.pool.get('email.template').browse(cr, uid, context['active_id'], ctx)
template = self.pool.get('email.template').browse(cr, uid, context['template_id'], ctx)
vals['to'] = get_value(cr, uid, rel_model_ref, template.def_to, template, context)
vals['cc'] = get_value(cr, uid, rel_model_ref, template.def_cc, template, context)
vals['bcc'] = get_value(cr, uid, rel_model_ref, template.def_bcc, template, context)
@@ -44,9 +44,9 @@
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="auto_refresh" eval="1" />
<field name="auto_refresh" eval="1" >
<field name="target">new</field>
<field name="context">{'ids':active_id}</field>
<field name="context">{'template_id':active_id}</field>
</record>
<!--EMail client Form view -->
+5 -10
View File
@@ -117,9 +117,9 @@ class mrp_bom(osv.osv):
"""
Defines bills of material for a product.
"""
_name = 'mrp.bom'
_name = 'mrp.bom'
_description = 'Bill of Material'
def _child_compute(self, cr, uid, ids, name, arg, context={}):
""" Gets child bom.
@param self: The object pointer
@@ -140,14 +140,14 @@ class mrp_bom(osv.osv):
bom_id = ids[0]
bom_parent = bom_obj.browse(cr, uid, bom_id)
for bom in self.browse(cr, uid, ids, context=context):
if (bom_parent and bom_parent.multi_level_bom) or bom.id == bom_id:
if (bom_parent) or (bom.id == bom_id):
result[bom.id] = map(lambda x: x.id, bom.bom_lines)
else:
result[bom.id] = []
if bom.bom_lines:
continue
ok = ((name=='child_complete_ids') and (bom.product_id.supply_method=='produce'))
if (bom.type=='phantom' or ok) and bom_parent.multi_level_bom:
if (bom.type=='phantom' or ok):
sids = bom_obj.search(cr, uid, [('bom_id','=',False),('product_id','=',bom.product_id.id)])
if sids:
bom2 = bom_obj.browse(cr, uid, sids[0], context=context)
@@ -203,7 +203,6 @@ class mrp_bom(osv.osv):
'revision_type': fields.selection([('numeric','numeric indices'),('alpha','alphabetical indices')], 'Index type'),
'child_complete_ids': fields.function(_child_compute,relation='mrp.bom', method=True, string="BoM Hierarchy", type='many2many'),
'company_id': fields.many2one('res.company','Company',required=True),
'multi_level_bom': fields.boolean('Multi-level BoM'),
}
_defaults = {
'active': lambda *a: 1,
@@ -212,7 +211,6 @@ class mrp_bom(osv.osv):
'product_rounding': lambda *a: 1.0,
'type': lambda *a: 'normal',
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.bom', context=c),
'multi_level_bom': lambda *a: 0,
}
_order = "sequence"
_sql_constraints = [
@@ -247,7 +245,7 @@ class mrp_bom(osv.osv):
v['name'] = prod.name
return {'value': v}
return {}
def _bom_find(self, cr, uid, product_id, product_uom, properties=[]):
""" Finds BoM for particular product and product uom.
@param product_id: Selected product.
@@ -954,6 +952,3 @@ class mrp_production_product_line(osv.osv):
}
mrp_production_product_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+21 -13
View File
@@ -252,21 +252,29 @@
<field name="product_qty"/>
<field name="routing_id" groups="base.group_extended"/>
<newline/>
<field name="product_uos" groups="product.group_uos,base.group_extended" widget="selection"/>
<field name="product_uos_qty" groups="product.group_uos,base.group_extended" />
<field name="product_uos" groups="product.group_uos"/>
<field name="product_uos_qty" groups="product.group_uos" />
<newline/>
<field name="multi_level_bom"/>
<field name="type" groups="base.group_extended"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4" >
<page string="Components" attrs="{'invisible': [('multi_level_bom','=',False)]}">
<field colspan="4" name="bom_lines" nolabel="1" widget="one2many_list" />
<page string="Components">
<field colspan="4" name="bom_lines" nolabel="1" widget="one2many_list">
<tree string="Components" editable="bottom">
<field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
<field name="product_uom"/>
<field name="product_qty"/>
<field name="name" invisible="1"/>
<field name="date_start"/>
<field name="date_stop"/>
</tree>
</field>
</page>
<page string="Revisions" groups="base.group_extended" attrs="{'invisible': [('bom_id','!=',False),('multi_level_bom','=',False)]}">
<page string="Revisions" groups="base.group_extended" attrs="{'invisible': [('bom_id','!=',False)]}">
<field colspan="4" name="revision_ids" nolabel="1" widget="one2many_list"/>
</page>
<page string="Properties" groups="base.group_extended" attrs="{'invisible': [('bom_id','!=',False),('multi_level_bom','=',False)]}">
<page string="Properties" groups="base.group_extended">
<field name="position"/>
<field name="active"/>
<field name="sequence"/>
@@ -499,15 +507,15 @@
<field name="product_id" on_change="product_id_change(product_id)"/>
<field name="product_qty"/>
<group colspan="2" col="3">
<field name="product_uom" widget="selection"/>
<field name="product_uom"/>
<button type="action"
name="%(mrp.action_change_production_qty)d"
string="Change Qty" states="ready,confirmed" />
</group>
<label string="" colspan="2"/>
<field name="product_uos_qty" groups="product.group_uos,base.group_extended"/>
<group colspan="2" col="3" groups="product.group_uos,base.group_extended">
<field name="product_uos" widget="selection"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<group colspan="2" col="3" groups="product.group_uos">
<field name="product_uos"/>
<label string=""/>
</group>
</group>
@@ -800,8 +808,8 @@
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uos_qty" groups="product.group_uos,base.group_extended"/>
<field name="product_uos" groups="product.group_uos,base.group_extended"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<field name="product_uos" groups="product.group_uos"/>
</tree>
</field>
</record>
+11 -9
View File
@@ -24,15 +24,17 @@ from tools.translate import _
class product_product(osv.osv):
_inherit = "product.product"
_inherit = "product.product"
_columns = {
"bom_ids": fields.one2many('mrp.bom', 'product_id','Bill of Materials'),
}
def do_change_standard_price(self, cr, uid, ids, datas, context={}):
""" Changes the Standard Price of Product and parent products and creates an account move accordingly.
@param datas: dict. contain default datas like new_price, stock_output_account, stock_input_account, stock_journal
@param context: A standard dictionary
@return:
"""
#TODO : TO Check
@param context: A standard dictionary
@return:
"""
#TODO : TO Check
res = super(product_product, self).do_change_standard_price(cr, uid, ids, datas, context=context)
bom_obj = self.pool.get('mrp.bom')
def _compute_price(bom):
@@ -44,7 +46,7 @@ class product_product(osv.osv):
price += bom_line.product_qty * prod_price
accounts = self.get_product_accounts(cr, uid, bom.bom_id.product_id.id, context)
datas = {
'new_price': price,
'stock_output_account': accounts['stock_account_output'],
@@ -54,9 +56,9 @@ class product_product(osv.osv):
super(product_product, self).do_change_standard_price(cr, uid, [bom.bom_id.product_id.id], datas, context)
_compute_price(bom.bom_id)
return price
bom_ids = bom_obj.search(cr, uid, [('product_id', 'in', ids)])
for bom in bom_obj.browse(cr, uid, bom_ids):
_compute_price(bom)
+6
View File
@@ -37,7 +37,9 @@ class procurement_order(osv.osv):
context = {}
if use_new_cursor:
print 'Cursor New', cr,
cr = pooler.get_db(use_new_cursor).cursor()
print cr
wf_service = netsvc.LocalService("workflow")
procurement_obj = self.pool.get('procurement.order')
@@ -122,6 +124,7 @@ class procurement_order(osv.osv):
})
if use_new_cursor:
cr.commit()
print 'Cursor Close', cr
cr.close()
return {}
@@ -172,7 +175,9 @@ class procurement_order(osv.osv):
if not context:
context = {}
if use_new_cursor:
print 'Cursor New', cr,
cr = pooler.get_db(use_new_cursor).cursor()
print cr
orderpoint_obj = self.pool.get('stock.warehouse.orderpoint')
location_obj = self.pool.get('stock.location')
procurement_obj = self.pool.get('procurement.order')
@@ -236,6 +241,7 @@ class procurement_order(osv.osv):
})
if use_new_cursor:
cr.commit()
print 'Cursor Close', cr
cr.close()
return {}
procurement_order()
@@ -1,9 +1,11 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_mrp_property_group","mrp.property.group","model_mrp_property_group",stock.group_stock_manager,1,1,1,1
"access_mrp_property","mrp.property","model_mrp_property",stock.group_stock_manager,1,1,1,1
"access_mrp_property_group","mrp.property.group","model_mrp_property_group",,1,0,0,0
"access_mrp_property","mrp.property","model_mrp_property",,1,0,0,0
"access_procurement","procurement.order","model_procurement_order",,1,0,0,0
"access_stock_warehouse_orderpoint","stock.warehouse.orderpoint","model_stock_warehouse_orderpoint",,1,0,0,0
"access_procurement_compute_all","procurement.order.compute.all","model_procurement_order_compute_all",,1,0,0,0
"access_procurement_orderpoint_compute","procurement.orderpoint.compute","model_procurement_orderpoint_compute",,1,0,0,0
"access_mrp_make_procurement","make.procurement","model_make_procurement",,1,0,0,0
"access_mrp_make_procurement","procurement.order.compute","model_procurement_order_compute",,1,0,0,0
"access_mrp_property","mrp.property","model_mrp_property",base.group_user,1,0,0,0
"access_procurement","procurement.order","model_procurement_order",base.group_user,1,0,0,0
"access_stock_warehouse_orderpoint","stock.warehouse.orderpoint","model_stock_warehouse_orderpoint",stock.group_stock_manager,1,1,1,1
"access_procurement_compute_all","procurement.order.compute.all","model_procurement_order_compute_all",stock.group_stock_manager,1,1,1,1
"access_procurement_orderpoint_compute","procurement.orderpoint.compute","model_procurement_orderpoint_compute",stock.group_stock_manager,1,1,1,1
"access_mrp_make_procurement","make.procurement","model_make_procurement",stock.group_stock_manager,1,1,1,1
"access_mrp_make_procurement","procurement.order.compute","model_procurement_order_compute",stock.group_stock_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_mrp_property_group mrp.property.group model_mrp_property_group stock.group_stock_manager 1 1 1 1
3 access_mrp_property mrp.property model_mrp_property stock.group_stock_manager 1 1 1 1
4 access_mrp_property_group mrp.property.group model_mrp_property_group 1 0 0 0
5 access_mrp_property mrp.property model_mrp_property base.group_user 1 0 0 0
6 access_procurement procurement.order model_procurement_order base.group_user 1 0 0 0
7 access_stock_warehouse_orderpoint stock.warehouse.orderpoint model_stock_warehouse_orderpoint stock.group_stock_manager 1 0 1 0 1 0 1
8 access_procurement_compute_all procurement.order.compute.all model_procurement_order_compute_all stock.group_stock_manager 1 0 1 0 1 0 1
9 access_procurement_orderpoint_compute procurement.orderpoint.compute model_procurement_orderpoint_compute stock.group_stock_manager 1 0 1 0 1 0 1
10 access_mrp_make_procurement make.procurement model_make_procurement stock.group_stock_manager 1 0 1 0 1 0 1
11 access_mrp_make_procurement procurement.order.compute model_procurement_order_compute stock.group_stock_manager 1 0 1 0 1 0 1
+2 -1
View File
@@ -31,7 +31,8 @@ class procurement_compute(osv.osv_memory):
proc_obj = self.pool.get('procurement.order')
proc_obj._procure_confirm(cr, uid, use_new_cursor=cr.dbname, context=context)
finally:
cr.close()
pass
#cr.close()
return {}
def procure_calculation(self, cr, uid, ids, context):
+3 -1
View File
@@ -45,10 +45,12 @@ class procurement_compute_all(osv.osv_memory):
"""
proc_obj = self.pool.get('procurement.order')
for proc in self.browse(cr, uid, ids):
print 'Cursor', cr
proc_obj.run_scheduler(cr, uid, automatic=proc.automatic, use_new_cursor=cr.dbname,\
context=context)
print 'Cursor', cr
return {}
def procure_calculation(self, cr, uid, ids, context):
"""
@param self: The object pointer.
@@ -2,4 +2,5 @@
"access_resource_calendar","resource.calendar","model_resource_calendar","base.group_system",1,1,1,1
"access_resource_calendar_week","resource.calendar.week","model_resource_calendar_week","base.group_system",1,1,1,1
"access_resource_resource","resource.resource","model_resource_resource","base.group_system",1,1,1,1
"access_resource_resource_all","resource.resource all","model_resource_resource",,1,0,0,0
"access_resource_calendar_leaves","resource.calendar.leaves","model_resource_calendar_leaves","base.group_system",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_resource_calendar resource.calendar model_resource_calendar base.group_system 1 1 1 1
3 access_resource_calendar_week resource.calendar.week model_resource_calendar_week base.group_system 1 1 1 1
4 access_resource_resource resource.resource model_resource_resource base.group_system 1 1 1 1
5 access_resource_resource_all resource.resource all model_resource_resource 1 0 0 0
6 access_resource_calendar_leaves resource.calendar.leaves model_resource_calendar_leaves base.group_system 1 1 1 1
+1 -1
View File
@@ -200,7 +200,7 @@
<field name="amount_untaxed" sum="Untaxed amount"/>
<field name="amount_tax"/>
<field name="amount_total"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
<button name="button_dummy" states="draft" string="" type="object" icon="gtk-execute"/>
<button name="%(action_view_sale_advance_payment_inv)d" string="Deposit" type="action" icon="gtk-execute"/>
</group>
<group col="13" colspan="4">
View File
View File
+8 -6
View File
@@ -14,7 +14,7 @@
"access_stock_inventory","stock.inventory","model_stock_inventory","stock.group_stock_user",1,1,1,1
"access_stock_inventory_line","stock.inventory.line","model_stock_inventory_line","stock.group_stock_user",1,1,1,1
"access_stock_report_prodlots","stock.report.prodlots","model_stock_report_prodlots","stock.group_stock_manager",1,0,0,0
"access_stock_location_product_manager","stock.location product manager","model_stock_location","product.group_product_manager",1,0,0,0
"access_stock_location_product_manager","stock.location product manager","model_stock_location","product.group_product_manager",1,1,1,1
"access_stock_lines_date","report.stock.lines.date all","model_report_stock_lines_date",stock.group_stock_user,1,0,0,0
"access_stock_report_tracklots","stock.report.tracklots","model_stock_report_tracklots","stock.group_stock_user",1,1,1,1
"access_report_products_to_received_planned","report.products.to.received.planned","model_report_products_to_received_planned","stock.group_stock_user",1,1,1,1
@@ -24,15 +24,17 @@
"access_stock_move_scrap","stock.move.scrap","model_stock_move_scrap","stock.group_stock_user",1,1,1,1
"access_stock_move_split","stock.move.split","model_stock_move_split","stock.group_stock_user",1,1,1,1
"access_stock_move_split_lines","stock.move.split.lines","model_stock_move_split_lines","stock.group_stock_user",1,1,1,1
"access_stock_move_split_lines_exist","stock.move.split.lines.exist","model_stock_move_split_lines_exist","stock.group_stock_user",1,1,1,1
"access_stock_inventory_set_stock_zero","stock.inventory.set.stock.zero","model_stock_inventory_set_stock_zero","stock.group_stock_user",1,1,1,1
"access_stock_fill_inventory","stock.fill.inventory","model_stock_fill_inventory","stock.group_stock_user",1,1,1,1
"access_stock_inventory_line_split","stock.inventory.line.split","model_stock_inventory_line_split","stock.group_stock_user",1,1,1,1
"access_stock_invoice_onshipping","stock.invoice.onshipping","model_stock_invoice_onshipping","stock.group_stock_user",1,1,1,1
"access_stock_location_product","stock.location.product","model_stock_location_product","stock.group_stock_user",1,0,0,0
"access_stock_traceability_upstream","stock.traceability.upstream","model_stock_traceability_upstream","stock.group_stock_user",1,0,0,0
"access_stock_traceability_downstream","stock.traceability.downstream","model_stock_traceability_downstream","stock.group_stock_user",1,0,0,0
"access_stock_traceability_lot_upstream","stock.traceability.lot.upstream","model_stock_traceability_lot_upstream","stock.group_stock_user",1,0,0,0
"access_stock_traceability_lot_downstream","stock.traceability.lot.downstream","model_stock_traceability_lot_downstream","stock.group_stock_user",1,0,0,0
"access_stock_location_product","stock.location.product","model_stock_location_product","stock.group_stock_user",1,1,1,1
"access_stock_location_product_manager","stock.location.product manager","model_stock_location_product","stock.group_stock_manager",1,1,1,1
"access_stock_traceability_upstream","stock.traceability.upstream","model_stock_traceability_upstream","stock.group_stock_user",1,1,1,1
"access_stock_traceability_downstream","stock.traceability.downstream","model_stock_traceability_downstream","stock.group_stock_user",1,1,1,1
"access_stock_traceability_lot_upstream","stock.traceability.lot.upstream","model_stock_traceability_lot_upstream","stock.group_stock_user",1,1,1,1
"access_stock_traceability_lot_downstream","stock.traceability.lot.downstream","model_stock_traceability_lot_downstream","stock.group_stock_user",1,1,1,1
"access_stock_partial_picking",stock.partial.picking","model_stock_partial_picking",,1,1,1,1
"access_stock_partial_move","stock.partial.move","model_stock_partial_move",,1,1,1,1
"access_stock_inventory_merge","stock.inventory.merge","model_stock_inventory_merge","stock.group_stock_user",1,0,0,0
Can't render this file because it contains an unexpected character in line 38 and column 53.
-1
View File
@@ -1248,7 +1248,6 @@ class stock_production_lot(osv.osv):
'revisions': fields.one2many('stock.production.lot.revision', 'lot_id', 'Revisions'),
'company_id': fields.many2one('res.company','Company',select=1),
}
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'name': lambda x, y, z, c: x.pool.get('ir.sequence').get(y, z, 'stock.lot.serial'),
+11 -6
View File
@@ -922,7 +922,6 @@
<field name="invoice_state"/>
<field name="state"/>
<button name="%(action_partial_picking)d" states="assigned" string="Validate" type="action" icon="gtk-go-forward" help="Validate Picking"/>
<button name="button_cancel" states="assigned,confirmed,draft" string="Cancel" icon="gtk-cancel" help="Cancel" confirm="This operation will cancel the picking. Do you want to continue?"/>
</tree>
</field>
</record>
@@ -946,16 +945,20 @@
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
<tree colors="grey:state in ('cancel')" string="Stock Moves">
<field name="name" string="Move Name"/>
<field name="product_id"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" string="UOM"/>
<field name="picking_id"/>
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" />
<field name="prodlot_id" groups="base.group_extended"/>
<button name="%(track_line)d" string="Split" type="action"
icon="gtk-justify-fill" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
states="assigned,confirmed,done"
groups="base.group_extended"/>
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="date_planned"/>
<field name="date_expected" string="Date Expected"/>
<field name="state"/>
<button
name="%(stock.track_line)d"
@@ -967,6 +970,8 @@
string="Scrap Products" type="action"
icon="gtk-convert"
states="draft,waiting,confirmed,assigned" />
<button name="%(action_partial_move)d" string="Partial" type="action" states="confirmed,assigned" icon="gtk-justify-fill"/>
<button name="action_done" states="confirmed,assigned" string="Done" type="object" icon="gtk-jump-to"/>
</tree>
<form string="Stock Moves">
<notebook colspan="4">
@@ -1063,7 +1068,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="domain">[('type','=','out')]</field>
<field name="context">{'contact_display': 'partner'}</field>
<field name="context">{'contact_display': 'partner', 'search_default_available': 1}</field>
<field name="search_view_id" ref="view_picking_out_search"/>
</record>
<record id="action_picking_tree_out_view1_waiting" model="ir.actions.act_window.view">