[FIX] stock_location, logistic, better demo data
bzr revid: fp@tinyerp.com-20101011215706-zu7cl6byilud541o
This commit is contained in:
parent
9e5a2d4e27
commit
4b77845710
|
@ -1,18 +1,5 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_picking_delivery" model="ir.ui.view">
|
||||
<field name="name">stock.picking.delivery.form20</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="type">form</field>
|
||||
<field name="priority" eval="2"/>
|
||||
<field name="inherit_id" ref="stock.view_picking_delivery_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//form/group/field[@name='date']" position="after">
|
||||
<field name="partner_id" invisible="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<data>
|
||||
|
||||
<act_window id="action_claim_from_delivery" name="Claim"
|
||||
domain="[]" target="current"
|
||||
|
@ -20,5 +7,5 @@
|
|||
view_mode="form" res_model="crm.claim"
|
||||
src_model="stock.picking" />
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -4,27 +4,27 @@
|
|||
|
||||
<!-- Delivery Sale Order -->
|
||||
|
||||
<record id="view_make_delivery_wizard" model="ir.ui.view">
|
||||
<record id="view_make_delivery_wizard" model="ir.ui.view">
|
||||
<field name="name">Delivery Costs</field>
|
||||
<field name="model">delivery.sale.order</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Create Deliveries">
|
||||
<separator colspan="4" string="Delivery Method" />
|
||||
<field name="carrier_id" widget="selection"/>
|
||||
<newline/>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="_Cancel" />
|
||||
<button name="delivery_set" string="_Apply"
|
||||
colspan="1" type="object" icon="gtk-apply" />
|
||||
</group>
|
||||
<separator colspan="4" string="Delivery Method" />
|
||||
<field name="carrier_id" widget="selection"/>
|
||||
<newline/>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="_Cancel" />
|
||||
<button name="delivery_set" string="_Apply"
|
||||
colspan="1" type="object" icon="gtk-apply" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_delivery_cost" model="ir.actions.act_window">
|
||||
<record id="action_delivery_cost" model="ir.actions.act_window">
|
||||
<field name="name">Delivery Costs</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">delivery.sale.order</field>
|
||||
|
@ -34,5 +34,5 @@
|
|||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -177,7 +177,7 @@
|
|||
purch_ids = self.search(cr, uid, [('partner_id.name','=','Maxtor')])
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for p_id in purch_ids:
|
||||
wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr)
|
||||
wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr)
|
||||
|
||||
-
|
||||
I confirm purchase order for Buttons.
|
||||
|
@ -187,7 +187,7 @@
|
|||
purch_ids = self.search(cr, uid, [('partner_id.name','=','ASUStek')])
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for p_id in purch_ids:
|
||||
wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr)
|
||||
wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr)
|
||||
|
||||
-
|
||||
I Check incoming shipments for cloth. And receive products.
|
||||
|
@ -284,7 +284,7 @@
|
|||
assert prod_ids, _('No Ready Manufacturing Orders found!')
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for p_id in prod_ids:
|
||||
wf_service.trg_validate(uid, 'mrp.production', p_id, 'button_produce', cr)
|
||||
wf_service.trg_validate(uid, 'mrp.production', p_id, 'button_produce', cr)
|
||||
-
|
||||
I create record for producing products with quantity 5.00.
|
||||
-
|
||||
|
|
|
@ -322,7 +322,7 @@ class procurement_order(osv.osv):
|
|||
if procurement.procure_method == 'make_to_order':
|
||||
source = procurement.product_id.product_tmpl_id.property_stock_procurement.id
|
||||
id = move_obj.create(cr, uid, {
|
||||
'name': 'PROC:' + procurement.name,
|
||||
'name': procurement.name,
|
||||
'location_id': source,
|
||||
'location_dest_id': procurement.location_id.id,
|
||||
'product_id': procurement.product_id.id,
|
||||
|
@ -374,10 +374,6 @@ class procurement_order(osv.osv):
|
|||
"Not enough stock and no minimum orderpoint rule defined.") % \
|
||||
procurement.name
|
||||
self.log(cr, uid, procurement.id, message)
|
||||
if procurement.state=='exception' and procurement.message=='':
|
||||
cr.execute('update procurement_order set message=%s where id=%s',
|
||||
(_('Not enough stock '), procurement.id) )
|
||||
|
||||
return ok
|
||||
|
||||
def action_produce_assign_service(self, cr, uid, ids, context={}):
|
||||
|
|
|
@ -170,8 +170,8 @@ class procurement_order(osv.osv):
|
|||
else:
|
||||
continue
|
||||
proc_id = proc_obj.create(cr, uid, {
|
||||
'name': 'Automatic OP: %s' % product.name,
|
||||
'origin': 'SCHEDULER',
|
||||
'name': _('Automatic OP: %s') % (product.name,),
|
||||
'origin': _('SCHEDULER'),
|
||||
'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'product_id': product.id,
|
||||
'product_qty': -product.virtual_available,
|
||||
|
@ -236,7 +236,7 @@ class procurement_order(osv.osv):
|
|||
continue
|
||||
if op.product_id.type not in ('consu'):
|
||||
proc_id = procurement_obj.create(cr, uid, {
|
||||
'name': 'OP:' + str(op.id),
|
||||
'name': op.name,
|
||||
'date_planned': newdate.strftime('%Y-%m-%d'),
|
||||
'product_id': op.product_id.id,
|
||||
'product_qty': qty,
|
||||
|
|
|
@ -3,19 +3,17 @@
|
|||
<data noupdate="1">
|
||||
|
||||
<!--Resource: purchase.order-->
|
||||
|
||||
<record id="order_purchase1" model="purchase.order">
|
||||
|
||||
<record id="order_purchase1" model="purchase.order">
|
||||
<field model="stock.location" name="location_id" search="[]"/>
|
||||
<field model="product.pricelist" name="pricelist_id" search="[]"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field model="res.partner" name="partner_id" search="[]"/>
|
||||
<field model="res.partner.address" name="partner_address_id" search="[]"/>
|
||||
</record>
|
||||
|
||||
<record id="order_purchase2" model="purchase.order">
|
||||
</record>
|
||||
|
||||
<record id="order_purchase2" model="purchase.order">
|
||||
<field model="stock.location" name="location_id" search="[]"/>
|
||||
<field model="product.pricelist" name="pricelist_id" search="[]"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field model="res.partner" name="partner_id" search="[]"/>
|
||||
<field model="res.partner.address" name="partner_address_id" search="[]"/>
|
||||
</record>
|
||||
|
@ -30,7 +28,6 @@
|
|||
<field model="product.uom" name="product_uom" search="[]"/>
|
||||
<field name="price_unit">150</field>
|
||||
<field name="product_qty">5</field>
|
||||
<field name="type">make_to_stock</field>
|
||||
</record>
|
||||
|
||||
<record id="line2_purchase" model="purchase.order.line">
|
||||
|
@ -57,4 +54,4 @@
|
|||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
-
|
||||
!python {model: stock.picking }: |
|
||||
from tools.translate import _
|
||||
picking_id = self.search(cr, uid, [('origin','=','TEST/TENDER/0001'),('type','=','delivery')])
|
||||
picking_id = self.search(cr, uid, [('origin','=','TEST/TENDER/0001')])
|
||||
if picking_id:
|
||||
pick=self.browse(cr,uid,picking_id[0])
|
||||
assert (pick.state =='confirmed'),_('Picking is not in confirm state.')
|
||||
|
|
|
@ -85,7 +85,6 @@
|
|||
</record>
|
||||
|
||||
<record id="process_node_deliveryorder0" model="process.node">
|
||||
<field name="menu_id" ref="stock.menu_action_picking_tree_delivery"/>
|
||||
<field name="model_id" ref="stock.model_stock_picking"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Delivery Order"""" name="name"/>
|
||||
|
|
|
@ -1234,11 +1234,6 @@ class sale_config_picking_policy(osv.osv_memory):
|
|||
ir_values_obj.set(cr, uid, 'default', False, 'order_policy', ['sale.order'], o.order_policy)
|
||||
if o.step == 'one':
|
||||
md = self.pool.get('ir.model.data')
|
||||
group_id = md._get_id(cr, uid, 'base', 'group_no_one')
|
||||
group_id = md.browse(cr, uid, group_id, context=context).res_id
|
||||
menu_id = md._get_id(cr, uid, 'stock', 'menu_action_picking_tree_delivery')
|
||||
menu_id = md.browse(cr, uid, menu_id, context=context).res_id
|
||||
self.pool.get('ir.ui.menu').write(cr, uid, [menu_id], {'groups_id': [(6, 0, [group_id])]})
|
||||
location_id = md._get_id(cr, uid, 'stock', 'stock_location_output')
|
||||
location_id = md.browse(cr, uid, location_id, context=context).res_id
|
||||
self.pool.get('stock.location').write(cr, uid, [location_id], {'chained_auto_packing': 'transparent'})
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
<openerp>
|
||||
<data noupdate="1">
|
||||
<!--
|
||||
Requests Links
|
||||
-->
|
||||
Requests Links
|
||||
-->
|
||||
<record id="req_link_sale_order" model="res.request.link">
|
||||
<field name="name">Sale Order</field>
|
||||
<field name="object">sale.order</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Resource: sale.shop
|
||||
-->
|
||||
Resource: sale.shop
|
||||
-->
|
||||
<record id="shop" model="sale.shop">
|
||||
<field model="res.company" name="name" search="[]" use="name"/>
|
||||
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
|
||||
|
|
|
@ -375,22 +375,22 @@ to your configuration: from the sales order, from the pickings, etc.
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sales Order Lines">
|
||||
<group colspan="4" col="6">
|
||||
<field name="order_id"/>
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="invoiced"/>
|
||||
<field name="product_uom_qty" readonly="1"/>
|
||||
<field groups="product.group_uos" name="product_uos_qty"/>
|
||||
<field name="product_uom"/>
|
||||
<field colspan="4" name="name" groups="base.group_extended"/>
|
||||
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
|
||||
<field name="order_partner_id" readonly="1" invisible="1"/>
|
||||
</group>
|
||||
<group colspan="4" col="6">
|
||||
<field name="order_id"/>
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="invoiced"/>
|
||||
<field name="product_uom_qty" readonly="1"/>
|
||||
<field groups="product.group_uos" name="product_uos_qty"/>
|
||||
<field name="product_uom"/>
|
||||
<field colspan="4" name="name" groups="base.group_extended"/>
|
||||
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
|
||||
<field name="order_partner_id" readonly="1" invisible="1"/>
|
||||
</group>
|
||||
<separator colspan="4" string="Price"/>
|
||||
<group colspan="4" col="6">
|
||||
<field name="price_unit"/>
|
||||
<field name="discount"/>
|
||||
<field name="price_subtotal"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount"/>
|
||||
<field name="price_subtotal"/>
|
||||
</group>
|
||||
<separator colspan="4" string="Notes"/>
|
||||
<field colspan="4" name="notes" nolabel="1"/>
|
||||
|
@ -518,7 +518,7 @@ to your configuration: from the sales order, from the pickings, etc.
|
|||
groups="base.group_extended"/>
|
||||
|
||||
<menuitem id="menu_invoiced" name="Billing" parent="base.menu_base_partner" sequence="5"
|
||||
groups="base.group_extended"/>
|
||||
groups="base.group_extended"/>
|
||||
<menuitem action="action_order_line_tree2" id="menu_invoicing_sales_order_lines" parent="menu_invoiced" sequence="2" groups="base.group_sale_salesman,base.group_sale_manager"/>
|
||||
<!-- configartion view -->
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
!python {model: stock.picking }: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name)])
|
||||
assert (picking_id),"Delivery order has not been generated"
|
||||
-
|
||||
I verify that a procurement has been generated for so
|
||||
|
@ -282,7 +282,7 @@
|
|||
import time
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name)])
|
||||
if picking_id:
|
||||
pick=self.browse(cr,uid,picking_id[0])
|
||||
pick.force_assign(cr, uid)
|
||||
|
@ -304,7 +304,7 @@
|
|||
!python {model: stock.picking }: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name)])
|
||||
pick = self.browse(cr,uid,picking_id[0])
|
||||
assert (pick.state) =='done', "Picking for SO is not in done state."
|
||||
-
|
||||
|
|
|
@ -261,7 +261,7 @@
|
|||
!python {model: stock.picking }: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name)])
|
||||
assert (picking_id),"Delivery order has not been generated"
|
||||
-
|
||||
I verify that delivery has been done
|
||||
|
@ -270,7 +270,7 @@
|
|||
import time
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name)])
|
||||
if picking_id:
|
||||
pick=self.browse(cr,uid,picking_id[0])
|
||||
pick.force_assign(cr, uid)
|
||||
|
@ -292,7 +292,7 @@
|
|||
!python {model: stock.picking }: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name)])
|
||||
if picking_id:
|
||||
pick = self.browse(cr,uid,picking_id[0])
|
||||
assert (pick.state) =='done', "Picking for SO is not in done state."
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
!python {model: stock.picking }: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name)])
|
||||
assert (picking_id),"Delivery order has not been generated"
|
||||
-
|
||||
I click on the Products Sent button and then on the Validate button
|
||||
|
@ -82,7 +82,7 @@
|
|||
import time
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name)])
|
||||
if picking_id:
|
||||
pick=self.browse(cr,uid,picking_id[0])
|
||||
pick.force_assign(cr, uid)
|
||||
|
@ -104,7 +104,7 @@
|
|||
!python {model: stock.picking }: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name)])
|
||||
if picking_id:
|
||||
pick = self.browse(cr,uid,picking_id[0])
|
||||
assert (pick.state) =='done', "Picking for SO is not in done state."
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
!python {model: stock.picking }: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
|
||||
picking_id = self.search(cr, uid, [('origin','!=',so.name),(('type','=','out')and('type','=','delivery'))])
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
|
||||
assert picking_id,"There is a picking attached to this sale order"
|
||||
-
|
||||
I open the Invoice for the SO.
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so4"))
|
||||
pick_obj = self.pool.get('stock.picking')
|
||||
pick_id = pick_obj.search(cr, uid, [('origin', '=', so.name),('type','=','delivery')])
|
||||
pick_id = pick_obj.search(cr, uid, [('origin', '=', so.name)])
|
||||
pick_brw = pick_obj.browse(cr,uid,pick_id)[0]
|
||||
move_obj = self.pool.get('stock.move')
|
||||
move_id = move_obj.search(cr, uid, [('picking_id', '=', pick_brw.name),('name','=','LG Viewty Smart')])
|
||||
|
|
|
@ -213,38 +213,6 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Inherit stock picking delivery's form view.-->
|
||||
|
||||
<record model="ir.ui.view" id="sale_journal_picking_order_del">
|
||||
<field name="name">stock.picking.journal.view.form</field>
|
||||
<field name="type">form</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_delivery_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="origin" position="after">
|
||||
<field name="journal_id" select="1"/>
|
||||
<field name="sale_journal_id" select="1"/>
|
||||
<field name="invoice_type_id" select="1"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Inherit stock picking delivery's tree view.-->
|
||||
|
||||
<record model="ir.ui.view" id="sale_journal_picking_order_tree_del">
|
||||
<field name="name">stock.picking.journal.view.tree</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_delivery_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="origin" position="after">
|
||||
<field name="journal_id" select="1"/>
|
||||
<field name="invoice_type_id" select="1"/>
|
||||
<field name="sale_journal_id" select="1"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="sale_journal_picking_order_in">
|
||||
<field name="name">stock.picking.journal.view.form</field>
|
||||
<field name="type">form</field>
|
||||
|
@ -487,18 +455,6 @@
|
|||
<field name="object" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record id="view_picking_delivery_jorunal_search_form" model="ir.ui.view">
|
||||
<field name="name">stock.picking.journal.search</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="type">search</field>
|
||||
<field name="inherit_id" ref="stock.view_stock_delivery_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/search/group[@string='Group By...']/filter[@string='Partner']" position="after">
|
||||
<filter string="Picking Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_picking_out_jorunal_search_form" model="ir.ui.view">
|
||||
<field name="name">stock.picking.journal.search</field>
|
||||
<field name="model">stock.picking</field>
|
||||
|
|
|
@ -39,7 +39,7 @@ class report_stock_move(osv.osv):
|
|||
'product_id':fields.many2one('product.product', 'Product', readonly=True),
|
||||
'company_id':fields.many2one('res.company', 'Company', readonly=True),
|
||||
'picking_id':fields.many2one('stock.picking', 'Packing', readonly=True),
|
||||
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery'), ('other', 'Others')], 'Shipping Type', required=True, select=True, help="Shipping type specify, goods coming in or going out."),
|
||||
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('other', 'Others')], 'Shipping Type', required=True, select=True, help="Shipping type specify, goods coming in or going out."),
|
||||
'location_id': fields.many2one('stock.location', 'Source Location', readonly=True, select=True, help="Sets a location if you produce at a fixed location. This can be a partner location if you subcontract the manufacturing operations."),
|
||||
'location_dest_id': fields.many2one('stock.location', 'Dest. Location', readonly=True, select=True, help="Location where the system will stock the finished products."),
|
||||
'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True),
|
||||
|
@ -85,7 +85,7 @@ class report_stock_move(osv.osv):
|
|||
al.stock_journal as stock_journal,
|
||||
sum(al.in_value - al.out_value) as value
|
||||
FROM (SELECT
|
||||
CASE WHEN sp.type in ('out','delivery') THEN
|
||||
CASE WHEN sp.type in ('out') THEN
|
||||
sum(sm.product_qty * pu.factor)
|
||||
ELSE 0.0
|
||||
END AS out_qty,
|
||||
|
@ -93,7 +93,7 @@ class report_stock_move(osv.osv):
|
|||
sum(sm.product_qty * pu.factor)
|
||||
ELSE 0.0
|
||||
END AS in_qty,
|
||||
CASE WHEN sp.type in ('out','delivery') THEN
|
||||
CASE WHEN sp.type in ('out') THEN
|
||||
sum(sm.product_qty * pu.factor) * pt.standard_price
|
||||
ELSE 0.0
|
||||
END AS out_value,
|
||||
|
|
|
@ -96,7 +96,6 @@
|
|||
<filter icon="terp-go-home" name="in" string="Incoming" domain="[('type','=','in')]"/>
|
||||
<filter icon="terp-go-home" name="internal" string="Internal" domain="[('type','=','internal')]"/>
|
||||
<filter icon="terp-go-home" name="out" string="Outgoing" domain="[('type','=','out')]"/>
|
||||
<filter icon="terp-go-home" name="delivery" string="Deliveries" domain="[('type','=','delivery')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="product_id" default_focus="1"/>
|
||||
<field name="partner_id" context="{'contact_display':'partner'}"/>
|
||||
|
|
|
@ -186,7 +186,7 @@ class stock_location(osv.osv):
|
|||
"validated automatically. With 'Manual Operation', the stock move has to be validated "\
|
||||
"by a worker. With 'Automatic No Step Added', the location is replaced in the original move."
|
||||
),
|
||||
'chained_picking_type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery')], 'Shipping Type', help="Shipping Type of the Picking List that will contain the chained move (leave empty to automatically detect the type based on the source and destination locations)."),
|
||||
'chained_picking_type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], 'Shipping Type', help="Shipping Type of the Picking List that will contain the chained move (leave empty to automatically detect the type based on the source and destination locations)."),
|
||||
'chained_company_id': fields.many2one('res.company', 'Chained Company', help='The company the Picking List containing the chained move will belong to (leave empty to use the default company determination rules'),
|
||||
'chained_delay': fields.integer('Chaining Lead Time',help="Delay between original move and chained move in days"),
|
||||
'address_id': fields.many2one('res.partner.address', 'Location Address',help="Address of customer or supplier."),
|
||||
|
@ -242,7 +242,7 @@ class stock_location(osv.osv):
|
|||
"""
|
||||
result = 'internal'
|
||||
if (from_location.usage=='internal') and (to_location and to_location.usage in ('customer', 'supplier')):
|
||||
result = 'delivery'
|
||||
result = 'out'
|
||||
elif (from_location.usage in ('supplier', 'customer')) and (to_location.usage == 'internal'):
|
||||
result = 'in'
|
||||
return result
|
||||
|
@ -602,7 +602,7 @@ class stock_picking(osv.osv):
|
|||
'name': fields.char('Reference', size=64, select=True),
|
||||
'origin': fields.char('Origin', size=64, help="Reference of the document that produced this picking.", select=True),
|
||||
'backorder_id': fields.many2one('stock.picking', 'Back Order of', help="If this picking was split this field links to the picking that contains the other part that has been processed already.", select=True),
|
||||
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery')], 'Shipping Type', required=True, select=True, help="Shipping type specify, goods coming in or going out."),
|
||||
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], 'Shipping Type', required=True, select=True, help="Shipping type specify, goods coming in or going out."),
|
||||
'note': fields.text('Notes'),
|
||||
'stock_journal_id': fields.many2one('stock.journal','Stock Journal', select=True),
|
||||
'location_id': fields.many2one('stock.location', 'Location', help="Keep empty if you produce at the location where the finished products are needed." \
|
||||
|
@ -1251,7 +1251,6 @@ class stock_picking(osv.osv):
|
|||
'out':'Picking List',
|
||||
'in':'Reception',
|
||||
'internal': 'Internal picking',
|
||||
'delivery': 'Delivery order'
|
||||
}
|
||||
message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or 'n/a') + "' "
|
||||
if pick.min_date:
|
||||
|
@ -1652,10 +1651,15 @@ class stock_move(osv.osv):
|
|||
)
|
||||
if dest:
|
||||
if dest[1] == 'transparent':
|
||||
newdate = (datetime.strptime(m.date, '%Y-%m-%d %H:%M:%S') + relativedelta(days=dest[2] or 0)).strftime('%Y-%m-%d')
|
||||
self.write(cr, uid, [m.id], {
|
||||
'date': (datetime.strptime(m.date, '%Y-%m-%d %H:%M:%S') + \
|
||||
relativedelta(days=dest[2] or 0)).strftime('%Y-%m-%d'),
|
||||
'date': newdate,
|
||||
'location_dest_id': dest[0].id})
|
||||
m.location_dest_id = dest[0]
|
||||
res2 = self._chain_compute(cr, uid, [m], context=context)
|
||||
for pick_id in res2.keys():
|
||||
result.setdefault(pick_id, [])
|
||||
result[pick_id] += res2[pick_id]
|
||||
else:
|
||||
result.setdefault(m.picking_id, [])
|
||||
result[m.picking_id].append( (m, dest) )
|
||||
|
@ -1695,16 +1699,10 @@ class stock_move(osv.osv):
|
|||
for picking, todo in self._chain_compute(cr, uid, moves, context=context).items():
|
||||
ptype = todo[0][1][5] and todo[0][1][5] or self.pool.get('stock.location').picking_type_get(cr, uid, todo[0][0].location_dest_id, todo[0][1][0])
|
||||
pick_name = picking.name or ''
|
||||
if ptype == 'delivery':
|
||||
pick_name = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.delivery')
|
||||
check_picking_ids = picking_obj.search(cr, uid, [('name','=',picking.name),('origin','=',str(picking.origin or '')),('type','=',ptype),('move_type','=',picking.move_type)])
|
||||
if check_picking_ids:
|
||||
pickid = check_picking_ids[0]
|
||||
if picking:
|
||||
pickid = self._create_chained_picking(cr, uid, pick_name,picking,ptype,todo,context)
|
||||
else:
|
||||
if picking:
|
||||
pickid = self._create_chained_picking(cr, uid, pick_name,picking,ptype,todo,context)
|
||||
else:
|
||||
pickid = False
|
||||
pickid = False
|
||||
for move, (loc, auto, delay, journal, company_id, ptype) in todo:
|
||||
new_id = move_obj.copy(cr, uid, move.id, {
|
||||
'location_id': move.location_dest_id.id,
|
||||
|
|
|
@ -74,11 +74,17 @@
|
|||
<field name="usage">view</field>
|
||||
<field name="location_id" ref="stock_location_locations"/>
|
||||
</record>
|
||||
|
||||
<record id="journal_delivery" model="stock.journal">
|
||||
<field name="name">Delivery Orders</field>
|
||||
</record>
|
||||
<record id="stock_location_output" model="stock.location">
|
||||
<field name="name">Output</field>
|
||||
<field name="location_id" ref="stock_location_company"/>
|
||||
<field name="usage">internal</field>
|
||||
<field name="chained_location_type">customer</field>
|
||||
<field name="chained_picking_type">out</field>
|
||||
<field name="chained_journal_id" ref="journal_delivery"/>
|
||||
</record>
|
||||
<record id="stock_location_stock" model="stock.location">
|
||||
<field name="name">Stock</field>
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<data noupdate="1">
|
||||
|
||||
<!--
|
||||
Resource: stock.location
|
||||
-->
|
||||
Resource: stock.location
|
||||
-->
|
||||
<record id="stock_location_3" model="stock.location">
|
||||
<field name="name">IT Suppliers</field>
|
||||
<field name="location_id" ref="stock_location_suppliers"/>
|
||||
|
@ -30,30 +30,18 @@
|
|||
<field name="location_id" ref="stock_location_customers"/>
|
||||
<field name="usage">customer</field>
|
||||
</record>
|
||||
<record id="stock_location_13" model="stock.location">
|
||||
<field name="name">Stock Level 1</field>
|
||||
<field name="location_id" ref="stock_location_stock"/>
|
||||
</record>
|
||||
<record id="stock_location_14" model="stock.location">
|
||||
<field name="name">Shelf 2</field>
|
||||
<field name="location_id" ref="stock_location_13"/>
|
||||
</record>
|
||||
<record id="stock_location_15" model="stock.location">
|
||||
<field name="name">Sub Products</field>
|
||||
<field name="location_id" ref="stock_location_13"/>
|
||||
</record>
|
||||
<record id="stock_location_workshop" model="stock.location">
|
||||
<field name="name">Workshop</field>
|
||||
<field name="location_id" ref="stock_location_stock"/>
|
||||
</record>
|
||||
<record id="stock_location_components" model="stock.location">
|
||||
<field name="name">Shelf 1</field>
|
||||
<field name="location_id" ref="stock_location_workshop"/>
|
||||
<field name="location_id" ref="stock_location_stock"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Resource: stock.inventory
|
||||
-->
|
||||
Resource: stock.inventory
|
||||
-->
|
||||
|
||||
<record id="stock_inventory_0" model="stock.inventory">
|
||||
<field name="name">Starting Inventory</field>
|
||||
|
@ -62,8 +50,8 @@
|
|||
</record>
|
||||
|
||||
<!--
|
||||
Resource: stock.inventory.line
|
||||
-->
|
||||
Resource: stock.inventory.line
|
||||
-->
|
||||
|
||||
<record id="stock_inventory_line_0" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_pc1"/>
|
||||
|
@ -189,7 +177,7 @@
|
|||
<field eval="0" name="customer"/>
|
||||
<field eval="0" name="supplier"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval=""""Tiny Shop 1"""" name="name"/>
|
||||
<field eval=""""Shop 1"""" name="name"/>
|
||||
</record>
|
||||
<record id="res_partner_address_fabien0" model="res.partner.address">
|
||||
<field eval=""""Fabien"""" name="name"/>
|
||||
|
@ -206,7 +194,7 @@
|
|||
<field eval="1" name="customer"/>
|
||||
<field eval="0" name="supplier"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval=""""Tiny Shop 2"""" name="name"/>
|
||||
<field eval=""""Shop 2"""" name="name"/>
|
||||
</record>
|
||||
<record id="res_partner_address_eric0" model="res.partner.address">
|
||||
<field eval=""""Eric"""" name="name"/>
|
||||
|
@ -223,7 +211,7 @@
|
|||
</record>
|
||||
<record id="stock_location_shop0" model="stock.location">
|
||||
<field model="res.partner.address" name="address_id" search="[('name','=','Fabien')]"/>
|
||||
<field name="location_id" ref="stock.stock_location_company"/>
|
||||
<field name="location_id" ref="stock.stock_location_locations"/>
|
||||
<field name="company_id" ref="res_company_shop0"/>
|
||||
<field eval=""""internal"""" name="usage"/>
|
||||
<field eval=""""none"""" name="chained_location_type"/>
|
||||
|
@ -234,14 +222,14 @@
|
|||
<record id="stock_location_shop1" model="stock.location">
|
||||
<field model="res.partner.address" name="address_id" search="[('name','=','Eric')]"/>
|
||||
<field name="company_id" ref="res_company_tinyshop0"/>
|
||||
<field name="location_id" ref="stock.stock_location_company"/>
|
||||
<field name="location_id" ref="stock.stock_location_locations"/>
|
||||
<field eval=""""internal"""" name="usage"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval=""""Shop 2"""" name="name"/>
|
||||
</record>
|
||||
<record id="stock_location_intermediatelocation0" model="stock.location">
|
||||
<field name="address_id" ref="base.main_address"/>
|
||||
<field name="location_id" ref="stock.stock_location_company"/>
|
||||
<field name="location_id" ref="stock.stock_location_locations_partner"/>
|
||||
<field eval=""""procurement"""" name="usage"/>
|
||||
<field eval=""""Internal Shippings"""" name="name"/>
|
||||
</record>
|
||||
|
@ -263,13 +251,13 @@
|
|||
<field name="lot_input_id" ref="stock_location_shop1"/>
|
||||
</record>
|
||||
|
||||
<record forcecreate="True" id="property_stock_variation" model="ir.property">
|
||||
<record forcecreate="True" id="property_stock_variation" model="ir.property">
|
||||
<field name="name">property_stock_variation</field>
|
||||
<field name="fields_id" search="[('model','=','product.category'),('name','=','property_stock_variation')]"/>
|
||||
<field eval="'account.account,'+str(ref('account.a_recv'))" model="account.account" name="value"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="'account.account,'+str(ref('account.a_recv'))" model="account.account" name="value"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
</record>
|
||||
<record id="stock_picking_1" model="stock.picking">
|
||||
<record id="stock_picking_1" model="stock.picking">
|
||||
<field name="name">PACKO1</field>
|
||||
<field name="type">out</field>
|
||||
<field name="move_type">direct</field>
|
||||
|
|
|
@ -20,14 +20,9 @@
|
|||
<field name="code">stock.picking.internal</field>
|
||||
</record>
|
||||
|
||||
<record id="seq_type_picking_delivery" model="ir.sequence.type">
|
||||
<field name="name">Picking Delivery</field>
|
||||
<field name="code">stock.picking.delivery</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Sequences for pickings
|
||||
-->
|
||||
<!--
|
||||
Sequences for pickings
|
||||
-->
|
||||
|
||||
<record id="seq_picking_in" model="ir.sequence">
|
||||
<field name="name">Picking IN</field>
|
||||
|
@ -50,13 +45,6 @@
|
|||
<field name="padding">5</field>
|
||||
</record>
|
||||
|
||||
<record id="seq_picking_delivery" model="ir.sequence">
|
||||
<field name="name">Picking DLV</field>
|
||||
<field name="code">stock.picking.delivery</field>
|
||||
<field name="prefix">DLV/</field>
|
||||
<field name="padding">5</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Sequences from tracking numbers
|
||||
-->
|
||||
|
|
|
@ -798,224 +798,6 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_picking_delivery_tree" model="ir.ui.view">
|
||||
<field name="name">stock.picking.delivery.tree</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state in ('draft');grey:state in ('cancel');red:state not in ('cancel', 'done') and date < current_date" string="Picking list">
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="backorder_id" groups="base.group_extended"/>
|
||||
<field name="origin"/>
|
||||
<field name="date"/>
|
||||
<field name="min_date"/>
|
||||
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
|
||||
<field name="state"/>
|
||||
<button name="%(action_partial_picking)d" states="assigned" type="action" icon="gtk-go-forward" string="Approve Delivery"/>
|
||||
<button name="button_cancel" states="assigned,confirmed,draft" string="Cancel" icon="gtk-cancel" confirm="This operation will cancel the delivery. Do you want to continue?"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_picking_delivery_form" model="ir.ui.view">
|
||||
<field name="name">stock.picking.delivery.form</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Delivery Picking list">
|
||||
<group col="6" colspan="4" attrs="{'readonly': [('state','not in',['draft','auto'])]}">
|
||||
<group colspan="4" col="4">
|
||||
<field name="name" readonly="1"/>
|
||||
<field name="origin" readonly="1"/>
|
||||
<field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" required="1" colspan="4"/>
|
||||
<field name="invoice_state"/>
|
||||
<field name="backorder_id" readonly="1" groups="base.group_extended"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<field name="date"/>
|
||||
<field name="min_date" readonly="1"/>
|
||||
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Products">
|
||||
<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:scrapped == True" 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="product_uos" groups="product.product_uos"/>
|
||||
<button name="%(stock.move_scrap)d"
|
||||
string="Scrap Products" type="action"
|
||||
icon="gtk-convert" context="{'scrap': True}"
|
||||
states="draft,waiting,confirmed,assigned"
|
||||
groups="base.group_extended"/>
|
||||
<field name="scrapped" invisible="1"/>
|
||||
<field name="prodlot_id" groups="base.group_extended"/>
|
||||
<button
|
||||
name="%(stock.track_line)d"
|
||||
string="Split in production lots"
|
||||
type="action" icon="terp-stock_effects-object-colorize"
|
||||
groups="base.group_extended"
|
||||
states="draft,waiting,confirmed,assigned" />
|
||||
<field groups="base.group_extended" name="tracking_id"/>
|
||||
<button name="setlast_tracking" string="Put in current pack" type="object"
|
||||
attrs="{'invisible': [('tracking_id','<>',False)]}"
|
||||
groups="base.group_extended"
|
||||
icon="terp-stock_effects-object-colorize"
|
||||
states="draft,assigned,confirmed,done"/>
|
||||
<button name="%(split_into)d" string="Put in a new pack" type="action"
|
||||
icon="terp-stock_effects-object-colorize"
|
||||
states="draft,assigned,confirmed,done"
|
||||
groups="base.group_extended"/>
|
||||
<field name="location_id"/>
|
||||
<field name="location_dest_id"/>
|
||||
<field name="date"/>
|
||||
<field name="date_expected" string="Date Expected"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
<form string="Stock Moves">
|
||||
<group colspan="2" col="4">
|
||||
<separator colspan="2" string="Move Information"/>
|
||||
<field name="name" invisible="1" colspan="4"/>
|
||||
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id)" colspan="4"/>
|
||||
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="3"/>
|
||||
<button name="%(stock.move_scrap)d"
|
||||
string="Scrap" type="action" groups="base.group_extended"
|
||||
icon="gtk-convert" context="{'scrap': True}"
|
||||
states="draft,waiting,confirmed,assigned" colspan="1"/>
|
||||
<field name="product_uom" string="Unit Of Measure" widget="selection" colspan="4"/>
|
||||
<field name="product_uos_qty" groups="product.product_uos" colspan="4"/>
|
||||
<field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="4"/>
|
||||
<field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]" colspan="4"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Locations" colspan="2" />
|
||||
<field name="location_id" domain="[('usage','=','internal')]" />
|
||||
<field name="location_dest_id" domain="[('usage','<>','view')]" />
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Dates" colspan="2" />
|
||||
<field name="create_date" invisible="1"/>
|
||||
<field name="date"/>
|
||||
<field name="date_expected"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="4" groups="base.group_extended">
|
||||
<separator string="Traceability" colspan="4" groups="base.group_extended"/>
|
||||
<field name="tracking_id" groups="base.group_extended" colspan="3"/>
|
||||
<button name="%(split_into)d" string="New pack" type="action"
|
||||
groups="base.group_extended"
|
||||
icon="terp-stock_effects-object-colorize"
|
||||
states="draft,assigned,confirmed,done" colspan="1"/>
|
||||
<field name="prodlot_id" groups="base.group_extended"
|
||||
context="{'location_id':location_id, 'product_id':product_id}"
|
||||
domain="[('product_id','=?',product_id)]"
|
||||
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)" colspan="3"/>
|
||||
<button name="%(track_line)d"
|
||||
groups="base.group_extended"
|
||||
states="draft,waiting,confirmed,assigned,done"
|
||||
string="Split" type="action" icon="terp-stock_effects-object-colorize" colspan="1" />
|
||||
</group>
|
||||
<label string="" colspan="4"/>
|
||||
<field name="state"/>
|
||||
<group col="4" colspan="2">
|
||||
<button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
|
||||
<button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
|
||||
<button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/>
|
||||
<button name="action_cancel" states="assigned" string="Cancel" type="object" icon="gtk-cancel"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
<group col="10" colspan="4">
|
||||
<field name="state" readonly="1"/>
|
||||
<button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-ok"/>
|
||||
<button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-media-play"/>
|
||||
<button name="action_assign" states="confirmed" string="Check Availability" type="object" icon="gtk-find"/>
|
||||
<button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
|
||||
<button name="%(action_partial_picking)d" states="assigned" string="Products Sent" type="action" icon="gtk-go-forward"/>
|
||||
<button name="%(action_stock_invoice_onshipping)d" string="Create Invoice" type="action" icon="terp-document-new" attrs="{'invisible':[('invoice_state','!=','2binvoiced')]}"/>
|
||||
<button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Additional info" groups="base.group_extended,base.group_multi_company">
|
||||
<field name="auto_picking" groups="base.group_extended"/>
|
||||
<field name="date_done" groups="base.group_extended"/>
|
||||
<field name="move_type" groups="base.group_extended"/>
|
||||
<field name="type" groups="base.group_extended"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field colspan="4" name="note" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_stock_delivery_filter" model="ir.ui.view">
|
||||
<field name="name">stock.view_stock_delivery_filter.list.select</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Stock Delivery">
|
||||
<group col="10" colspan="4">
|
||||
<filter icon="terp-check" name="available" string="Available" domain="[('state','=','assigned')]" help="Assigned Orders" />
|
||||
<filter icon="terp-camera_test" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Orders"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-accessories-archiver-minus" string="Back Orders" domain="[('backorder_id','!=',False)]" help="Is a Back Order" groups="base.group_extended"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="origin"/>
|
||||
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="10">
|
||||
<filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Journal" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'stock_journal_id'}" groups="base.group_extended"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_picking_tree_delivery" model="ir.actions.act_window">
|
||||
<field name="name">Delivery Orders</field>
|
||||
<field name="res_model">stock.picking</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar</field>
|
||||
<field name="domain">[('type','=','delivery')]</field>
|
||||
<field name="context">{'contact_display': 'partner_address',"search_default_available":1}</field>
|
||||
<field name="search_view_id" ref="view_stock_delivery_filter"/>
|
||||
</record>
|
||||
<record id="action_picking_tree_delivery_view1" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_picking_delivery_tree"/>
|
||||
<field name="act_window_id" ref="action_picking_tree_delivery"/>
|
||||
</record>
|
||||
<record id="action_picking_tree_delivery_view2" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_picking_delivery_form"/>
|
||||
<field name="act_window_id" ref="action_picking_tree_delivery"/>
|
||||
</record>
|
||||
<record id="action_picking_tree_delivery_view2_calendar" model="ir.actions.act_window.view">
|
||||
<field eval="3" name="sequence"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="act_window_id" ref="action_picking_tree_delivery"/>
|
||||
</record>
|
||||
<menuitem action="action_picking_tree_delivery" id="menu_action_picking_tree_delivery" parent="menu_stock_warehouse_mgmt" sequence="7"/>
|
||||
|
||||
<!--
|
||||
#
|
||||
# Sending Products
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
-
|
||||
!python {model: stock.location}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.lot.stock.overview_all').create(cr, uid, [ref('stock.stock_location_13')], {}, {})
|
||||
(data, format) = netsvc.LocalService('report.lot.stock.overview_all').create(cr, uid, [ref('stock.stock_location_stock')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'stock-overviewall'+format), 'wb+').write(data)
|
||||
-
|
||||
|
|
|
@ -38,7 +38,7 @@ class stock_partial_move(osv.osv_memory):
|
|||
context={}
|
||||
for m in move_obj.browse(cr, uid, context.get('active_ids', [])):
|
||||
if m.state in ('done', 'cancel'):
|
||||
raise osv.except_osv(_('Invalid action !'), _('Cannot delivery products which are already delivered !'))
|
||||
raise osv.except_osv(_('Invalid action !'), _('Cannot deliver products which are already delivered !'))
|
||||
|
||||
|
||||
if 'move%s_product_id'%(m.id) not in self._columns:
|
||||
|
|
|
@ -63,7 +63,7 @@ class stock_partial_picking(osv.osv_memory):
|
|||
_moves_arch_lst = """<form string="Deliver Products">
|
||||
<separator colspan="4" string="Delivery Information"/>
|
||||
<group colspan="4" col="4">
|
||||
<field name="date"/>
|
||||
<field name="date"/>
|
||||
</group>
|
||||
<separator colspan="4" string="Move Detail"/>
|
||||
"""
|
||||
|
|
|
@ -76,16 +76,18 @@ product (i.e. the destination location of that procurement order).
|
|||
|
||||
""",
|
||||
'author': 'OpenERP SA',
|
||||
'depends': ['procurement','stock'],
|
||||
'depends': ['procurement','stock','sale'],
|
||||
'init_xml': [],
|
||||
'update_xml': ['stock_location_view.xml', 'security/ir.model.access.csv', 'mrp_pull_workflow.xml'],
|
||||
'demo_xml': ['stock_location_demo.xml',],
|
||||
|
||||
'demo_xml': [
|
||||
'stock_location_demo_cpu1.xml',
|
||||
'stock_location_demo_cpu3.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'test':[''
|
||||
'test/stock_location_pull_flow.yml',
|
||||
'test/stock_location_push_flow.yml',
|
||||
],
|
||||
'test':[
|
||||
# 'test/stock_location_pull_flow.yml',
|
||||
# 'test/stock_location_push_flow.yml',
|
||||
],
|
||||
'active': False,
|
||||
'certificate': '0046505115101',
|
||||
}
|
||||
|
|
|
@ -26,20 +26,21 @@ import pooler
|
|||
|
||||
class stock_location_path(osv.osv):
|
||||
_name = "stock.location.path"
|
||||
_description = "Pushed Flows"
|
||||
_columns = {
|
||||
'name': fields.char('Operation', size=64),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
'product_id' : fields.many2one('product.product', 'Products', ondelete='cascade', select=1),
|
||||
'journal_id': fields.many2one('stock.journal','Journal'),
|
||||
'location_from_id' : fields.many2one('stock.location', 'Source Location', ondelete='cascade', select=1),
|
||||
'location_dest_id' : fields.many2one('stock.location', 'Destination Location', ondelete='cascade', select=1),
|
||||
'location_from_id' : fields.many2one('stock.location', 'Source Location', ondelete='cascade', select=1, required=True),
|
||||
'location_dest_id' : fields.many2one('stock.location', 'Destination Location', ondelete='cascade', select=1, required=True),
|
||||
'delay': fields.integer('Delay (days)', help="Number of days to do this transition"),
|
||||
'invoice_state': fields.selection([
|
||||
("invoiced", "Invoiced"),
|
||||
("2binvoiced", "To Be Invoiced"),
|
||||
("none", "Not from Picking")], "Invoice Status",
|
||||
required=True,),
|
||||
'picking_type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal'),('delivery','Delivery')], 'Shipping Type', required=True, select=True, help="Depending on the company, choose whatever you want to receive or send products"),
|
||||
'picking_type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal')], 'Shipping Type', required=True, select=True, help="Depending on the company, choose whatever you want to receive or send products"),
|
||||
'auto': fields.selection(
|
||||
[('auto','Automatic Move'), ('manual','Manual Operation'),('transparent','Automatic No Step Added')],
|
||||
'Automatic Move',
|
||||
|
@ -71,7 +72,7 @@ class product_pulled_flow(osv.osv):
|
|||
'type_proc': fields.selection([('produce','Produce'),('buy','Buy'),('move','Move')], 'Type of Procurement', required=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', help="Is used to know to which company belong packings and moves"),
|
||||
'partner_address_id': fields.many2one('res.partner.address', 'Partner Address'),
|
||||
'picking_type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal'),('delivery','Delivery')], 'Shipping Type', required=True, select=True, help="Depending on the company, choose whatever you want to receive or send products"),
|
||||
'picking_type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal')], 'Shipping Type', required=True, select=True, help="Depending on the company, choose whatever you want to receive or send products"),
|
||||
'product_id':fields.many2one('product.product','Product'),
|
||||
'invoice_state': fields.selection([
|
||||
("invoiced", "Invoiced"),
|
||||
|
|
|
@ -4,86 +4,89 @@
|
|||
<record id="product.product_product_cpu1" model="product.product">
|
||||
<field name="description">This product is configured with example of push/pull flows</field>
|
||||
</record>
|
||||
<record id="stock_location_input0" model="stock.location">
|
||||
<field name="location_id" ref="stock.stock_location_company"/>
|
||||
<field eval="0" name="scrap_location"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="usage">internal</field>
|
||||
<field name="chained_location_type">none</field>
|
||||
<field name="name">Input</field>
|
||||
<field name="chained_auto_packing">manual</field>
|
||||
<record id="stock_journal_quality" model="stock.journal">
|
||||
<field name="name">Quality Control</field>
|
||||
</record>
|
||||
|
||||
<record id="stock_location_qualitytest0" model="stock.location">
|
||||
<field name="location_id" ref="stock.stock_location_company"/>
|
||||
<field eval="0" name="scrap_location"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="usage">internal</field>
|
||||
<field name="chained_location_type">none</field>
|
||||
<field name="name">Quality test</field>
|
||||
<field name="name">Quality Control</field>
|
||||
<field name="chained_auto_packing">manual</field>
|
||||
</record>
|
||||
<record id="stock.warehouse0" model="stock.warehouse">
|
||||
<field name="lot_input_id" ref="stock_location_input0"/>
|
||||
</record>
|
||||
<record id="stock_location_path_3" model="stock.location.path">
|
||||
<field name="location_from_id" ref="stock.stock_location_suppliers"/>
|
||||
<field name="product_id" ref="product.product_product_cpu1"/>
|
||||
<field name="auto">auto</field>
|
||||
<field name="invoice_state">none</field>
|
||||
<field eval="1" name="delay"/>
|
||||
<field model="stock.location" name="location_dest_id" search="[('name', '=', u'Input')]"/>
|
||||
<field name="picking_type">out</field>
|
||||
</record>
|
||||
<record id="stock_location_path_4" model="stock.location.path">
|
||||
<field model="stock.location" name="location_from_id" search="[('name', '=', u'Input')]"/>
|
||||
<field name="product_id" ref="product.product_product_cpu1"/>
|
||||
<field name="auto">auto</field>
|
||||
<field name="auto">transparent</field>
|
||||
<field name="invoice_state">none</field>
|
||||
<field eval="1" name="delay"/>
|
||||
<field model="stock.location" name="location_dest_id" search="[('name', '=', u'Quality test')]"/>
|
||||
<field name="picking_type">out</field>
|
||||
<field name="name">Receptions to Quality Control</field>
|
||||
<field name="location_dest_id" ref="stock_location_qualitytest0"/>
|
||||
<field name="location_from_id" ref="stock.stock_location_stock"/>
|
||||
<field name="picking_type">in</field>
|
||||
</record>
|
||||
<record id="stock_location_path_5" model="stock.location.path">
|
||||
<field model="stock.location" name="location_from_id" search="[('name', '=', u'Quality test')]"/>
|
||||
<field name="location_from_id" ref="stock_location_qualitytest0"/>
|
||||
<field name="product_id" ref="product.product_product_cpu1"/>
|
||||
<field name="auto">auto</field>
|
||||
<field name="auto">manual</field>
|
||||
<field name="invoice_state">none</field>
|
||||
<field name="journal_id" ref="stock_journal_quality"/>
|
||||
<field name="name">Store in Shelf</field>
|
||||
<field eval="5" name="delay"/>
|
||||
<field name="location_dest_id" ref="stock.stock_location_stock"/>
|
||||
<field name="picking_type">out</field>
|
||||
<field name="location_dest_id" ref="stock.stock_location_14"/>
|
||||
<field name="picking_type">internal</field>
|
||||
</record>
|
||||
|
||||
<record id="product_pulled_flow_l0" model="product.pulled.flow">
|
||||
<field name="product_id" ref="product.product_product_cpu1"/>
|
||||
<field name="location_src_id" ref="stock.stock_location_stock"/>
|
||||
<field name="location_src_id" ref="stock.stock_location_intermediatelocation0"/>
|
||||
<field name="location_id" ref="stock.stock_location_shop0"/>
|
||||
<field name="partner_address_id" ref="base.main_address"/>
|
||||
<field name="invoice_state">none</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="company_id" ref="stock.res_company_shop0"/>
|
||||
<field name="type_proc">move</field>
|
||||
<field eval="0" name="cancel_cascade"/>
|
||||
<field name="procure_method">make_to_stock</field>
|
||||
<field name="picking_type">internal</field>
|
||||
<field name="name">L001</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="picking_type">in</field>
|
||||
<field name="name">Receive from Warehouse</field>
|
||||
</record>
|
||||
<record id="product_pulled_flow_l1" model="product.pulled.flow">
|
||||
<field name="product_id" ref="product.product_product_cpu1"/>
|
||||
<field name="location_id" ref="stock.stock_location_suppliers"/>
|
||||
<field name="location_id" ref="stock.stock_location_intermediatelocation0"/>
|
||||
<field name="location_src_id" ref="stock.stock_location_stock"/>
|
||||
<field name="partner_address_id" ref="stock.res_partner_address_fabien0"/>
|
||||
<field name="type_proc">move</field>
|
||||
<field name="invoice_state">none</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="type_proc">buy</field>
|
||||
<field eval="0" name="cancel_cascade"/>
|
||||
<field name="procure_method">make_to_stock</field>
|
||||
<field name="picking_type">out</field>
|
||||
<field name="name">L002</field>
|
||||
<field name="name">Deliver Shop</field>
|
||||
</record>
|
||||
<record id="stock_warehouse_orderpoint_shop1_cpu1" model="stock.warehouse.orderpoint">
|
||||
<field name="product_max_qty">20.0</field>
|
||||
<field name="product_min_qty">10.0</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="company_id" ref="stock.res_company_shop0"/>
|
||||
<field name="warehouse_id" ref="stock.stock_warehouse_shop0"/>
|
||||
<field name="location_id" ref="stock.stock_location_shop0"/>
|
||||
<field model="product.product" name="product_id" ref="product.product_product_cpu1"/>
|
||||
</record>
|
||||
|
||||
<record id="sale_shop1" model="sale.shop">
|
||||
<field name="name">Shop 1</field>
|
||||
<field name="warehouse_id" ref="stock.stock_warehouse_shop0"/>
|
||||
<field name="company_id" ref="stock.res_company_shop0"/>
|
||||
<field model="account.payment.term" name="payment_default_id" search="[]"/>
|
||||
</record>
|
||||
<record id="sale_shop2" model="sale.shop">
|
||||
<field name="name">Shop 2</field>
|
||||
<field name="warehouse_id" ref="stock.stock_warehouse_shop1"/>
|
||||
<field name="company_id" ref="stock.res_company_tinyshop0"/>
|
||||
<field model="account.payment.term" name="payment_default_id" search="[]"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,55 @@
|
|||
-
|
||||
!record {model: stock.journal, id: journal_pick}:
|
||||
name: Pick List
|
||||
-
|
||||
!record {model: stock.journal, id: journal_pack}:
|
||||
name: Packing
|
||||
-
|
||||
!record {model: stock.journal, id: journal_gate_a}:
|
||||
name: Delivery Gate A
|
||||
-
|
||||
!record {model: stock.journal, id: journal_gate_b}:
|
||||
name: Delivery Gate B
|
||||
-
|
||||
!record {model: stock.location, id: location_order}:
|
||||
name: Order Processing
|
||||
usage: internal
|
||||
location_id: stock.stock_location_company
|
||||
-
|
||||
!record {model: stock.location, id: location_dispatch_zone}:
|
||||
name: Dispatch Zone
|
||||
usage: internal
|
||||
location_id: location_order
|
||||
-
|
||||
!record {model: stock.location, id: location_gate_a}:
|
||||
name: Gate A
|
||||
usage: internal
|
||||
location_id: location_dispatch_zone
|
||||
chained_journal_id: journal_gate_a
|
||||
chained_location_type: customer
|
||||
chained_auto_packing: manual
|
||||
chained_picking_type: out
|
||||
-
|
||||
!record {model: stock.location, id: location_pack_zone}:
|
||||
name: Pack Zone
|
||||
usage: internal
|
||||
location_id: location_order
|
||||
chained_journal_id: journal_pack
|
||||
chained_location_id: location_gate_a
|
||||
chained_location_type: fixed
|
||||
chained_auto_packing: manual
|
||||
chained_picking_type: internal
|
||||
-
|
||||
!record {model: stock.location, id: location_gate_b}:
|
||||
name: Gate B
|
||||
usage: internal
|
||||
location_id: location_dispatch_zone
|
||||
-
|
||||
!record {model: stock.location.path, id: push_pick}:
|
||||
name: Pick List
|
||||
product_id: product.product_product_cpu3
|
||||
journal_id: journal_pick
|
||||
location_from_id: stock.stock_location_output
|
||||
location_dest_id: location_pack_zone
|
||||
picking_type: internal
|
||||
auto: transparent
|
|
@ -43,10 +43,11 @@
|
|||
<page string="Logistic Flow">
|
||||
<field name="flow_pull_ids" editable="bottom" colspan="4" nolabel="1">
|
||||
<tree string="Pulled flows">
|
||||
<field name="location_id"/>
|
||||
<field name="type_proc"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="name"/>
|
||||
<field name="location_id"/>
|
||||
<field name="type_proc"/>
|
||||
<field name="name"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="journal_id" groups="base.group_extended"/>
|
||||
</tree>
|
||||
<form string="Pulled Paths">
|
||||
<separator string="Conditions" colspan="4"/>
|
||||
|
@ -64,11 +65,12 @@
|
|||
<field name="procure_method"/>
|
||||
<field name="cancel_cascade"/>
|
||||
<field name="invoice_state"/>
|
||||
<field name="journal_id" groups="base.group_extended"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
<field name="path_ids" editable="bottom" colspan="4" nolabel="1">
|
||||
<field name="name"/>
|
||||
<field name="name"/>
|
||||
<tree string="Pushed flows" editable="bottom">
|
||||
<field name="location_from_id"/>
|
||||
<field name="location_dest_id"/>
|
||||
|
@ -86,13 +88,14 @@
|
|||
<field name="name"/>
|
||||
<field name="invoice_state"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="journal_id" groups="base.group_extended"/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
|
|
|
@ -47,12 +47,12 @@
|
|||
path_ids:
|
||||
- auto: auto
|
||||
invoice_state: none
|
||||
location_dest_id: stock_location.stock_location_input0
|
||||
location_dest_id: stock.stock_location_stock
|
||||
location_from_id: stock.stock_location_suppliers
|
||||
- auto: auto
|
||||
invoice_state: none
|
||||
location_dest_id: stock_location.stock_location_qualitytest0
|
||||
location_from_id: stock_location.stock_location_input0
|
||||
location_from_id: stock.stock_location_stock
|
||||
- auto: auto
|
||||
invoice_state: none
|
||||
location_dest_id: stock.stock_location_stock
|
||||
|
@ -73,7 +73,7 @@
|
|||
invoice_state: none
|
||||
move_lines:
|
||||
- date_expected: '2010-10-08 15:36:53'
|
||||
location_dest_id: stock_location.stock_location_input0
|
||||
location_dest_id: stock.stock_location_stock
|
||||
location_id: stock.stock_location_suppliers
|
||||
name: 'HP CD writers'
|
||||
product_id: product_product_hpcdwriters0
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
-
|
||||
!record {model: mrp.routing, id: mrp_routing_productionrouting0}:
|
||||
name: Production Routing
|
||||
location_id: stock.stock_location_13
|
||||
location_id: stock.stock_location_stock
|
||||
workcenter_lines:
|
||||
- cycle_nbr: 1.0
|
||||
hour_nbr: 0.5
|
||||
|
|
Loading…
Reference in New Issue