[IMP] Check other comments on pull request: xmlid, no split in context + continue improve receipts instead of receptions
This commit is contained in:
parent
db715f99f4
commit
0aad6b0498
|
@ -1925,7 +1925,7 @@
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search string="Search Account Templates">
|
<search string="Search Account Templates">
|
||||||
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Account Template"/>
|
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Account Template"/>
|
||||||
<filter icon="terp-sale" string="Receivale Accounts" domain="[('type','=','receivable')]"/>
|
<filter icon="terp-sale" string="Receivable Accounts" domain="[('type','=','receivable')]"/>
|
||||||
<filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
|
<filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
|
||||||
<field name="parent_id"/>
|
<field name="parent_id"/>
|
||||||
<field name="user_type"/>
|
<field name="user_type"/>
|
||||||
|
|
|
@ -136,7 +136,7 @@ class product_template(osv.Model):
|
||||||
def _rules_count(self, cr, uid, ids, field_name, arg, context=None):
|
def _rules_count(self, cr, uid, ids, field_name, arg, context=None):
|
||||||
Analytic = self.pool['account.analytic.default']
|
Analytic = self.pool['account.analytic.default']
|
||||||
res = {}
|
res = {}
|
||||||
for product_tmpl_id in self.browse(cr, uid, ids):
|
for product_tmpl_id in self.browse(cr, uid, ids, context=context):
|
||||||
res[product_tmpl_id.id] = sum([p.rules_count for p in product_tmpl_id.product_variant_ids])
|
res[product_tmpl_id.id] = sum([p.rules_count for p in product_tmpl_id.product_variant_ids])
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
@ -147,8 +147,9 @@ class product_template(osv.Model):
|
||||||
|
|
||||||
def action_view_rules(self, cr, uid, ids, context=None):
|
def action_view_rules(self, cr, uid, ids, context=None):
|
||||||
products = self._get_products(cr, uid, ids, context=context)
|
products = self._get_products(cr, uid, ids, context=context)
|
||||||
result = self._get_act_window_dict(cr, uid, 'account_analytic_default','action_product_default_list', context=context)
|
result = self._get_act_window_dict(cr, uid, 'account_analytic_default.action_product_default_list', context=context)
|
||||||
result['domain'] = "[('product_id','in',[" + ','.join(map(str, products)) + "])]"
|
result['domain'] = "[('product_id','in',[" + ','.join(map(str, products)) + "])]"
|
||||||
|
# Remove context so it is not going to filter on product_id with active_id of template
|
||||||
result['context'] = "{}"
|
result['context'] = "{}"
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@
|
||||||
-
|
-
|
||||||
!workflow {model: purchase.order, ref: purchase_order_001, action: purchase_confirm}
|
!workflow {model: purchase.order, ref: purchase_order_001, action: purchase_confirm}
|
||||||
-
|
-
|
||||||
Reception is ready for process so now done the reception.
|
Receipt is ready for process so now we do it.
|
||||||
-
|
-
|
||||||
!python {model: stock.picking}: |
|
!python {model: stock.picking}: |
|
||||||
picking_id = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001"), context=context).picking_ids[0]
|
picking_id = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001"), context=context).picking_ids[0]
|
||||||
|
|
|
@ -132,7 +132,7 @@
|
||||||
-
|
-
|
||||||
!workflow {model: purchase.order, ref: purchase_order_001_fifo, action: purchase_confirm}
|
!workflow {model: purchase.order, ref: purchase_order_001_fifo, action: purchase_confirm}
|
||||||
-
|
-
|
||||||
Reception is ready for process so now done the reception.
|
Receipt is ready for process so now we do it.
|
||||||
-
|
-
|
||||||
!python {model: stock.picking}: |
|
!python {model: stock.picking}: |
|
||||||
picking_id = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001_fifo"), context=context).picking_ids[0]
|
picking_id = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001_fifo"), context=context).picking_ids[0]
|
||||||
|
|
|
@ -1049,25 +1049,21 @@ class mrp_production(osv.osv):
|
||||||
return "make_to_order"
|
return "make_to_order"
|
||||||
return "make_to_stock"
|
return "make_to_stock"
|
||||||
|
|
||||||
def _create_previous_move(self, cr, uid, production, product, uom_id, qty, uos_id, uos_qty, source_location_id, dest_location_id, context=None):
|
def _create_previous_move(self, cr, uid, move_id, product, source_location_id, dest_location_id, context=None):
|
||||||
|
'''
|
||||||
|
When the routing gives a different location than the raw material location of the production order,
|
||||||
|
we should create an extra move from the raw material location to the location of the routing, which
|
||||||
|
precedes the consumption line (chained)
|
||||||
|
'''
|
||||||
stock_move = self.pool.get('stock.move')
|
stock_move = self.pool.get('stock.move')
|
||||||
move_id = stock_move.create(cr, uid, {
|
move = stock_move.copy(cr, uid, move_id, default = {
|
||||||
'name': production.name,
|
|
||||||
'date': production.date_planned,
|
|
||||||
'product_id': product.id,
|
|
||||||
'product_uom_qty': qty,
|
|
||||||
'product_uom': uom_id,
|
|
||||||
'product_uos_qty': uos_id and uos_qty or False,
|
|
||||||
'product_uos': uos_id or False,
|
|
||||||
'location_id': source_location_id,
|
'location_id': source_location_id,
|
||||||
'location_dest_id': dest_location_id,
|
'location_dest_id': dest_location_id,
|
||||||
'company_id': production.company_id.id,
|
|
||||||
'procure_method': self._get_raw_material_procure_method(cr, uid, product, context=context),
|
'procure_method': self._get_raw_material_procure_method(cr, uid, product, context=context),
|
||||||
#this saves us a browse in create()
|
'raw_material_production_id': False,
|
||||||
'price_unit': product.standard_price,
|
'move_dest_id': move_id,
|
||||||
'origin': production.name,
|
}, context=context)
|
||||||
})
|
return move
|
||||||
return move_id
|
|
||||||
|
|
||||||
def _make_consume_line_from_data(self, cr, uid, production, product, uom_id, qty, uos_id, uos_qty, context=None):
|
def _make_consume_line_from_data(self, cr, uid, production, product, uom_id, qty, uos_id, uos_qty, context=None):
|
||||||
stock_move = self.pool.get('stock.move')
|
stock_move = self.pool.get('stock.move')
|
||||||
|
@ -1076,14 +1072,13 @@ class mrp_production(osv.osv):
|
||||||
return False
|
return False
|
||||||
# Take routing location as a Source Location.
|
# Take routing location as a Source Location.
|
||||||
source_location_id = production.location_src_id.id
|
source_location_id = production.location_src_id.id
|
||||||
|
prod_location_id = source_location_id
|
||||||
prev_move= False
|
prev_move= False
|
||||||
if production.bom_id.routing_id and production.bom_id.routing_id.location_id and production.bom_id.routing_id.location_id.id != source_location_id:
|
if production.bom_id.routing_id and production.bom_id.routing_id.location_id and production.bom_id.routing_id.location_id.id != source_location_id:
|
||||||
source_location2_id = source_location_id
|
|
||||||
source_location_id = production.bom_id.routing_id.location_id.id
|
source_location_id = production.bom_id.routing_id.location_id.id
|
||||||
prev_move = self._create_previous_move(cr, uid, production, product, uom_id, qty, uos_id, uos_qty, source_location2_id, source_location_id, context=context)
|
prev_move = True
|
||||||
|
|
||||||
destination_location_id = production.product_id.property_stock_production.id
|
destination_location_id = production.product_id.property_stock_production.id
|
||||||
if not source_location_id:
|
|
||||||
source_location_id = production.location_src_id.id
|
|
||||||
move_id = stock_move.create(cr, uid, {
|
move_id = stock_move.create(cr, uid, {
|
||||||
'name': production.name,
|
'name': production.name,
|
||||||
'date': production.date_planned,
|
'date': production.date_planned,
|
||||||
|
@ -1100,9 +1095,10 @@ class mrp_production(osv.osv):
|
||||||
#this saves us a browse in create()
|
#this saves us a browse in create()
|
||||||
'price_unit': product.standard_price,
|
'price_unit': product.standard_price,
|
||||||
'origin': production.name,
|
'origin': production.name,
|
||||||
})
|
}, context=context)
|
||||||
|
|
||||||
if prev_move:
|
if prev_move:
|
||||||
stock_move.write(cr, uid, [prev_move], {'move_dest_id': move_id}, context=context)
|
prev_move = self._create_previous_move(cr, uid, move_id, product, prod_location_id, source_location_id, context=context)
|
||||||
return move_id
|
return move_id
|
||||||
|
|
||||||
def _make_production_consume_line(self, cr, uid, line, context=None):
|
def _make_production_consume_line(self, cr, uid, line, context=None):
|
||||||
|
|
|
@ -55,7 +55,7 @@ class product_template(osv.osv):
|
||||||
|
|
||||||
def action_view_mos(self, cr, uid, ids, context=None):
|
def action_view_mos(self, cr, uid, ids, context=None):
|
||||||
products = self._get_products(cr, uid, ids, context=context)
|
products = self._get_products(cr, uid, ids, context=context)
|
||||||
result = self._get_act_window_dict(cr, uid, 'mrp','act_product_mrp_production', context=context)
|
result = self._get_act_window_dict(cr, uid, 'mrp.act_product_mrp_production', context=context)
|
||||||
result['domain'] = "[('product_id','in',[" + ','.join(map(str, products)) + "])]"
|
result['domain'] = "[('product_id','in',[" + ','.join(map(str, products)) + "])]"
|
||||||
result['context'] = "{}"
|
result['context'] = "{}"
|
||||||
return result
|
return result
|
||||||
|
@ -80,7 +80,7 @@ class product_product(osv.osv):
|
||||||
products = set()
|
products = set()
|
||||||
for product in self.browse(cr, uid, ids, context=context):
|
for product in self.browse(cr, uid, ids, context=context):
|
||||||
products.add(product.product_tmpl_id.id)
|
products.add(product.product_tmpl_id.id)
|
||||||
result = tmpl_obj._get_act_window_dict(cr, uid, 'mrp','product_open_bom', context=context)
|
result = tmpl_obj._get_act_window_dict(cr, uid, 'mrp.product_open_bom', context=context)
|
||||||
result['context'] = "{}"
|
result['context'] = "{}"
|
||||||
result['domain'] = "[('product_tmpl_id','in',[" + ','.join(map(str, list(products))) + "])]"
|
result['domain'] = "[('product_tmpl_id','in',[" + ','.join(map(str, list(products))) + "])]"
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -86,8 +86,9 @@ class StockMove(osv.osv):
|
||||||
'state': state,
|
'state': state,
|
||||||
'name': line['name'],
|
'name': line['name'],
|
||||||
'procurement_id': move.procurement_id.id,
|
'procurement_id': move.procurement_id.id,
|
||||||
|
'split_from': move.id, #Needed in order to keep purchase connection, but will be removed by unlink
|
||||||
}
|
}
|
||||||
mid = move_obj.copy(cr, uid, move.id, default=valdef, context={'split': True})
|
mid = move_obj.copy(cr, uid, move.id, default=valdef)
|
||||||
to_explode_again_ids.append(mid)
|
to_explode_again_ids.append(mid)
|
||||||
|
|
||||||
#delete the move with original product which is not relevant anymore
|
#delete the move with original product which is not relevant anymore
|
||||||
|
|
|
@ -257,7 +257,7 @@
|
||||||
<li>Request for Quotation</li>
|
<li>Request for Quotation</li>
|
||||||
<li>Purchase order</li>
|
<li>Purchase order</li>
|
||||||
<li>Invoicing & Invoice control</li>
|
<li>Invoicing & Invoice control</li>
|
||||||
<li>Incoming order (Complete/partial receival)</li>
|
<li>Incoming order (Complete/partial receipt)</li>
|
||||||
<li>Purchase requisition</li>
|
<li>Purchase requisition</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
'version': '1.1',
|
'version': '1.1',
|
||||||
'category': 'Purchase Management',
|
'category': 'Purchase Management',
|
||||||
'sequence': 19,
|
'sequence': 19,
|
||||||
'summary': 'Purchase Orders, Receptions, Supplier Invoices',
|
'summary': 'Purchase Orders, Receipts, Supplier Invoices',
|
||||||
'description': """
|
'description': """
|
||||||
Manage goods requirement by Purchase Orders easily
|
Manage goods requirement by Purchase Orders easily
|
||||||
==================================================
|
==================================================
|
||||||
|
@ -40,7 +40,7 @@ Dashboard / Reports for Purchase Management will include:
|
||||||
* Request for Quotations
|
* Request for Quotations
|
||||||
* Purchase Orders Waiting Approval
|
* Purchase Orders Waiting Approval
|
||||||
* Monthly Purchases by Category
|
* Monthly Purchases by Category
|
||||||
* Receptions Analysis
|
* Receipt Analysis
|
||||||
* Purchase Analysis
|
* Purchase Analysis
|
||||||
""",
|
""",
|
||||||
'author': 'OpenERP SA',
|
'author': 'OpenERP SA',
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
This supplier has no purchase order. Click to create a new RfQ.
|
This supplier has no purchase order. Click to create a new RfQ.
|
||||||
</p><p>
|
</p><p>
|
||||||
The request for quotation is the first step of the purchases flow. Once
|
The request for quotation is the first step of the purchases flow. Once
|
||||||
converted into a purchase order, you will be able to control the reception
|
converted into a purchase order, you will be able to control the receipt
|
||||||
of the products and the supplier invoice.
|
of the products and the supplier invoice.
|
||||||
</p>
|
</p>
|
||||||
</field>
|
</field>
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
Click here to record a supplier invoice.
|
Click here to record a supplier invoice.
|
||||||
</p><p>
|
</p><p>
|
||||||
Supplier invoices can be pre-generated based on purchase
|
Supplier invoices can be pre-generated based on purchase
|
||||||
orders or receptions. This allows you to control invoices
|
orders or receipts. This allows you to control invoices
|
||||||
you receive from your supplier according to the draft
|
you receive from your supplier according to the draft
|
||||||
document in OpenERP.
|
document in OpenERP.
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -232,7 +232,7 @@ class purchase_order(osv.osv):
|
||||||
"to 'Confirmed'. Then the supplier must confirm the order to change "
|
"to 'Confirmed'. Then the supplier must confirm the order to change "
|
||||||
"the status to 'Approved'. When the purchase order is paid and "
|
"the status to 'Approved'. When the purchase order is paid and "
|
||||||
"received, the status becomes 'Done'. If a cancel action occurs in "
|
"received, the status becomes 'Done'. If a cancel action occurs in "
|
||||||
"the invoice or in the reception of goods, the status becomes "
|
"the invoice or in the receipt of goods, the status becomes "
|
||||||
"in exception.",
|
"in exception.",
|
||||||
select=True, copy=False),
|
select=True, copy=False),
|
||||||
'order_line': fields.one2many('purchase.order.line', 'order_id', 'Order Lines',
|
'order_line': fields.one2many('purchase.order.line', 'order_id', 'Order Lines',
|
||||||
|
@ -244,7 +244,7 @@ class purchase_order(osv.osv):
|
||||||
'invoice_ids': fields.many2many('account.invoice', 'purchase_invoice_rel', 'purchase_id',
|
'invoice_ids': fields.many2many('account.invoice', 'purchase_invoice_rel', 'purchase_id',
|
||||||
'invoice_id', 'Invoices', copy=False,
|
'invoice_id', 'Invoices', copy=False,
|
||||||
help="Invoices generated for a purchase order"),
|
help="Invoices generated for a purchase order"),
|
||||||
'picking_ids': fields.function(_get_picking_ids, method=True, type='one2many', relation='stock.picking', string='Picking List', help="This is the list of reception operations that have been generated for this purchase order."),
|
'picking_ids': fields.function(_get_picking_ids, method=True, type='one2many', relation='stock.picking', string='Picking List', help="This is the list of receipts that have been generated for this purchase order."),
|
||||||
'shipped':fields.boolean('Received', readonly=True, select=True, copy=False,
|
'shipped':fields.boolean('Received', readonly=True, select=True, copy=False,
|
||||||
help="It indicates that a picking has been done"),
|
help="It indicates that a picking has been done"),
|
||||||
'shipped_rate': fields.function(_shipped_rate, string='Received Ratio', type='float'),
|
'shipped_rate': fields.function(_shipped_rate, string='Received Ratio', type='float'),
|
||||||
|
@ -255,7 +255,7 @@ class purchase_order(osv.osv):
|
||||||
readonly=True, states={'draft':[('readonly',False)], 'sent':[('readonly',False)]},
|
readonly=True, states={'draft':[('readonly',False)], 'sent':[('readonly',False)]},
|
||||||
help="Based on Purchase Order lines: place individual lines in 'Invoice Control / On Purchase Order lines' from where you can selectively create an invoice.\n" \
|
help="Based on Purchase Order lines: place individual lines in 'Invoice Control / On Purchase Order lines' from where you can selectively create an invoice.\n" \
|
||||||
"Based on generated invoice: create a draft invoice you can validate later.\n" \
|
"Based on generated invoice: create a draft invoice you can validate later.\n" \
|
||||||
"Based on incoming shipments: let you create an invoice when receptions are validated."
|
"Based on incoming shipments: let you create an invoice when receipts are validated."
|
||||||
),
|
),
|
||||||
'minimum_planned_date':fields.function(_minimum_planned_date, fnct_inv=_set_minimum_planned_date, string='Expected Date', type='date', select=True, help="This is computed as the minimum scheduled date of all purchase order lines' products.",
|
'minimum_planned_date':fields.function(_minimum_planned_date, fnct_inv=_set_minimum_planned_date, string='Expected Date', type='date', select=True, help="This is computed as the minimum scheduled date of all purchase order lines' products.",
|
||||||
store = {
|
store = {
|
||||||
|
@ -678,7 +678,7 @@ class purchase_order(osv.osv):
|
||||||
if pick.state not in ('draft', 'cancel'):
|
if pick.state not in ('draft', 'cancel'):
|
||||||
raise osv.except_osv(
|
raise osv.except_osv(
|
||||||
_('Unable to cancel the purchase order %s.') % (purchase.name),
|
_('Unable to cancel the purchase order %s.') % (purchase.name),
|
||||||
_('First cancel all receptions related to this purchase order.'))
|
_('First cancel all receipts related to this purchase order.'))
|
||||||
self.pool.get('stock.picking') \
|
self.pool.get('stock.picking') \
|
||||||
.signal_workflow(cr, uid, map(attrgetter('id'), purchase.picking_ids), 'button_cancel')
|
.signal_workflow(cr, uid, map(attrgetter('id'), purchase.picking_ids), 'button_cancel')
|
||||||
for inv in purchase.invoice_ids:
|
for inv in purchase.invoice_ids:
|
||||||
|
@ -1404,7 +1404,7 @@ class product_template(osv.Model):
|
||||||
|
|
||||||
def action_view_purchases(self, cr, uid, ids, context=None):
|
def action_view_purchases(self, cr, uid, ids, context=None):
|
||||||
products = self._get_products(cr, uid, ids, context=context)
|
products = self._get_products(cr, uid, ids, context=context)
|
||||||
result = self._get_act_window_dict(cr, uid, 'purchase','action_purchase_line_product_tree', context=context)
|
result = self._get_act_window_dict(cr, uid, 'purchase.action_purchase_line_product_tree', context=context)
|
||||||
result['domain'] = "[('product_id','in',[" + ','.join(map(str, products)) + "])]"
|
result['domain'] = "[('product_id','in',[" + ','.join(map(str, products)) + "])]"
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
@ -1438,7 +1438,7 @@ class mail_compose_message(osv.Model):
|
||||||
|
|
||||||
class account_invoice(osv.Model):
|
class account_invoice(osv.Model):
|
||||||
""" Override account_invoice to add Chatter messages on the related purchase
|
""" Override account_invoice to add Chatter messages on the related purchase
|
||||||
orders, logging the invoice reception or payment. """
|
orders, logging the invoice receipt or payment. """
|
||||||
_inherit = 'account.invoice'
|
_inherit = 'account.invoice'
|
||||||
|
|
||||||
def invoice_validate(self, cr, uid, ids, context=None):
|
def invoice_validate(self, cr, uid, ids, context=None):
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
<!--Inventory control-->
|
<!--Inventory control-->
|
||||||
<menuitem id="menu_procurement_management_inventory" name="Incoming Products"
|
<menuitem id="menu_procurement_management_inventory" name="Incoming Products"
|
||||||
parent="base.menu_purchase_root" sequence="4"/>
|
parent="base.menu_purchase_root" sequence="4"/>
|
||||||
<menuitem action="stock.action_reception_picking_move" id="menu_action_picking_tree_in_move"
|
<menuitem action="stock.action_receipt_picking_move" id="menu_action_picking_tree_in_move"
|
||||||
parent="menu_procurement_management_inventory" sequence="11"/>
|
parent="menu_procurement_management_inventory" sequence="11"/>
|
||||||
|
|
||||||
<!--Invoice control-->
|
<!--Invoice control-->
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
</p><p>
|
</p><p>
|
||||||
Use this menu to control the invoices to be received from your
|
Use this menu to control the invoices to be received from your
|
||||||
supplier. OpenERP generates draft invoices from your purchase
|
supplier. OpenERP generates draft invoices from your purchase
|
||||||
orders or receptions, according to your settings.
|
orders or receipts, according to your settings.
|
||||||
</p><p>
|
</p><p>
|
||||||
Once you receive a supplier invoice, you can match it with the
|
Once you receive a supplier invoice, you can match it with the
|
||||||
draft invoice and validate it.
|
draft invoice and validate it.
|
||||||
|
|
|
@ -48,7 +48,7 @@ class stock_move(osv.osv):
|
||||||
def copy(self, cr, uid, id, default=None, context=None):
|
def copy(self, cr, uid, id, default=None, context=None):
|
||||||
default = default or {}
|
default = default or {}
|
||||||
context = context or {}
|
context = context or {}
|
||||||
if not default.get('split_from') and not context.get('split'):
|
if not default.get('split_from'):
|
||||||
#we don't want to propagate the link to the purchase order line except in case of move split
|
#we don't want to propagate the link to the purchase order line except in case of move split
|
||||||
default['purchase_line_id'] = False
|
default['purchase_line_id'] = False
|
||||||
return super(stock_move, self).copy(cr, uid, id, default, context)
|
return super(stock_move, self).copy(cr, uid, id, default, context)
|
||||||
|
@ -102,7 +102,7 @@ class stock_picking(osv.osv):
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'reception_to_invoice': fields.function(_get_to_invoice, type='boolean', string='Invoiceable on incoming shipment?',
|
'reception_to_invoice': fields.function(_get_to_invoice, type='boolean', string='Invoiceable on incoming shipment?',
|
||||||
help='Does the picking contains some moves related to a purchase order invoiceable on the reception?',
|
help='Does the picking contains some moves related to a purchase order invoiceable on the receipt?',
|
||||||
store={
|
store={
|
||||||
'stock.move': (_get_picking_to_recompute, ['purchase_line_id', 'picking_id'], 10),
|
'stock.move': (_get_picking_to_recompute, ['purchase_line_id', 'picking_id'], 10),
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -72,10 +72,10 @@
|
||||||
<p class="oe_view_nocontent_create">
|
<p class="oe_view_nocontent_create">
|
||||||
Click to create a new incoming shipment.
|
Click to create a new incoming shipment.
|
||||||
</p><p>
|
</p><p>
|
||||||
Here you can track all the product receptions of purchase
|
Here you can track all the product receipts of purchase
|
||||||
orders where the invoicing is "Based on Incoming Shipments",
|
orders where the invoicing is "Based on Incoming Shipments",
|
||||||
and for which you have not received a supplier invoice yet.
|
and for which you have not received a supplier invoice yet.
|
||||||
You can generate a supplier invoice based on those receptions.
|
You can generate a supplier invoice based on those receipts.
|
||||||
</p>
|
</p>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -1287,9 +1287,8 @@ class product_template(osv.Model):
|
||||||
product_ids = []
|
product_ids = []
|
||||||
for template in self.browse(cr, uid, ids, context=context):
|
for template in self.browse(cr, uid, ids, context=context):
|
||||||
product_ids += [x.id for x in template.product_variant_ids]
|
product_ids += [x.id for x in template.product_variant_ids]
|
||||||
result = mod_obj.get_object_reference(cr, uid, 'sale', 'action_order_line_product_tree')
|
result = mod_obj.xmlid_to_res_id(cr, uid, 'sale.action_order_line_product_tree',raise_if_not_found=True)
|
||||||
id = result and result[1] or False
|
result = act_obj.read(cr, uid, [result], context=context)[0]
|
||||||
result = act_obj.read(cr, uid, [id], context=context)[0]
|
|
||||||
result['domain'] = "[('product_id','in',[" + ','.join(map(str, product_ids)) + "])]"
|
result['domain'] = "[('product_id','in',[" + ','.join(map(str, product_ids)) + "])]"
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ To satisfy the need for a counterpart to each stock movement, the software suppo
|
||||||
* Partner locations (suppliers and customers),
|
* Partner locations (suppliers and customers),
|
||||||
* Virtual locations as counterparts for production, inventory and scrap.
|
* Virtual locations as counterparts for production, inventory and scrap.
|
||||||
|
|
||||||
Partner locations represent your customers' and suppliers' stocks. To reconcile them with your accounts, these stores play the role of third-party accounts. Reception from a supplier can be shown by the movement of goods from a partner location to a physical location in your own company. As you see, supplier locations usually show negative stocks and customer locations usually show positive stocks.
|
Partner locations represent your customers' and suppliers' stocks. To reconcile them with your accounts, these stores play the role of third-party accounts. Receipt from a supplier can be shown by the movement of goods from a partner location to a physical location in your own company. As you see, supplier locations usually show negative stocks and customer locations usually show positive stocks.
|
||||||
|
|
||||||
Virtual locations as counterparts for production are used in manufacturing operations. Manufacturing is characterized by the consumption of raw materials and the production of finished products. Virtual locations are used for the counterparts of these two operations.
|
Virtual locations as counterparts for production are used in manufacturing operations. Manufacturing is characterized by the consumption of raw materials and the production of finished products. Virtual locations are used for the counterparts of these two operations.
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,7 @@ class product_product(osv.osv):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'reception_count': fields.function(_stock_move_count, string="Reception", type='integer', multi='pickings'),
|
'reception_count': fields.function(_stock_move_count, string="Receipt", type='integer', multi='pickings'),
|
||||||
'delivery_count': fields.function(_stock_move_count, string="Delivery", type='integer', multi='pickings'),
|
'delivery_count': fields.function(_stock_move_count, string="Delivery", type='integer', multi='pickings'),
|
||||||
'qty_available_text': fields.function(_product_available_text, type='char'),
|
'qty_available_text': fields.function(_product_available_text, type='char'),
|
||||||
'qty_available': fields.function(_product_available, multi='qty_available',
|
'qty_available': fields.function(_product_available, multi='qty_available',
|
||||||
|
@ -244,7 +244,7 @@ class product_product(osv.osv):
|
||||||
if fields:
|
if fields:
|
||||||
if location_info.usage == 'supplier':
|
if location_info.usage == 'supplier':
|
||||||
if fields.get('virtual_available'):
|
if fields.get('virtual_available'):
|
||||||
res['fields']['virtual_available']['string'] = _('Future Receptions')
|
res['fields']['virtual_available']['string'] = _('Future Receipts')
|
||||||
if fields.get('qty_available'):
|
if fields.get('qty_available'):
|
||||||
res['fields']['qty_available']['string'] = _('Received Qty')
|
res['fields']['qty_available']['string'] = _('Received Qty')
|
||||||
|
|
||||||
|
@ -392,9 +392,8 @@ class product_template(osv.osv):
|
||||||
product_route_ids |= set([r.id for r in product.route_ids])
|
product_route_ids |= set([r.id for r in product.route_ids])
|
||||||
product_route_ids |= set([r.id for r in product.categ_id.total_route_ids])
|
product_route_ids |= set([r.id for r in product.categ_id.total_route_ids])
|
||||||
route_ids = route_obj.search(cr, uid, ['|', ('id', 'in', list(product_route_ids)), ('warehouse_selectable', '=', True)], context=context)
|
route_ids = route_obj.search(cr, uid, ['|', ('id', 'in', list(product_route_ids)), ('warehouse_selectable', '=', True)], context=context)
|
||||||
result = mod_obj.get_object_reference(cr, uid, 'stock', 'action_routes_form')
|
result = mod_obj.xmlid_to_res_id(cr, uid, 'stock.action_routes_form', raise_if_not_found=True)
|
||||||
id = result and result[1] or False
|
result = act_obj.read(cr, uid, [result], context=context)[0]
|
||||||
result = act_obj.read(cr, uid, [id], context=context)[0]
|
|
||||||
result['domain'] = "[('id','in',[" + ','.join(map(str, route_ids)) + "])]"
|
result['domain'] = "[('id','in',[" + ','.join(map(str, route_ids)) + "])]"
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
@ -405,24 +404,23 @@ class product_template(osv.osv):
|
||||||
products += [x.id for x in prodtmpl.product_variant_ids]
|
products += [x.id for x in prodtmpl.product_variant_ids]
|
||||||
return products
|
return products
|
||||||
|
|
||||||
def _get_act_window_dict(self, cr, uid, module, name, context=None):
|
def _get_act_window_dict(self, cr, uid, name, context=None):
|
||||||
mod_obj = self.pool.get('ir.model.data')
|
mod_obj = self.pool.get('ir.model.data')
|
||||||
act_obj = self.pool.get('ir.actions.act_window')
|
act_obj = self.pool.get('ir.actions.act_window')
|
||||||
result = mod_obj.get_object_reference(cr, uid, module, name)
|
result = mod_obj.xmlid_to_res_id(cr, uid, name, raise_if_not_found=True)
|
||||||
id = result and result[1] or False
|
result = act_obj.read(cr, uid, [result], context=context)[0]
|
||||||
result = act_obj.read(cr, uid, [id], context=context)[0]
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def action_open_quants(self, cr, uid, ids, context=None):
|
def action_open_quants(self, cr, uid, ids, context=None):
|
||||||
products = self._get_products(cr, uid, ids, context=context)
|
products = self._get_products(cr, uid, ids, context=context)
|
||||||
result = self._get_act_window_dict(cr, uid, 'stock','product_open_quants', context=context)
|
result = self._get_act_window_dict(cr, uid, 'stock.product_open_quants', context=context)
|
||||||
result['domain'] = "[('product_id','in',[" + ','.join(map(str, products)) + "])]"
|
result['domain'] = "[('product_id','in',[" + ','.join(map(str, products)) + "])]"
|
||||||
result['context'] = "{'search_default_locationgroup': 1, 'search_default_internal_loc': 1}"
|
result['context'] = "{'search_default_locationgroup': 1, 'search_default_internal_loc': 1}"
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def action_view_orderpoints(self, cr, uid, ids, context=None):
|
def action_view_orderpoints(self, cr, uid, ids, context=None):
|
||||||
products = self._get_products(cr, uid, ids, context=context)
|
products = self._get_products(cr, uid, ids, context=context)
|
||||||
result = self._get_act_window_dict(cr, uid, 'stock','product_open_orderpoint', context=context)
|
result = self._get_act_window_dict(cr, uid, 'stock.product_open_orderpoint', context=context)
|
||||||
result['domain'] = "[('product_id','in',[" + ','.join(map(str, products)) + "])]"
|
result['domain'] = "[('product_id','in',[" + ','.join(map(str, products)) + "])]"
|
||||||
result['context'] = "{}"
|
result['context'] = "{}"
|
||||||
return result
|
return result
|
||||||
|
@ -430,7 +428,7 @@ class product_template(osv.osv):
|
||||||
|
|
||||||
def action_view_stock_moves(self, cr, uid, ids, context=None):
|
def action_view_stock_moves(self, cr, uid, ids, context=None):
|
||||||
products = self._get_products(cr, uid, ids, context=context)
|
products = self._get_products(cr, uid, ids, context=context)
|
||||||
result = self._get_act_window_dict(cr, uid, 'stock','act_product_stock_move_open', context=context)
|
result = self._get_act_window_dict(cr, uid, 'stock.act_product_stock_move_open', context=context)
|
||||||
result['domain'] = "[('product_id','in',[" + ','.join(map(str, products)) + "])]"
|
result['domain'] = "[('product_id','in',[" + ','.join(map(str, products)) + "])]"
|
||||||
result['context'] = "{}"
|
result['context'] = "{}"
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -32,20 +32,20 @@
|
||||||
|
|
||||||
|
|
||||||
<record id="action_receive_move" model="ir.actions.act_window">
|
<record id="action_receive_move" model="ir.actions.act_window">
|
||||||
<field name="name">Receptions</field>
|
<field name="name">Receipts</field>
|
||||||
<field name="res_model">stock.move</field>
|
<field name="res_model">stock.move</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="domain" eval="[('picking_id.picking_type_id.code','=','incoming'), ('location_id.usage','!=','internal'), ('location_dest_id.usage', '=', 'internal')]"/>
|
<field name="domain" eval="[('picking_id.picking_type_id.code','=','incoming'), ('location_id.usage','!=','internal'), ('location_dest_id.usage', '=', 'internal')]"/>
|
||||||
<field name="view_id" ref="view_move_tree_reception_picking"/>
|
<field name="view_id" ref="view_move_tree_receipt_picking"/>
|
||||||
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
|
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="oe_view_nocontent_create">
|
<p class="oe_view_nocontent_create">
|
||||||
Click to register a reception for this product.
|
Click to register a receipt for this product.
|
||||||
</p><p>
|
</p><p>
|
||||||
Here you will find the history of all receptions related to
|
Here you will find the history of all receipts related to
|
||||||
this product, as well as all future receptions you are waiting
|
this product, as well as all future receipts you are waiting
|
||||||
from your suppliers.
|
from your suppliers.
|
||||||
</p>
|
</p>
|
||||||
</field>
|
</field>
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="view_id" ref="view_move_tree_reception_picking"/>
|
<field name="view_id" ref="view_move_tree_receipt_picking"/>
|
||||||
<field name="domain" eval="[('picking_type_id.code','=','outgoing'), ('location_id.usage','=','internal'), ('location_dest_id.usage', '!=', 'internal')]"/>
|
<field name="domain" eval="[('picking_type_id.code','=','outgoing'), ('location_id.usage','=','internal'), ('location_dest_id.usage', '!=', 'internal')]"/>
|
||||||
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
|
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
|
@ -193,10 +193,10 @@
|
||||||
</field>
|
</field>
|
||||||
<xpath expr="//div[@name='tags']" position="inside">
|
<xpath expr="//div[@name='tags']" position="inside">
|
||||||
<a name="%(action_receive_move)d" type="action" t-if="record.reception_count.raw_value>1">
|
<a name="%(action_receive_move)d" type="action" t-if="record.reception_count.raw_value>1">
|
||||||
<t t-esc="record.reception_count.value"/> Receptions
|
<t t-esc="record.reception_count.value"/> Receipts
|
||||||
</a>
|
</a>
|
||||||
<a name="%(action_receive_move)d" type="action" t-if="record.reception_count.raw_value==1">
|
<a name="%(action_receive_move)d" type="action" t-if="record.reception_count.raw_value==1">
|
||||||
<t t-esc="record.reception_count.value"/> Reception
|
<t t-esc="record.reception_count.value"/> Receipt
|
||||||
</a>
|
</a>
|
||||||
<a name="%(action_deliver_move)d" type="action" t-if="record.delivery_count.raw_value>1">
|
<a name="%(action_deliver_move)d" type="action" t-if="record.delivery_count.raw_value>1">
|
||||||
<t t-esc="record.delivery_count.value"/> Deliveries
|
<t t-esc="record.delivery_count.value"/> Deliveries
|
||||||
|
|
|
@ -2770,7 +2770,7 @@ class stock_warehouse(osv.osv):
|
||||||
'in_type_id': fields.many2one('stock.picking.type', 'In Type'),
|
'in_type_id': fields.many2one('stock.picking.type', 'In Type'),
|
||||||
'int_type_id': fields.many2one('stock.picking.type', 'Internal Type'),
|
'int_type_id': fields.many2one('stock.picking.type', 'Internal Type'),
|
||||||
'crossdock_route_id': fields.many2one('stock.location.route', 'Crossdock Route'),
|
'crossdock_route_id': fields.many2one('stock.location.route', 'Crossdock Route'),
|
||||||
'reception_route_id': fields.many2one('stock.location.route', 'Reception Route'),
|
'reception_route_id': fields.many2one('stock.location.route', 'Receipt Route'),
|
||||||
'delivery_route_id': fields.many2one('stock.location.route', 'Delivery Route'),
|
'delivery_route_id': fields.many2one('stock.location.route', 'Delivery Route'),
|
||||||
'resupply_from_wh': fields.boolean('Resupply From Other Warehouses'),
|
'resupply_from_wh': fields.boolean('Resupply From Other Warehouses'),
|
||||||
'resupply_wh_ids': fields.many2many('stock.warehouse', 'stock_wh_resupply_table', 'supplied_wh_id', 'supplier_wh_id', 'Resupply Warehouses'),
|
'resupply_wh_ids': fields.many2many('stock.warehouse', 'stock_wh_resupply_table', 'supplied_wh_id', 'supplier_wh_id', 'Resupply Warehouses'),
|
||||||
|
@ -3072,7 +3072,7 @@ class stock_warehouse(osv.osv):
|
||||||
for pull_rule in pull_rules_list:
|
for pull_rule in pull_rules_list:
|
||||||
pull_obj.create(cr, uid, vals=pull_rule, context=context)
|
pull_obj.create(cr, uid, vals=pull_rule, context=context)
|
||||||
|
|
||||||
#update reception route and rules: unlink the existing rules of the warehouse reception route and recreate it
|
#update receipt route and rules: unlink the existing rules of the warehouse receipt route and recreate it
|
||||||
pull_obj.unlink(cr, uid, [pu.id for pu in warehouse.reception_route_id.pull_ids], context=context)
|
pull_obj.unlink(cr, uid, [pu.id for pu in warehouse.reception_route_id.pull_ids], context=context)
|
||||||
push_obj.unlink(cr, uid, [pu.id for pu in warehouse.reception_route_id.push_ids], context=context)
|
push_obj.unlink(cr, uid, [pu.id for pu in warehouse.reception_route_id.push_ids], context=context)
|
||||||
route_name, values = routes_dict[new_reception_step]
|
route_name, values = routes_dict[new_reception_step]
|
||||||
|
@ -3082,7 +3082,7 @@ class stock_warehouse(osv.osv):
|
||||||
for push_rule in push_rules_list:
|
for push_rule in push_rules_list:
|
||||||
push_obj.create(cr, uid, vals=push_rule, context=context)
|
push_obj.create(cr, uid, vals=push_rule, context=context)
|
||||||
for pull_rule in pull_rules_list:
|
for pull_rule in pull_rules_list:
|
||||||
#all pull rules in reception route are mto, because we don't want to wait for the scheduler to trigger an orderpoint on input location
|
#all pull rules in receipt route are mto, because we don't want to wait for the scheduler to trigger an orderpoint on input location
|
||||||
pull_rule['procure_method'] = 'make_to_order'
|
pull_rule['procure_method'] = 'make_to_order'
|
||||||
pull_obj.create(cr, uid, vals=pull_rule, context=context)
|
pull_obj.create(cr, uid, vals=pull_rule, context=context)
|
||||||
|
|
||||||
|
@ -3136,7 +3136,7 @@ class stock_warehouse(osv.osv):
|
||||||
max_sequence = max_sequence and max_sequence[0]['sequence'] or 0
|
max_sequence = max_sequence and max_sequence[0]['sequence'] or 0
|
||||||
|
|
||||||
in_type_id = picking_type_obj.create(cr, uid, vals={
|
in_type_id = picking_type_obj.create(cr, uid, vals={
|
||||||
'name': _('Receptions'),
|
'name': _('Receipts'),
|
||||||
'warehouse_id': warehouse.id,
|
'warehouse_id': warehouse.id,
|
||||||
'code': 'incoming',
|
'code': 'incoming',
|
||||||
'sequence_id': in_seq_id,
|
'sequence_id': in_seq_id,
|
||||||
|
@ -3258,9 +3258,9 @@ class stock_warehouse(osv.osv):
|
||||||
customer_loc, supplier_loc = self._get_partner_locations(cr, uid, ids, context=context)
|
customer_loc, supplier_loc = self._get_partner_locations(cr, uid, ids, context=context)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'one_step': (_('Reception in 1 step'), []),
|
'one_step': (_('Receipt in 1 step'), []),
|
||||||
'two_steps': (_('Reception in 2 steps'), [(warehouse.wh_input_stock_loc_id, warehouse.lot_stock_id, warehouse.int_type_id.id)]),
|
'two_steps': (_('Receipt in 2 steps'), [(warehouse.wh_input_stock_loc_id, warehouse.lot_stock_id, warehouse.int_type_id.id)]),
|
||||||
'three_steps': (_('Reception in 3 steps'), [(warehouse.wh_input_stock_loc_id, warehouse.wh_qc_stock_loc_id, warehouse.int_type_id.id), (warehouse.wh_qc_stock_loc_id, warehouse.lot_stock_id, warehouse.int_type_id.id)]),
|
'three_steps': (_('Receipt in 3 steps'), [(warehouse.wh_input_stock_loc_id, warehouse.wh_qc_stock_loc_id, warehouse.int_type_id.id), (warehouse.wh_qc_stock_loc_id, warehouse.lot_stock_id, warehouse.int_type_id.id)]),
|
||||||
'crossdock': (_('Cross-Dock'), [(warehouse.wh_input_stock_loc_id, warehouse.wh_output_stock_loc_id, warehouse.int_type_id.id), (warehouse.wh_output_stock_loc_id, customer_loc, warehouse.out_type_id.id)]),
|
'crossdock': (_('Cross-Dock'), [(warehouse.wh_input_stock_loc_id, warehouse.wh_output_stock_loc_id, warehouse.int_type_id.id), (warehouse.wh_output_stock_loc_id, customer_loc, warehouse.out_type_id.id)]),
|
||||||
'ship_only': (_('Ship Only'), [(warehouse.lot_stock_id, customer_loc, warehouse.out_type_id.id)]),
|
'ship_only': (_('Ship Only'), [(warehouse.lot_stock_id, customer_loc, warehouse.out_type_id.id)]),
|
||||||
'pick_ship': (_('Pick + Ship'), [(warehouse.lot_stock_id, warehouse.wh_output_stock_loc_id, warehouse.pick_type_id.id), (warehouse.wh_output_stock_loc_id, customer_loc, warehouse.out_type_id.id)]),
|
'pick_ship': (_('Pick + Ship'), [(warehouse.lot_stock_id, warehouse.wh_output_stock_loc_id, warehouse.pick_type_id.id), (warehouse.wh_output_stock_loc_id, customer_loc, warehouse.out_type_id.id)]),
|
||||||
|
@ -3313,7 +3313,7 @@ class stock_warehouse(osv.osv):
|
||||||
|
|
||||||
def _check_reception_resupply(self, cr, uid, warehouse, new_location, context=None):
|
def _check_reception_resupply(self, cr, uid, warehouse, new_location, context=None):
|
||||||
"""
|
"""
|
||||||
Will check if the resupply routes to this warehouse follow the changes of number of reception steps
|
Will check if the resupply routes to this warehouse follow the changes of number of receipt steps
|
||||||
"""
|
"""
|
||||||
#Check routes that are being delivered by this warehouse and change the rule coming from transit location
|
#Check routes that are being delivered by this warehouse and change the rule coming from transit location
|
||||||
route_obj = self.pool.get("stock.location.route")
|
route_obj = self.pool.get("stock.location.route")
|
||||||
|
|
|
@ -1155,7 +1155,7 @@
|
||||||
<menuitem action="action_move_form2" id="menu_action_move_form2" parent="menu_traceability" sequence="3" groups="stock.group_locations"/>
|
<menuitem action="action_move_form2" id="menu_action_move_form2" parent="menu_traceability" sequence="3" groups="stock.group_locations"/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Reception Picking (By Stock Move)
|
Receipt Picking (By Stock Move)
|
||||||
From stock_partial_move_view
|
From stock_partial_move_view
|
||||||
-->
|
-->
|
||||||
<record id="view_move_tree_receipt_picking" model="ir.ui.view">
|
<record id="view_move_tree_receipt_picking" model="ir.ui.view">
|
||||||
|
@ -1203,7 +1203,7 @@
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_reception_picking_move" model="ir.actions.act_window">
|
<record id="action_receipt_picking_move" model="ir.actions.act_window">
|
||||||
<field name="name">Incoming Products</field>
|
<field name="name">Incoming Products</field>
|
||||||
<field name="res_model">stock.move</field>
|
<field name="res_model">stock.move</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
|
@ -1214,7 +1214,7 @@
|
||||||
<field name="context">{'product_receive': True, 'search_default_future': True}</field>
|
<field name="context">{'product_receive': True, 'search_default_future': True}</field>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="oe_view_nocontent_create">
|
<p class="oe_view_nocontent_create">
|
||||||
Click to register a product reception.
|
Click to register a product receipt.
|
||||||
</p><p>
|
</p><p>
|
||||||
Here you can receive individual products, no matter what
|
Here you can receive individual products, no matter what
|
||||||
purchase order or picking order they come from. You will find
|
purchase order or picking order they come from. You will find
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
new_pack1 = stock_pack.create(cr, uid, {'product_id': ref('product1'), 'product_uom_id': ref('product.product_uom_unit'), 'picking_id': ref('pick1'), 'lot_id': lot_a, 'result_package_id': package2, 'product_qty': 120, 'location_id': ref('stock_location_suppliers'), 'location_dest_id': ref('stock_location_stock')}, context=context)
|
new_pack1 = stock_pack.create(cr, uid, {'product_id': ref('product1'), 'product_uom_id': ref('product.product_uom_unit'), 'picking_id': ref('pick1'), 'lot_id': lot_a, 'result_package_id': package2, 'product_qty': 120, 'location_id': ref('stock_location_suppliers'), 'location_dest_id': ref('stock_location_stock')}, context=context)
|
||||||
new_pack2 = stock_pack.create(cr, uid, {'product_id': ref('product1'), 'product_uom_id': ref('product.product_uom_unit'), 'picking_id': ref('pick1'), 'result_package_id': package3, 'product_qty': 60, 'location_id': ref('stock_location_suppliers'), 'location_dest_id': ref('stock_location_stock')}, context=context)
|
new_pack2 = stock_pack.create(cr, uid, {'product_id': ref('product1'), 'product_uom_id': ref('product.product_uom_unit'), 'picking_id': ref('pick1'), 'result_package_id': package3, 'product_qty': 60, 'location_id': ref('stock_location_suppliers'), 'location_dest_id': ref('stock_location_stock')}, context=context)
|
||||||
-
|
-
|
||||||
Transfer the reception
|
Transfer the receipt
|
||||||
-
|
-
|
||||||
!python {model: stock.picking}: |
|
!python {model: stock.picking}: |
|
||||||
self.do_transfer(cr, uid, [ref('pick1')], context=context)
|
self.do_transfer(cr, uid, [ref('pick1')], context=context)
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
new_pack1 = stock_pack.create(cr, uid, {'product_id': ref('product_neg'), 'product_uom_id': ref('product.product_uom_unit'), 'picking_id': ref('pick_neg'), 'lot_id': lot_a, 'result_package_id': package2, 'product_qty': 120, 'location_id': ref('stock_location_suppliers'), 'location_dest_id': ref('stock_location_stock')}, context=context)
|
new_pack1 = stock_pack.create(cr, uid, {'product_id': ref('product_neg'), 'product_uom_id': ref('product.product_uom_unit'), 'picking_id': ref('pick_neg'), 'lot_id': lot_a, 'result_package_id': package2, 'product_qty': 120, 'location_id': ref('stock_location_suppliers'), 'location_dest_id': ref('stock_location_stock')}, context=context)
|
||||||
new_pack2 = stock_pack.create(cr, uid, {'product_id': ref('product_neg'), 'product_uom_id': ref('product.product_uom_unit'), 'picking_id': ref('pick_neg'), 'result_package_id': package3, 'product_qty': 60, 'location_id': ref('stock_location_suppliers'), 'location_dest_id': ref('stock_location_stock')}, context=context)
|
new_pack2 = stock_pack.create(cr, uid, {'product_id': ref('product_neg'), 'product_uom_id': ref('product.product_uom_unit'), 'picking_id': ref('pick_neg'), 'result_package_id': package3, 'product_qty': 60, 'location_id': ref('stock_location_suppliers'), 'location_dest_id': ref('stock_location_stock')}, context=context)
|
||||||
-
|
-
|
||||||
Transfer the reception
|
Transfer the receipt
|
||||||
-
|
-
|
||||||
!python {model: stock.picking}: |
|
!python {model: stock.picking}: |
|
||||||
self.do_transfer(cr, uid, [ref('pick_neg')], context=context)
|
self.do_transfer(cr, uid, [ref('pick_neg')], context=context)
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
})
|
})
|
||||||
backorder.do_transfer()
|
backorder.do_transfer()
|
||||||
-
|
-
|
||||||
I check incomming shipment after reception.
|
I check incomming shipment after receipt.
|
||||||
-
|
-
|
||||||
!python {model: stock.picking}: |
|
!python {model: stock.picking}: |
|
||||||
shipment = self.browse(cr, uid, self.search(cr, uid, [('backorder_id', '=', ref("incomming_shipment"))]))[0]
|
shipment = self.browse(cr, uid, self.search(cr, uid, [('backorder_id', '=', ref("incomming_shipment"))]))[0]
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
stock_pack.write(cr, uid, record.pack_operation_ids[0].id, {'result_package_id': package1, 'product_qty': 4, 'location_dest_id': ref('stock_location_components')})
|
stock_pack.write(cr, uid, record.pack_operation_ids[0].id, {'result_package_id': package1, 'product_qty': 4, 'location_dest_id': ref('stock_location_components')})
|
||||||
new_pack1 = stock_pack.create(cr, uid, {'product_id': ref('product_wise'), 'product_uom_id': ref('product.product_uom_unit'), 'picking_id': ref('pick1'), 'product_qty': 6.0, 'location_id': ref('stock_location_suppliers'), 'location_dest_id': ref('stock_location_14')}, context=context)
|
new_pack1 = stock_pack.create(cr, uid, {'product_id': ref('product_wise'), 'product_uom_id': ref('product.product_uom_unit'), 'picking_id': ref('pick1'), 'product_qty': 6.0, 'location_id': ref('stock_location_suppliers'), 'location_dest_id': ref('stock_location_14')}, context=context)
|
||||||
-
|
-
|
||||||
Transfer the reception
|
Transfer the receipt
|
||||||
-
|
-
|
||||||
!python {model: stock.picking}: |
|
!python {model: stock.picking}: |
|
||||||
self.do_transfer(cr, uid, [ref('pick1')], context=context)
|
self.do_transfer(cr, uid, [ref('pick1')], context=context)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-
|
-
|
||||||
I first create a warehouse with pick-pack-ship and reception in 2 steps
|
I first create a warehouse with pick-pack-ship and receipt in 2 steps
|
||||||
-
|
-
|
||||||
!record {model: stock.warehouse, id: wh_pps}:
|
!record {model: stock.warehouse, id: wh_pps}:
|
||||||
name: WareHouse PickPackShip
|
name: WareHouse PickPackShip
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
!assert {model: purchase.order, id: purchase_order_lifo1}:
|
!assert {model: purchase.order, id: purchase_order_lifo1}:
|
||||||
- state == 'approved'
|
- state == 'approved'
|
||||||
-
|
-
|
||||||
Process the reception of purchase order 1
|
Process the receipt of purchase order 1
|
||||||
-
|
-
|
||||||
!python {model: stock.picking}: |
|
!python {model: stock.picking}: |
|
||||||
order = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_lifo1"), context=context).picking_ids[0]
|
order = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_lifo1"), context=context).picking_ids[0]
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
-
|
-
|
||||||
!workflow {model: purchase.order, action: purchase_confirm, ref: purchase_order_lifo2}
|
!workflow {model: purchase.order, action: purchase_confirm, ref: purchase_order_lifo2}
|
||||||
-
|
-
|
||||||
Process the reception of purchase order 2
|
Process the receipt of purchase order 2
|
||||||
-
|
-
|
||||||
!python {model: stock.picking}: |
|
!python {model: stock.picking}: |
|
||||||
order = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_lifo2"), context=context).picking_ids[0]
|
order = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_lifo2"), context=context).picking_ids[0]
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
Check the standard price should not have changed
|
Check the standard price should not have changed
|
||||||
-
|
-
|
||||||
!python {model: product.product}: |
|
!python {model: product.product}: |
|
||||||
assert self.browse(cr, uid, ref("product_lifo_icecream")).standard_price == 70.0, 'Standard price as lifo price of second reception incorrect!'
|
assert self.browse(cr, uid, ref("product_lifo_icecream")).standard_price == 70.0, 'Standard price as lifo price of second receipt incorrect!'
|
||||||
-
|
-
|
||||||
Let us send some goods
|
Let us send some goods
|
||||||
-
|
-
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-
|
-
|
||||||
Create a warehouse and set it as having a 3-step delivery flow (Pick > Pack > Ship) and a 2-step reception route
|
Create a warehouse and set it as having a 3-step delivery flow (Pick > Pack > Ship) and a 2-step receipt route
|
||||||
-
|
-
|
||||||
-
|
-
|
||||||
Create product Combi1 that is MTO / purchase and provide a supplier for it
|
Create product Combi1 that is MTO / purchase and provide a supplier for it
|
||||||
|
|
Loading…
Reference in New Issue