-
diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml
index b106ad4a4a2..ab4f8d9dd7b 100644
--- a/addons/purchase/report/order.rml
+++ b/addons/purchase/report/order.rml
@@ -167,7 +167,7 @@
|
Shipping address :
[[ (o.dest_address_id and o.dest_address_id.name) or (o.warehouse_id and o.warehouse_id.name) or '']]
- [[ (o.dest_address_id and display_address(o.dest_address_id)) or (o.warehouse_id and display_address(o.warehouse_id.partner_address_id)) or '']]
+ [[ (o.dest_address_id and display_address(o.dest_address_id)) or (o.warehouse_id and display_address(o.warehouse_id.partner_id)) or '']]
|
diff --git a/addons/purchase/test/process/rfq2order2done.yml b/addons/purchase/test/process/rfq2order2done.yml
index a9635fdfe4f..5a1e1ccde4b 100644
--- a/addons/purchase/test/process/rfq2order2done.yml
+++ b/addons/purchase/test/process/rfq2order2done.yml
@@ -40,7 +40,7 @@
assert len(purchase_order.picking_ids) >= 1, "You should have only one reception order"
for picking in purchase_order.picking_ids:
assert picking.state == "assigned", "Reception state should be in assigned state"
- assert picking.address_id.id == purchase_order.partner_id.id, "Delivery address of reception id is different from order"
+ assert picking.partner_id.id == purchase_order.partner_id.id, "Delivery address of reception id is different from order"
assert picking.company_id.id == purchase_order.company_id.id, "Company is not correspond with purchase order"
-
Reception is ready for process so now done the reception.
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 93938fa4f8e..d8e8ac60f3d 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -733,7 +733,7 @@ class sale_order(osv.osv):
'product_uos': (line.product_uos and line.product_uos.id)\
or line.product_uom.id,
'product_packaging': line.product_packaging.id,
- 'address_id': line.address_allotment_id.id or order.partner_shipping_id.id,
+ 'partner_id': line.address_allotment_id.id or order.partner_shipping_id.id,
'location_id': location_id,
'location_dest_id': output_id,
'sale_line_id': line.id,
@@ -755,7 +755,7 @@ class sale_order(osv.osv):
'state': 'auto',
'move_type': order.picking_policy,
'sale_id': order.id,
- 'address_id': order.partner_shipping_id.id,
+ 'partner_id': order.partner_shipping_id.id,
'note': order.note,
'invoice_state': (order.order_policy=='picking' and '2binvoiced') or 'none',
'company_id': order.company_id.id,
diff --git a/addons/sale/sale_unit_test.xml b/addons/sale/sale_unit_test.xml
index 787373dae99..5ce1156a206 100644
--- a/addons/sale/sale_unit_test.xml
+++ b/addons/sale/sale_unit_test.xml
@@ -84,7 +84,7 @@
-
+
diff --git a/addons/sale/test/picking_order_policy.yml b/addons/sale/test/picking_order_policy.yml
index 0d2a2e19a34..f2e3cd0e24a 100644
--- a/addons/sale/test/picking_order_policy.yml
+++ b/addons/sale/test/picking_order_policy.yml
@@ -52,7 +52,7 @@
assert picking.origin == sale_order.name,"Origin of Delivery order is not correspond with sequence number of sale order."
assert picking.type == 'out',"Shipment should be Outgoing."
assert picking.move_type == sale_order.picking_policy,"Delivery Method is not corresponding with delivery method of sale order."
- assert picking.address_id.id == sale_order.partner_shipping_id.id,"Shipping Address is not correspond with sale order."
+ assert picking.partner_id.id == sale_order.partner_shipping_id.id,"Shipping Address is not correspond with sale order."
assert picking.note == sale_order.note,"Note is not correspond with sale order."
assert picking.invoice_state == (sale_order.order_policy=='picking' and '2binvoiced') or 'none',"Invoice policy is not correspond with sale order."
assert len(picking.move_lines) == len(sale_order.order_line), "Total move of delivery order are not corresposning with total sale order lines."
@@ -69,7 +69,7 @@
assert move.product_uos_qty == (order_line.product_uos and order_line.product_uos_qty) or order_line.product_uom_qty,"Product UOS Quantity is not correspond."
assert move.product_uos == (order_line.product_uos and order_line.product_uos.id) or order_line.product_uom.id,"Product UOS is not correspond"
assert move.product_packaging.id == order_line.product_packaging.id,"Product packaging is not correspond."
- assert move.address_id.id == order_line.address_allotment_id.id or sale_order.partner_shipping_id.id,"Address is not correspond"
+ assert move.partner_id.id == order_line.address_allotment_id.id or sale_order.partner_shipping_id.id,"Address is not correspond"
#assert move.location_id.id == location_id,"Source Location is not correspond."
#assert move.location_dest_id == output_id,"Destination Location is not correspond."
assert move.note == order_line.notes,"Note is not correspond"
diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml
index f16d070f9b9..63706a940e6 100644
--- a/addons/stock/report/picking.rml
+++ b/addons/stock/report/picking.rml
@@ -162,13 +162,13 @@
|
Shipping Address :
- [[ (picking.address_id and picking.address_id.id and picking.address_id.title.name) or '' ]] [[ picking.address_id and picking.address_id.id and picking.address_id.name ]]
- [[ picking.address_id and display_address(picking.address_id,'delivery') ]]
+ [[ (picking.partner_id and picking.partner_id.id and picking.partner_id.title.name) or '' ]] [[ picking.partner_id and picking.partner_id.id and picking.partner_id.name ]]
+ [[ picking.partner_id and display_address(picking.partner_id,'delivery') ]]
|
Contact Address :
- [[ picking.address_id and picking.address_id.title.name or '' ]] [[ picking.address_id and picking.address_id.name or '' ]]
- [[ picking.address_id and display_address(picking.address_id,'default') ]]
+ [[ picking.partner_id and picking.partner_id.title.name or '' ]] [[ picking.partner_id and picking.partner_id.name or '' ]]
+ [[ picking.partner_id and display_address(picking.partner_id,'default') ]]
|
@@ -218,7 +218,7 @@
[[ picking.origin or '']]
- [[ (picking.address_id and picking.address_id.title.name) or '' ]] [[ (picking.address_id and picking.address_id.name) or '' ]]
+ [[ (picking.partner_id and picking.partner_id.title.name) or '' ]] [[ (picking.partner_id and picking.partner_id.name) or '' ]]
|
[[ formatLang(picking.min_date,date_time = True) ]]
diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py
index 2b6b844872a..da6be7873c3 100644
--- a/addons/stock/report/report_stock_move.py
+++ b/addons/stock/report/report_stock_move.py
@@ -76,7 +76,7 @@ class report_stock_move(osv.osv):
al.product_qty,
al.out_qty as product_qty_out,
al.in_qty as product_qty_in,
- al.address_id as partner_id,
+ al.partner_id as partner_id,
al.product_id as product_id,
al.state as state ,
al.product_uom as product_uom,
@@ -113,7 +113,7 @@ class report_stock_move(osv.osv):
sm.location_dest_id as location_dest_id,
sum(sm.product_qty) as product_qty,
pt.categ_id as categ_id ,
- sm.address_id as address_id,
+ sm.partner_id as partner_id,
sm.product_id as product_id,
sm.picking_id as picking_id,
sm.company_id as company_id,
@@ -129,7 +129,7 @@ class report_stock_move(osv.osv):
LEFT JOIN product_uom pu2 ON (sm.product_uom=pu2.id)
LEFT JOIN product_template pt ON (pp.product_tmpl_id=pt.id)
GROUP BY
- sm.id,sp.type, sm.date,sm.address_id,
+ sm.id,sp.type, sm.date,sm.partner_id,
sm.product_id,sm.state,sm.product_uom,sm.date_expected,
sm.product_id,pt.standard_price, sm.picking_id, sm.product_qty,
sm.company_id,sm.product_qty, sm.location_id,sm.location_dest_id,pu.factor,pt.categ_id, sp.stock_journal_id)
@@ -137,7 +137,7 @@ class report_stock_move(osv.osv):
GROUP BY
al.out_qty,al.in_qty,al.curr_year,al.curr_month,
al.curr_day,al.curr_day_diff,al.curr_day_diff1,al.curr_day_diff2,al.dp,al.location_id,al.location_dest_id,
- al.address_id,al.product_id,al.state,al.product_uom,
+ al.partner_id,al.product_id,al.state,al.product_uom,
al.picking_id,al.company_id,al.type,al.product_qty, al.categ_id, al.stock_journal
)
""")
@@ -173,7 +173,7 @@ class report_stock_inventory(osv.osv):
CREATE OR REPLACE view report_stock_inventory AS (
(SELECT
min(m.id) as id, m.date as date,
- m.address_id as partner_id, m.location_id as location_id,
+ m.partner_id as partner_id, m.location_id as location_id,
m.product_id as product_id, pt.categ_id as product_categ_id, l.usage as location_type,
m.company_id,
m.state as state, m.prodlot_id as prodlot_id,
@@ -190,12 +190,12 @@ CREATE OR REPLACE view report_stock_inventory AS (
LEFT JOIN product_uom u ON (m.product_uom=u.id)
LEFT JOIN stock_location l ON (m.location_id=l.id)
GROUP BY
- m.id, m.product_id, m.product_uom, pt.categ_id, m.address_id, m.location_id, m.location_dest_id,
+ m.id, m.product_id, m.product_uom, pt.categ_id, m.partner_id, m.location_id, m.location_dest_id,
m.prodlot_id, m.date, m.state, l.usage, m.company_id, pt.uom_id
) UNION ALL (
SELECT
-m.id as id, m.date as date,
- m.address_id as partner_id, m.location_dest_id as location_id,
+ m.partner_id as partner_id, m.location_dest_id as location_id,
m.product_id as product_id, pt.categ_id as product_categ_id, l.usage as location_type,
m.company_id,
m.state as state, m.prodlot_id as prodlot_id,
@@ -211,7 +211,7 @@ CREATE OR REPLACE view report_stock_inventory AS (
LEFT JOIN product_uom u ON (m.product_uom=u.id)
LEFT JOIN stock_location l ON (m.location_dest_id=l.id)
GROUP BY
- m.id, m.product_id, m.product_uom, pt.categ_id, m.address_id, m.location_id, m.location_dest_id,
+ m.id, m.product_id, m.product_uom, pt.categ_id, m.partner_id, m.location_id, m.location_dest_id,
m.prodlot_id, m.date, m.state, l.usage, m.company_id, pt.uom_id
)
);
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index ae3d23a0364..9753c1a3e05 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -190,7 +190,7 @@ class stock_location(osv.osv):
'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', 'Location Address',help="Address of customer or supplier."),
+ 'partner_id': fields.many2one('res.partner', 'Location Address',help="Address of customer or supplier."),
'icon': fields.selection(tools.icons, 'Icon', size=64,help="Icon show in hierarchical tree view"),
'comment': fields.text('Additional Information'),
@@ -646,7 +646,7 @@ class stock_picking(osv.osv):
store=True, type='datetime', string='Max. Expected Date', select=2),
'move_lines': fields.one2many('stock.move', 'picking_id', 'Internal Moves', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}),
'auto_picking': fields.boolean('Auto-Picking'),
- 'address_id': fields.many2one('res.partner', 'Address', help="Address of partner"),
+ 'partner_id': fields.many2one('res.partner', 'Partner'),
'invoice_state': fields.selection([
("invoiced", "Invoiced"),
("2binvoiced", "To Be Invoiced"),
@@ -876,7 +876,7 @@ class stock_picking(osv.osv):
@param picking: object of the picking for which we are selecting the partner to invoice
@return: object of the partner to invoice
"""
- return picking.address_id and picking.address_id.id
+ return picking.partner_id and picking.partner_id.id
def _get_comment_invoice(self, cr, uid, picking):
"""
@@ -916,11 +916,11 @@ class stock_picking(osv.osv):
else:
taxes = move_line.product_id.taxes_id
- if move_line.picking_id and move_line.picking_id.address_id and move_line.picking_id.address_id.id:
+ if move_line.picking_id and move_line.picking_id.partner_id and move_line.picking_id.partner_id.id:
return self.pool.get('account.fiscal.position').map_tax(
cr,
uid,
- move_line.picking_id.address_id.property_account_position,
+ move_line.picking_id.partner_id.property_account_position,
taxes
)
else:
@@ -1176,7 +1176,7 @@ class stock_picking(osv.osv):
def do_partial(self, cr, uid, ids, partial_datas, context=None):
""" Makes partial picking and moves done.
@param partial_datas : Dictionary containing details of partial picking
- like partner_id, address_id, delivery_date,
+ like partner_id, partner_id, delivery_date,
delivery moves with product_id, product_qty, uom
@return: Dictionary of values
"""
@@ -1276,7 +1276,7 @@ class stock_picking(osv.osv):
{
'product_qty' : move.product_qty - partial_qty[move.id],
'product_uos_qty': move.product_qty - partial_qty[move.id], #TODO: put correct uos_qty
-
+
})
if new_picking:
@@ -1378,7 +1378,7 @@ class stock_production_lot(osv.osv):
name = '%s [%s]' % (name, record['ref'])
res.append((record['id'], name))
return res
-
+
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
args = args or []
ids = []
@@ -1579,7 +1579,7 @@ class stock_move(osv.osv):
'location_id': fields.many2one('stock.location', 'Source Location', required=True, select=True,states={'done': [('readonly', 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', 'Destination Location', required=True,states={'done': [('readonly', True)]}, select=True, help="Location where the system will stock the finished products."),
- 'address_id': fields.many2one('res.partner', 'Destination Address ', states={'done': [('readonly', True)]}, help="Optional address where goods are to be delivered, specifically used for allotment"),
+ 'partner_id': fields.many2one('res.partner', 'Destination Address ', states={'done': [('readonly', True)]}, help="Optional address where goods are to be delivered, specifically used for allotment"),
'prodlot_id': fields.many2one('stock.production.lot', 'Production Lot', states={'done': [('readonly', True)]}, help="Production lot is used to put a serial number on the production", select=True),
'tracking_id': fields.many2one('stock.tracking', 'Pack', select=True, states={'done': [('readonly', True)]}, help="Logistical shipping unit: pallet, box, pack ..."),
@@ -1800,19 +1800,19 @@ class stock_move(osv.osv):
return {'value': result}
def onchange_product_id(self, cr, uid, ids, prod_id=False, loc_id=False,
- loc_dest_id=False, address_id=False):
+ loc_dest_id=False, partner_id=False):
""" On change of product id, if finds UoM, UoS, quantity and UoS quantity.
@param prod_id: Changed Product id
@param loc_id: Source location id
@param loc_dest_id: Destination location id
- @param address_id: Address id of partner
+ @param partner_id: Address id of partner
@return: Dictionary of values
"""
if not prod_id:
return {}
lang = False
- if address_id:
- addr_rec = self.pool.get('res.partner').browse(cr, uid, address_id)
+ if partner_id:
+ addr_rec = self.pool.get('res.partner').browse(cr, uid, partner_id)
if addr_rec:
lang = addr_rec and addr_rec.lang or False
ctx = {'lang': lang}
@@ -1854,7 +1854,7 @@ class stock_move(osv.osv):
cr,
uid,
m.location_dest_id,
- m.picking_id and m.picking_id.address_id and m.picking_id.address_id,
+ m.picking_id and m.picking_id.partner_id and m.picking_id.partner_id,
m.product_id,
context
)
@@ -1905,7 +1905,7 @@ class stock_move(osv.osv):
'auto_picking': moves_todo[0][1][1] == 'auto',
'stock_journal_id': moves_todo[0][1][3],
'company_id': moves_todo[0][1][4] or res_company._company_default_get(cr, uid, 'stock.company', context=context),
- 'address_id': picking.address_id.id,
+ 'partner_id': picking.partner_id.id,
'invoice_state': 'none',
'date': picking.date,
}
@@ -2261,7 +2261,7 @@ class stock_move(osv.osv):
processing of the given stock move.
"""
# prepare default values considering that the destination accounts have the reference_currency_id as their main currency
- partner_id = (move.picking_id.address_id and move.picking_id.address_id.id and move.picking_id.address_id.id) or False
+ partner_id = (move.picking_id.partner_id and move.picking_id.partner_id.id and move.picking_id.partner_id.id) or False
debit_line_vals = {
'name': move.name,
'product_id': move.product_id and move.product_id.id or False,
@@ -2493,7 +2493,7 @@ class stock_move(osv.osv):
def do_partial(self, cr, uid, ids, partial_datas, context=None):
""" Makes partial pickings and moves done.
@param partial_datas: Dictionary containing details of partial picking
- like partner_id, address_id, delivery_date, delivery
+ like partner_id, delivery_date, delivery
moves with product_id, product_qty, uom
"""
res = {}
@@ -2680,7 +2680,7 @@ class stock_inventory(osv.osv):
'prodlot_id': lot_id,
'date': inv.date,
}
-
+
if change > 0:
value.update( {
'product_qty': change,
@@ -2772,7 +2772,7 @@ class stock_warehouse(osv.osv):
_columns = {
'name': fields.char('Name', size=128, required=True, select=True),
'company_id': fields.many2one('res.company', 'Company', required=True, select=True),
- 'partner_address_id': fields.many2one('res.partner', 'Owner Address'),
+ 'partner_id': fields.many2one('res.partner', 'Owner Address'),
'lot_input_id': fields.many2one('stock.location', 'Location Input', required=True, domain=[('usage','<>','view')]),
'lot_stock_id': fields.many2one('stock.location', 'Location Stock', required=True, domain=[('usage','=','internal')]),
'lot_output_id': fields.many2one('stock.location', 'Location Output', required=True, domain=[('usage','<>','view')]),
diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml
index 5372ab6216b..ec0860f62c7 100644
--- a/addons/stock/stock_demo.xml
+++ b/addons/stock/stock_demo.xml
@@ -5,7 +5,7 @@
-
+
@@ -42,7 +42,7 @@
Shelf 1
-
+
|