[Fix] auction,delivery remove ref of .address
bzr revid: sbh@tinyerp.com-20120322104124-ferh00aj1gpqowlf
This commit is contained in:
parent
c90d8491ad
commit
09483d7449
|
@ -751,8 +751,8 @@ class auction_bid(osv.osv):
|
|||
if not partner_id:
|
||||
return {'value': {'contact_tel':False}}
|
||||
contact = self.pool.get('res.partner').browse(cr, uid, partner_id)
|
||||
if len(contact.address):
|
||||
v_contact=contact.address[0] and contact.address[0].phone
|
||||
if contact:
|
||||
v_contact=contact.phone
|
||||
else:
|
||||
v_contact = False
|
||||
return {'value': {'contact_tel': v_contact}}
|
||||
|
|
|
@ -80,7 +80,7 @@ class delivery_carrier(osv.osv):
|
|||
}
|
||||
|
||||
def grid_get(self, cr, uid, ids, contact_id, context=None):
|
||||
contact = self.pool.get('res.partner.address').browse(cr, uid, contact_id, context=context)
|
||||
contact = self.pool.get('res.partner').browse(cr, uid, contact_id, context=context)
|
||||
for carrier in self.browse(cr, uid, ids, context=context):
|
||||
for grid in carrier.grids_id:
|
||||
get_id = lambda x: x.id
|
||||
|
@ -106,7 +106,7 @@ class delivery_carrier(osv.osv):
|
|||
# if using advanced pricing per destination: do not change
|
||||
if record.use_detailed_pricelist:
|
||||
continue
|
||||
|
||||
|
||||
# not using advanced pricing per destination: override grid
|
||||
grid_id = grid_pool.search(cr, uid, [('carrier_id', '=', record.id)], context=context)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -50,7 +50,7 @@ class stock_picking(osv.osv):
|
|||
for line in self.pool.get('stock.move').browse(cr, uid, ids, context=context):
|
||||
result[line.picking_id.id] = True
|
||||
return result.keys()
|
||||
|
||||
|
||||
_columns = {
|
||||
'carrier_id':fields.many2one("delivery.carrier","Carrier"),
|
||||
'volume': fields.float('Volume'),
|
||||
|
@ -99,7 +99,7 @@ class stock_picking(osv.osv):
|
|||
.property_account_income_categ.id
|
||||
|
||||
taxes = picking.carrier_id.product_id.taxes_id
|
||||
partner = picking.address_id.partner_id or False
|
||||
partner = picking.address_id or False
|
||||
if partner:
|
||||
account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, partner.property_account_position, account_id)
|
||||
taxes_ids = self.pool.get('account.fiscal.position').map_tax(cr, uid, partner.property_account_position, taxes)
|
||||
|
@ -121,7 +121,7 @@ class stock_picking(osv.osv):
|
|||
group=False, type='out_invoice', context=None):
|
||||
invoice_obj = self.pool.get('account.invoice')
|
||||
picking_obj = self.pool.get('stock.picking')
|
||||
invoice_line_obj = self.pool.get('account.invoice.line')
|
||||
invoice_line_obj = self.pool.get('account.invoice.line')
|
||||
result = super(stock_picking, self).action_invoice_create(cr, uid,
|
||||
ids, journal_id=journal_id, group=group, type=type,
|
||||
context=context)
|
||||
|
|
Loading…
Reference in New Issue