diff --git a/addons/account/account.py b/addons/account/account.py
index 910f4b4c6ff..75bfc891980 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -1652,7 +1652,7 @@ class account_move_reconcile(osv.osv):
'create_date': fields.date('Creation date', readonly=True),
}
_defaults = {
- 'name': lambda self,cr,uid,ctx={}: self.pool.get('ir.sequence').get(cr, uid, 'account.reconcile') or '/',
+ 'name': lambda self,cr,uid,ctx=None: self.pool.get('ir.sequence').get(cr, uid, 'account.reconcile', context=ctx) or '/',
}
def reconcile_partial_check(self, cr, uid, ids, type='auto', context=None):
@@ -1841,7 +1841,7 @@ class account_tax(osv.osv):
PERCENT: tax = price * amount
FIXED: tax = price + amount
NONE: no tax line
- CODE: execute python code. localcontext = {'price_unit':pu, 'address':address_object}
+ CODE: execute python code. localcontext = {'price_unit':pu}
return result in the context
Ex: result=round(price_unit*0.21,4)
"""
@@ -1963,8 +1963,8 @@ class account_tax(osv.osv):
return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0]
_defaults = {
- 'python_compute': '''# price_unit\n# address: res.partner.address object or False\n# product: product.product object or None\n# partner: res.partner object or None\n\nresult = price_unit * 0.10''',
- 'python_compute_inv': '''# price_unit\n# address: res.partner.address object or False\n# product: product.product object or False\n\nresult = price_unit * 0.10''',
+ 'python_compute': '''# price_unit\n# or False\n# product: product.product object or None\n# partner: res.partner object or None\n\nresult = price_unit * 0.10''',
+ 'python_compute_inv': '''# price_unit\n# product: product.product object or False\n\nresult = price_unit * 0.10''',
'applicable_type': 'true',
'type': 'percent',
'amount': 0,
@@ -1981,12 +1981,11 @@ class account_tax(osv.osv):
}
_order = 'sequence'
- def _applicable(self, cr, uid, taxes, price_unit, address_id=None, product=None, partner=None):
+ def _applicable(self, cr, uid, taxes, price_unit, product=None, partner=None):
res = []
- obj_partener_address = self.pool.get('res.partner.address')
for tax in taxes:
if tax.applicable_type=='code':
- localdict = {'price_unit':price_unit, 'address':obj_partener_address.browse(cr, uid, address_id), 'product':product, 'partner':partner}
+ localdict = {'price_unit':price_unit, 'product':product, 'partner':partner}
exec tax.python_applicable in localdict
if localdict.get('result', False):
res.append(tax)
@@ -1994,11 +1993,10 @@ class account_tax(osv.osv):
res.append(tax)
return res
- def _unit_compute(self, cr, uid, taxes, price_unit, address_id=None, product=None, partner=None, quantity=0):
- taxes = self._applicable(cr, uid, taxes, price_unit, address_id, product, partner)
+ def _unit_compute(self, cr, uid, taxes, price_unit, product=None, partner=None, quantity=0):
+ taxes = self._applicable(cr, uid, taxes, price_unit ,product, partner)
res = []
cur_price_unit=price_unit
- obj_partener_address = self.pool.get('res.partner.address')
for tax in taxes:
# we compute the amount for the current tax object and append it to the result
data = {'id':tax.id,
@@ -2026,8 +2024,7 @@ class account_tax(osv.osv):
data['tax_amount']=quantity
# data['amount'] = quantity
elif tax.type=='code':
- address = address_id and obj_partener_address.browse(cr, uid, address_id) or None
- localdict = {'price_unit':cur_price_unit, 'address':address, 'product':product, 'partner':partner}
+ localdict = {'price_unit':cur_price_unit, 'product':product, 'partner':partner}
exec tax.python_compute in localdict
amount = localdict['result']
data['amount'] = amount
@@ -2040,7 +2037,7 @@ class account_tax(osv.osv):
if tax.child_depend:
latest = res.pop()
amount = amount2
- child_tax = self._unit_compute(cr, uid, tax.child_ids, amount, address_id, product, partner, quantity)
+ child_tax = self._unit_compute(cr, uid, tax.child_ids, amount, product, partner, quantity)
res.extend(child_tax)
if tax.child_depend:
for r in res:
@@ -2060,7 +2057,7 @@ class account_tax(osv.osv):
cur_price_unit+=amount2
return res
- def compute_all(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None, force_excluded=False):
+ def compute_all(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, force_excluded=False):
"""
:param force_excluded: boolean used to say that we don't want to consider the value of field price_include of
tax. It's used in encoding by line where you don't matter if you encoded a tax with that boolean to True or
@@ -2080,7 +2077,7 @@ class account_tax(osv.osv):
tex.append(tax)
else:
tin.append(tax)
- tin = self.compute_inv(cr, uid, tin, price_unit, quantity, address_id=address_id, product=product, partner=partner)
+ tin = self.compute_inv(cr, uid, tin, price_unit, quantity, product=product, partner=partner)
for r in tin:
totalex -= r.get('amount', 0.0)
totlex_qty = 0.0
@@ -2088,7 +2085,7 @@ class account_tax(osv.osv):
totlex_qty = totalex/quantity
except:
pass
- tex = self._compute(cr, uid, tex, totlex_qty, quantity, address_id=address_id, product=product, partner=partner)
+ tex = self._compute(cr, uid, tex, totlex_qty, quantity,product=product, partner=partner)
for r in tex:
totalin += r.get('amount', 0.0)
return {
@@ -2097,13 +2094,13 @@ class account_tax(osv.osv):
'taxes': tin + tex
}
- def compute(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None):
+ def compute(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None):
logger = netsvc.Logger()
logger.notifyChannel("warning", netsvc.LOG_WARNING,
"Deprecated, use compute_all(...)['taxes'] instead of compute(...) to manage prices with tax included")
- return self._compute(cr, uid, taxes, price_unit, quantity, address_id, product, partner)
+ return self._compute(cr, uid, taxes, price_unit, quantity, product, partner)
- def _compute(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None):
+ def _compute(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None):
"""
Compute tax values for given PRICE_UNIT, QUANTITY and a buyer/seller ADDRESS_ID.
@@ -2112,7 +2109,7 @@ class account_tax(osv.osv):
tax = {'name':'', 'amount':0.0, 'account_collected_id':1, 'account_paid_id':2}
one tax for each tax id in IDS and their children
"""
- res = self._unit_compute(cr, uid, taxes, price_unit, address_id, product, partner, quantity)
+ res = self._unit_compute(cr, uid, taxes, price_unit, product, partner, quantity)
total = 0.0
precision_pool = self.pool.get('decimal.precision')
for r in res:
@@ -2123,9 +2120,8 @@ class account_tax(osv.osv):
total += r['amount']
return res
- def _unit_compute_inv(self, cr, uid, taxes, price_unit, address_id=None, product=None, partner=None):
- taxes = self._applicable(cr, uid, taxes, price_unit, address_id, product, partner)
- obj_partener_address = self.pool.get('res.partner.address')
+ def _unit_compute_inv(self, cr, uid, taxes, price_unit, product=None, partner=None):
+ taxes = self._applicable(cr, uid, taxes, price_unit, product, partner)
res = []
taxes.reverse()
cur_price_unit = price_unit
@@ -2150,8 +2146,7 @@ class account_tax(osv.osv):
amount = tax.amount
elif tax.type=='code':
- address = address_id and obj_partener_address.browse(cr, uid, address_id) or None
- localdict = {'price_unit':cur_price_unit, 'address':address, 'product':product, 'partner':partner}
+ localdict = {'price_unit':cur_price_unit, 'product':product, 'partner':partner}
exec tax.python_compute_inv in localdict
amount = localdict['result']
elif tax.type=='balance':
@@ -2185,7 +2180,7 @@ class account_tax(osv.osv):
del res[-1]
amount = price_unit
- parent_tax = self._unit_compute_inv(cr, uid, tax.child_ids, amount, address_id, product, partner)
+ parent_tax = self._unit_compute_inv(cr, uid, tax.child_ids, amount, product, partner)
res.extend(parent_tax)
total = 0.0
@@ -2197,7 +2192,7 @@ class account_tax(osv.osv):
r['todo'] = 0
return res
- def compute_inv(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None):
+ def compute_inv(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None):
"""
Compute tax values for given PRICE_UNIT, QUANTITY and a buyer/seller ADDRESS_ID.
Price Unit is a VAT included price
@@ -2207,7 +2202,7 @@ class account_tax(osv.osv):
tax = {'name':'', 'amount':0.0, 'account_collected_id':1, 'account_paid_id':2}
one tax for each tax id in IDS and their children
"""
- res = self._unit_compute_inv(cr, uid, taxes, price_unit, address_id, product, partner=None)
+ res = self._unit_compute_inv(cr, uid, taxes, price_unit, product, partner=None)
total = 0.0
obj_precision = self.pool.get('decimal.precision')
for r in res:
@@ -2806,8 +2801,8 @@ class account_tax_template(osv.osv):
return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0]
_defaults = {
- 'python_compute': lambda *a: '''# price_unit\n# address: res.partner.address object or False\n# product: product.product object or None\n# partner: res.partner object or None\n\nresult = price_unit * 0.10''',
- 'python_compute_inv': lambda *a: '''# price_unit\n# address: res.partner.address object or False\n# product: product.product object or False\n\nresult = price_unit * 0.10''',
+ 'python_compute': lambda *a: '''# price_unit\n# product: product.product object or None\n# partner: res.partner object or None\n\nresult = price_unit * 0.10''',
+ 'python_compute_inv': lambda *a: '''# price_unit\n# product: product.product object or False\n\nresult = price_unit * 0.10''',
'applicable_type': 'true',
'type': 'percent',
'amount': 0,
diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py
index c1f787f5d80..5601179e0fc 100644
--- a/addons/account/account_bank_statement.py
+++ b/addons/account/account_bank_statement.py
@@ -341,11 +341,11 @@ class account_bank_statement(osv.osv):
if not st.name == '/':
st_number = st.name
else:
+ c = {'fiscalyear_id': st.period_id.fiscalyear_id.id}
if st.journal_id.sequence_id:
- c = {'fiscalyear_id': st.period_id.fiscalyear_id.id}
st_number = obj_seq.next_by_id(cr, uid, st.journal_id.sequence_id.id, context=c)
else:
- st_number = obj_seq.next_by_code(cr, uid, 'account.bank.statement')
+ st_number = obj_seq.next_by_code(cr, uid, 'account.bank.statement', context=c)
for line in st.move_line_ids:
if line.state <> 'valid':
diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py
index 2768fd83019..f19c1e1c639 100644
--- a/addons/account/account_cash_statement.py
+++ b/addons/account/account_cash_statement.py
@@ -279,11 +279,11 @@ class account_cash_statement(osv.osv):
raise osv.except_osv(_('Error !'), (_('User %s does not have rights to access %s journal !') % (statement.user_id.name, statement.journal_id.name)))
if statement.name and statement.name == '/':
+ c = {'fiscalyear_id': statement.period_id.fiscalyear_id.id}
if statement.journal_id.sequence_id:
- c = {'fiscalyear_id': statement.period_id.fiscalyear_id.id}
st_number = obj_seq.next_by_id(cr, uid, statement.journal_id.sequence_id.id, context=c)
else:
- st_number = obj_seq.next_by_code(cr, uid, 'account.cash.statement')
+ st_number = obj_seq.next_by_code(cr, uid, 'account.cash.statement', context=c)
vals.update({
'name': st_number
})
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 5e5ac5f482b..700936695b8 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -216,8 +216,6 @@ class account_invoice(osv.osv):
help="If you use payment terms, the due date will be computed automatically at the generation "\
"of accounting entries. If you keep the payment term and the due date empty, it means direct payment. The payment term may compute several due dates, for example 50% now, 50% in one month."),
'partner_id': fields.many2one('res.partner', 'Partner', change_default=True, readonly=True, required=True, states={'draft':[('readonly',False)]}),
- 'address_contact_id': fields.many2one('res.partner.address', 'Contact Address', readonly=True, states={'draft':[('readonly',False)]}),
- 'address_invoice_id': fields.many2one('res.partner.address', 'Invoice Address', readonly=True, required=True, states={'draft':[('readonly',False)]}),
'payment_term': fields.many2one('account.payment.term', 'Payment Term',readonly=True, states={'draft':[('readonly',False)]},
help="If you use payment terms, the due date will be computed automatically at the generation "\
"of accounting entries. If you keep the payment term and the due date empty, it means direct payment. "\
@@ -396,7 +394,6 @@ class account_invoice(osv.osv):
def onchange_partner_id(self, cr, uid, ids, type, partner_id,\
date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False):
invoice_addr_id = False
- contact_addr_id = False
partner_payment_term = False
acc_id = False
bank_id = False
@@ -406,8 +403,7 @@ class account_invoice(osv.osv):
if partner_id:
opt.insert(0, ('id', partner_id))
- res = self.pool.get('res.partner').address_get(cr, uid, [partner_id], ['contact', 'invoice'])
- contact_addr_id = res['contact']
+ res = self.pool.get('res.partner').address_get(cr, uid, [partner_id], ['invoice'])
invoice_addr_id = res['invoice']
p = self.pool.get('res.partner').browse(cr, uid, partner_id)
if company_id:
@@ -442,8 +438,6 @@ class account_invoice(osv.osv):
bank_id = p.bank_ids[0].id
result = {'value': {
- 'address_contact_id': contact_addr_id,
- 'address_invoice_id': invoice_addr_id,
'account_id': acc_id,
'payment_term': partner_payment_term,
'fiscal_position': fiscal_position
@@ -1092,7 +1086,7 @@ class account_invoice(osv.osv):
return map(lambda x: (0,0,x), lines)
def refund(self, cr, uid, ids, date=None, period_id=None, description=None, journal_id=None):
- invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'address_contact_id', 'address_invoice_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line', 'journal_id'])
+ invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line', 'journal_id'])
obj_invoice_line = self.pool.get('account.invoice.line')
obj_invoice_tax = self.pool.get('account.invoice.tax')
obj_journal = self.pool.get('account.journal')
@@ -1140,7 +1134,7 @@ class account_invoice(osv.osv):
'name': description,
})
# take the id part of the tuple returned for many2one fields
- for field in ('address_contact_id', 'address_invoice_id', 'partner_id',
+ for field in ('partner_id',
'account_id', 'currency_id', 'payment_term', 'journal_id'):
invoice[field] = invoice[field] and invoice[field][0]
# create the new invoice
@@ -1257,7 +1251,7 @@ class account_invoice_line(osv.osv):
cur_obj = self.pool.get('res.currency')
for line in self.browse(cr, uid, ids):
price = line.price_unit * (1-(line.discount or 0.0)/100.0)
- taxes = tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, price, line.quantity, product=line.product_id, address_id=line.invoice_id.address_invoice_id, partner=line.invoice_id.partner_id)
+ taxes = tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, price, line.quantity, product=line.product_id, partner=line.invoice_id.partner_id)
res[line.id] = taxes['total']
if line.invoice_id:
cur = line.invoice_id.currency_id
@@ -1277,7 +1271,7 @@ class account_invoice_line(osv.osv):
taxes = l[2].get('invoice_line_tax_id')
if len(taxes[0]) >= 3 and taxes[0][2]:
taxes = tax_obj.browse(cr, uid, list(taxes[0][2]))
- for tax in tax_obj.compute_all(cr, uid, taxes, p,l[2].get('quantity'), context.get('address_invoice_id', False), l[2].get('product_id', False), context.get('partner_id', False))['taxes']:
+ for tax in tax_obj.compute_all(cr, uid, taxes, p,l[2].get('quantity'), l[2].get('product_id', False), context.get('partner_id', False))['taxes']:
t = t - tax['amount']
return t
return 0
@@ -1322,7 +1316,7 @@ class account_invoice_line(osv.osv):
res['arch'] = etree.tostring(doc)
return res
- def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None, company_id=None):
+ def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
if context is None:
context = {}
company_id = company_id if company_id != None else context.get('company_id',False)
@@ -1397,14 +1391,14 @@ class account_invoice_line(osv.osv):
res_final['value']['price_unit'] = new_price
return res_final
- def uos_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None, company_id=None):
+ def uos_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, currency_id=False, context=None, company_id=None):
if context is None:
context = {}
company_id = company_id if company_id != None else context.get('company_id',False)
context = dict(context)
context.update({'company_id': company_id})
warning = {}
- res = self.product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context=context)
+ res = self.product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context=context)
if 'uos_id' in res['value']:
del res['value']['uos_id']
if not uom:
@@ -1437,7 +1431,7 @@ class account_invoice_line(osv.osv):
tax_code_found= False
for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id,
(line.price_unit * (1.0 - (line['discount'] or 0.0) / 100.0)),
- line.quantity, inv.address_invoice_id.id, line.product_id,
+ line.quantity, line.product_id,
inv.partner_id)['taxes']:
if inv.type in ('out_invoice', 'in_invoice'):
@@ -1572,7 +1566,7 @@ class account_invoice_tax(osv.osv):
company_currency = inv.company_id.currency_id.id
for line in inv.invoice_line:
- for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, (line.price_unit* (1-(line.discount or 0.0)/100.0)), line.quantity, inv.address_invoice_id.id, line.product_id, inv.partner_id)['taxes']:
+ for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, (line.price_unit* (1-(line.discount or 0.0)/100.0)), line.quantity, line.product_id, inv.partner_id)['taxes']:
tax['price_unit'] = cur_obj.round(cr, uid, cur, tax['price_unit'])
val={}
val['invoice_id'] = inv.id
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index 59977c252f9..6d499b4d3ad 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -51,12 +51,12 @@
form
-
@@ -226,7 +223,7 @@
help="Todays's Helpdesk Requests"
/>
@@ -239,7 +236,7 @@
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)" />
-
+
+
+
+ id="menu_report_crm_helpdesks_tree" parent="base.menu_project_report" sequence="20"/>
diff --git a/addons/crm_partner_assign/__openerp__.py b/addons/crm_partner_assign/__openerp__.py
index 6f5d0d98dd9..8213e8fa8ef 100644
--- a/addons/crm_partner_assign/__openerp__.py
+++ b/addons/crm_partner_assign/__openerp__.py
@@ -37,7 +37,7 @@ The most appropriate partner can be assigned.
You can also use the geolocalization without using the GPS coordinates.
""",
'author': 'OpenERP SA',
- 'depends': ['crm'],
+ 'depends': ['crm', 'account'],
'demo_xml': [
'res_partner_demo.xml',
],
diff --git a/addons/crm_partner_assign/partner_geo_assign.py b/addons/crm_partner_assign/partner_geo_assign.py
index 903a3f533c1..ed918a3d0a1 100644
--- a/addons/crm_partner_assign/partner_geo_assign.py
+++ b/addons/crm_partner_assign/partner_geo_assign.py
@@ -99,14 +99,13 @@ class res_partner(osv.osv):
def geo_localize(self, cr, uid, ids, context=None):
# Don't pass context to browse()! We need country names in english below
for partner in self.browse(cr, uid, ids):
- if not partner.address:
+ if not partner:
continue
- contact = partner.address[0] #TOFIX: should be get latitude and longitude for default contact?
- result = geo_find(geo_query_address(street=contact.street,
- zip=contact.zip,
- city=contact.city,
- state=contact.state_id.name,
- country=contact.country_id.name))
+ result = geo_find(geo_query_address(street=partner.street,
+ zip=partner.zip,
+ city=partner.city,
+ state=partner.state_id.name,
+ country=partner.country_id.name))
if result:
self.write(cr, uid, [partner.id], {
'partner_latitude': result[0],
@@ -199,7 +198,7 @@ class crm_lead(osv.osv):
('partner_weight', '>', 0),
('partner_latitude', '>', latitude - 2), ('partner_latitude', '<', latitude + 2),
('partner_longitude', '>', longitude - 1.5), ('partner_longitude', '<', longitude + 1.5),
- ('country', '=', lead.country_id.id),
+ ('country_id', '=', lead.country_id.id),
], context=context)
# 2. second way: in the same country, big area
@@ -208,7 +207,7 @@ class crm_lead(osv.osv):
('partner_weight', '>', 0),
('partner_latitude', '>', latitude - 4), ('partner_latitude', '<', latitude + 4),
('partner_longitude', '>', longitude - 3), ('partner_longitude', '<' , longitude + 3),
- ('country', '=', lead.country_id.id),
+ ('country_id', '=', lead.country_id.id),
], context=context)
# 3. third way: in the same country, extra large area
@@ -225,7 +224,7 @@ class crm_lead(osv.osv):
# still haven't found any, let's take all partners in the country!
partner_ids = res_partner.search(cr, uid, [
('partner_weight', '>', 0),
- ('country', '=', lead.country_id.id),
+ ('country_id', '=', lead.country_id.id),
], context=context)
# 6. sixth way: closest partner whatsoever, just to have at least one result
diff --git a/addons/crm_partner_assign/report/crm_lead_report_view.xml b/addons/crm_partner_assign/report/crm_lead_report_view.xml
index a0bbd62c131..9f6546aee4a 100644
--- a/addons/crm_partner_assign/report/crm_lead_report_view.xml
+++ b/addons/crm_partner_assign/report/crm_lead_report_view.xml
@@ -12,7 +12,7 @@
-
-
+
graph
-
+
+ parent="base.next_id_64" action="action_report_crm_opportunity_assign" sequence="20"/>
diff --git a/addons/crm_partner_assign/report/crm_partner_report.py b/addons/crm_partner_assign/report/crm_partner_report.py
index c225e35f581..7dccab30da2 100644
--- a/addons/crm_partner_assign/report/crm_partner_report.py
+++ b/addons/crm_partner_assign/report/crm_partner_report.py
@@ -51,7 +51,7 @@ class crm_partner_report_assign(osv.osv):
SELECT
coalesce(i.id, p.id - 1000000000) as id,
p.id as partner_id,
- (SELECT country_id FROM res_partner_address a WHERE a.partner_id=p.id AND country_id is not null limit 1) as country_id,
+ (SELECT country_id FROM res_partner a WHERE a.parent_id=p.id AND country_id is not null limit 1) as country_id,
p.grade_id,
p.activation,
p.date_review,
diff --git a/addons/crm_partner_assign/report/crm_partner_report_view.xml b/addons/crm_partner_assign/report/crm_partner_report_view.xml
index 528233fc183..e7581f5bab5 100644
--- a/addons/crm_partner_assign/report/crm_partner_report_view.xml
+++ b/addons/crm_partner_assign/report/crm_partner_report_view.xml
@@ -77,7 +77,7 @@
+ parent="base.next_id_64" action="action_report_crm_partner_assign" sequence="25"/>
diff --git a/addons/crm_partner_assign/res_partner_view.xml b/addons/crm_partner_assign/res_partner_view.xml
index f9d9d946ead..4bd768179a3 100644
--- a/addons/crm_partner_assign/res_partner_view.xml
+++ b/addons/crm_partner_assign/res_partner_view.xml
@@ -33,7 +33,7 @@
tree,form
-
+
@@ -69,7 +69,7 @@
form
diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
index 97d9ecac787..2bc2d67d00a 100644
--- a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
+++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
@@ -37,7 +37,6 @@ class crm_lead_forward_to_partner(osv.osv_memory):
'user_id': fields.many2one('res.users', "User"),
'attachment_ids': fields.many2many('ir.attachment','lead_forward_to_partner_attachment_rel', 'wizard_id', 'attachment_id', 'Attachments'),
'partner_id' : fields.many2one('res.partner', 'Partner'),
- 'address_id' : fields.many2one('res.partner.address', 'Address'),
'history': fields.selection([('info', 'Case Information'), ('latest', 'Latest email'), ('whole', 'Whole Story')], 'Send history', required=True),
}
@@ -75,27 +74,15 @@ class crm_lead_forward_to_partner(osv.osv_memory):
"""This function fills address information based on partner/user selected
"""
if not partner_id:
- return {'value' : {'email_to' : False, 'address_id': False}}
-
+ return {'value' : {'email_to' : False}}
partner_obj = self.pool.get('res.partner')
- addr = partner_obj.address_get(cr, uid, [partner_id], ['contact'])
- data = {'address_id': addr['contact']}
- data.update(self.on_change_address(cr, uid, ids, addr['contact'])['value'])
-
+ data = {}
partner = partner_obj.browse(cr, uid, [partner_id])
user_id = partner and partner[0].user_id or False
- email = user_id and user_id.user_email or ''
- data.update({'email_cc' : email, 'user_id': user_id and user_id.id or False})
- return {
- 'value' : data,
- 'domain' : {'address_id' : partner_id and "[('partner_id', '=', partner_id)]" or "[]"}
- }
-
- def on_change_address(self, cr, uid, ids, address_id):
- email = ''
- if address_id:
- email = self.pool.get('res.partner.address').browse(cr, uid, address_id).email
- return {'value': {'email_to' : email}}
+ data.update({'email_from': partner and partner[0].email or "",
+ 'email_cc' : user_id and user_id.user_email or '',
+ 'user_id': user_id and user_id.id or False})
+ return {'value' : data}
def action_forward(self, cr, uid, ids, context=None):
"""
diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml b/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml
index 645c729b164..7f20d5b4b15 100644
--- a/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml
+++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml
@@ -20,7 +20,6 @@
-
diff --git a/addons/crm_profiling/crm_profiling_view.xml b/addons/crm_profiling/crm_profiling_view.xml
index a54d3d4b0a9..9330f20ee0c 100644
--- a/addons/crm_profiling/crm_profiling_view.xml
+++ b/addons/crm_profiling/crm_profiling_view.xml
@@ -10,8 +10,8 @@
You can create specific topic-related questionnaires to guide your team(s) in the sales cycle by helping them to ask the right questions. The segmentation tool allows you to automatically assign a partner to a category according to his answers to the different questionnaires.
-
+
Questions
@@ -20,8 +20,8 @@
tree,form
-
+
diff --git a/addons/crm_profiling/test/process/profiling.yml b/addons/crm_profiling/test/process/profiling.yml
index 99fe2da1733..aa3060add3c 100644
--- a/addons/crm_profiling/test/process/profiling.yml
+++ b/addons/crm_profiling/test/process/profiling.yml
@@ -22,13 +22,12 @@
I'm creating new partner "John" with his email "info@mycustomer.com".
-
!record {model: res.partner, id: res_partner_john0}:
- address:
- - city: Bruxelles
- country_id: base.be
- street: Rue des Palais 51, bte 33
- type: default
- zip: '1000'
- email: 'info@mycustomer.com'
+ city: Bruxelles
+ country_id: base.be
+ street: Rue des Palais 51, bte 33
+ type: default
+ zip: '1000'
+ email: 'info@mycustomer.com'
name: John
category_id:
- res_partner_category_customers0
diff --git a/addons/crm_todo/crm_todo_view.xml b/addons/crm_todo/crm_todo_view.xml
index c098f908b8a..a587463fedb 100644
--- a/addons/crm_todo/crm_todo_view.xml
+++ b/addons/crm_todo/crm_todo_view.xml
@@ -57,7 +57,8 @@
+ action="crm_todo_action"
+ sequence="5"/>
diff --git a/addons/crm_todo/i18n/fi.po b/addons/crm_todo/i18n/fi.po
new file mode 100644
index 00000000000..10a17f7f87f
--- /dev/null
+++ b/addons/crm_todo/i18n/fi.po
@@ -0,0 +1,96 @@
+# Finnish translation for openobject-addons
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 00:36+0000\n"
+"PO-Revision-Date: 2012-03-26 09:38+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Finnish \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-03-27 04:51+0000\n"
+"X-Generator: Launchpad (build 15011)\n"
+
+#. module: crm_todo
+#: model:ir.model,name:crm_todo.model_project_task
+msgid "Task"
+msgstr "Tehtävä"
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Timebox"
+msgstr "Aikaikkuna"
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "For cancelling the task"
+msgstr "Peruuttaaksesi tehtävän"
+
+#. module: crm_todo
+#: constraint:project.task:0
+msgid "Error ! Task end-date must be greater then task start-date"
+msgstr ""
+"Virhe! Tehtävän lopetuspäivän tulee olla myöhäisempi kuin aloituspäivä"
+
+#. module: crm_todo
+#: model:ir.model,name:crm_todo.model_crm_lead
+msgid "crm.lead"
+msgstr ""
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Next"
+msgstr "seuraava"
+
+#. module: crm_todo
+#: model:ir.actions.act_window,name:crm_todo.crm_todo_action
+#: model:ir.ui.menu,name:crm_todo.menu_crm_todo
+msgid "My Tasks"
+msgstr "Omat tehtävät"
+
+#. module: crm_todo
+#: view:crm.lead:0
+#: field:crm.lead,task_ids:0
+msgid "Tasks"
+msgstr "Tehtävät"
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Done"
+msgstr "Valmis"
+
+#. module: crm_todo
+#: constraint:project.task:0
+msgid "Error ! You cannot create recursive tasks."
+msgstr "Virhe ! Et voi luoda rekursiivisiä tehtäviä."
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Cancel"
+msgstr "Peruuta"
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Extra Info"
+msgstr "Lisätiedot"
+
+#. module: crm_todo
+#: field:project.task,lead_id:0
+msgid "Lead / Opportunity"
+msgstr "Liidi / mahdollisuus"
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "For changing to done state"
+msgstr "Vaihtaaksesi valmis tilaan"
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Previous"
+msgstr "edellinen"
diff --git a/addons/crm_todo/i18n/it.po b/addons/crm_todo/i18n/it.po
new file mode 100644
index 00000000000..00c702f72f6
--- /dev/null
+++ b/addons/crm_todo/i18n/it.po
@@ -0,0 +1,97 @@
+# Italian translation for openobject-addons
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 00:36+0000\n"
+"PO-Revision-Date: 2012-03-23 08:30+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Italian \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-03-24 04:54+0000\n"
+"X-Generator: Launchpad (build 14981)\n"
+
+#. module: crm_todo
+#: model:ir.model,name:crm_todo.model_project_task
+msgid "Task"
+msgstr "Attività"
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Timebox"
+msgstr "Periodo Inderogabile"
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "For cancelling the task"
+msgstr ""
+
+#. module: crm_todo
+#: constraint:project.task:0
+msgid "Error ! Task end-date must be greater then task start-date"
+msgstr ""
+"Errore ! La data di termine del compito deve essere antecedente a quella di "
+"inizio"
+
+#. module: crm_todo
+#: model:ir.model,name:crm_todo.model_crm_lead
+msgid "crm.lead"
+msgstr ""
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Next"
+msgstr "Successivo"
+
+#. module: crm_todo
+#: model:ir.actions.act_window,name:crm_todo.crm_todo_action
+#: model:ir.ui.menu,name:crm_todo.menu_crm_todo
+msgid "My Tasks"
+msgstr "Le Mie Attività"
+
+#. module: crm_todo
+#: view:crm.lead:0
+#: field:crm.lead,task_ids:0
+msgid "Tasks"
+msgstr "Attività"
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Done"
+msgstr "Completato"
+
+#. module: crm_todo
+#: constraint:project.task:0
+msgid "Error ! You cannot create recursive tasks."
+msgstr "Errore ! Non è possibile creare attività ricorsive."
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Cancel"
+msgstr "Cancella"
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Extra Info"
+msgstr "Altre Informazioni"
+
+#. module: crm_todo
+#: field:project.task,lead_id:0
+msgid "Lead / Opportunity"
+msgstr ""
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "For changing to done state"
+msgstr ""
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Previous"
+msgstr "Precedente"
diff --git a/addons/decimal_precision/i18n/ja.po b/addons/decimal_precision/i18n/ja.po
new file mode 100644
index 00000000000..43e0b4f18ed
--- /dev/null
+++ b/addons/decimal_precision/i18n/ja.po
@@ -0,0 +1,49 @@
+# Japanese translation for openobject-addons
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 00:36+0000\n"
+"PO-Revision-Date: 2012-04-01 06:02+0000\n"
+"Last-Translator: Masaki Yamaya \n"
+"Language-Team: Japanese \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-04-02 04:37+0000\n"
+"X-Generator: Launchpad (build 15032)\n"
+
+#. module: decimal_precision
+#: field:decimal.precision,digits:0
+msgid "Digits"
+msgstr "桁数"
+
+#. module: decimal_precision
+#: model:ir.actions.act_window,name:decimal_precision.action_decimal_precision_form
+#: model:ir.ui.menu,name:decimal_precision.menu_decimal_precision_form
+msgid "Decimal Accuracy"
+msgstr "十進数の精度"
+
+#. module: decimal_precision
+#: field:decimal.precision,name:0
+msgid "Usage"
+msgstr "使い方"
+
+#. module: decimal_precision
+#: sql_constraint:decimal.precision:0
+msgid "Only one value can be defined for each given usage!"
+msgstr "それぞれの使い方には一つの値だけ定義できます!"
+
+#. module: decimal_precision
+#: view:decimal.precision:0
+msgid "Decimal Precision"
+msgstr "十進数の精度"
+
+#. module: decimal_precision
+#: model:ir.model,name:decimal_precision.model_decimal_precision
+msgid "decimal.precision"
+msgstr "十進数.精度"
diff --git a/addons/delivery/delivery.py b/addons/delivery/delivery.py
index 9f95a430f4e..d7b02f2f106 100644
--- a/addons/delivery/delivery.py
+++ b/addons/delivery/delivery.py
@@ -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)
diff --git a/addons/delivery/delivery_demo.xml b/addons/delivery/delivery_demo.xml
index 427f943890b..a5db7ff042c 100644
--- a/addons/delivery/delivery_demo.xml
+++ b/addons/delivery/delivery_demo.xml
@@ -7,11 +7,6 @@
The Poste
-
- default
-
-
-
diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml
index 1e47d815084..047db1fea1d 100644
--- a/addons/delivery/delivery_view.xml
+++ b/addons/delivery/delivery_view.xml
@@ -1,7 +1,7 @@
-
+
delivery.carrier.tree
@@ -81,7 +81,7 @@
Define your delivery methods and their pricing. The delivery costs can be added on the sale order form or in the invoice, based on the delivery orders.
-
+
@@ -131,7 +131,7 @@
tree,formThe delivery price list allows you to compute the cost and sales price of the delivery according to the weight of the products and other criteria. You can define several price lists for one delivery method, per country or a zone in a specific country defined by a postal code range.
-
+
delivery.grid.line.form
@@ -189,7 +189,7 @@
stock.picking
-
+
diff --git a/addons/delivery/report/shipping.rml b/addons/delivery/report/shipping.rml
index 3709c465e66..5a3750e64a8 100644
--- a/addons/delivery/report/shipping.rml
+++ b/addons/delivery/report/shipping.rml
@@ -125,7 +125,7 @@
-
+
@@ -134,8 +134,8 @@
[[ o.sale_id and o.sale_id.partner_invoice_id and display_address(o.sale_id.partner_invoice_id) ]]
- [[ o.address_id and o.address_id.partner_id and o.address_id.partner_id.name or '' ]]
- [[ o.address_id and o.address_id and display_address(o.address_id) ]]
+ [[ o.partner_id and o.partner_id and o.partner_id.name or '' ]]
+ [[ o.partner_id and o.partner_id and display_address(o.partner_id) ]]
diff --git a/addons/delivery/stock.py b/addons/delivery/stock.py
index 6a7dcac91d4..b441a8e5efe 100644
--- a/addons/delivery/stock.py
+++ b/addons/delivery/stock.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -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 .
+# along with this program. If not, see .
#
##############################################################################
@@ -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'),
@@ -84,7 +84,7 @@ class stock_picking(osv.osv):
for inv_line in invoice.invoice_line):
return None
grid_id = carrier_obj.grid_get(cr, uid, [picking.carrier_id.id],
- picking.address_id.id, context=context)
+ picking.partner_id.id, context=context)
if not grid_id:
raise osv.except_osv(_('Warning'),
_('The carrier %s (id: %d) has no delivery grid!') \
@@ -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.partner_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)
diff --git a/addons/document/board_document_view.xml b/addons/document/board_document_view.xml
index e3b1b4c9c64..4412423c97b 100644
--- a/addons/document/board_document_view.xml
+++ b/addons/document/board_document_view.xml
@@ -35,10 +35,10 @@
diff --git a/addons/document/document.py b/addons/document/document.py
index 9ea7f97a321..92ece063a47 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -311,9 +311,6 @@ class document_file(osv.osv):
elif 'partner_id' in obj_model._columns and obj_model._columns['partner_id']._obj == 'res.partner':
bro = obj_model.browse(cr, uid, res_id, context=context)
return bro.partner_id.id
- elif 'address_id' in obj_model._columns and obj_model._columns['address_id']._obj == 'res.partner.address':
- bro = obj_model.browse(cr, uid, res_id, context=context)
- return bro.address_id.partner_id.id
return False
def unlink(self, cr, uid, ids, context=None):
diff --git a/addons/edi/models/res_company.py b/addons/edi/models/res_company.py
index cf5efe997e0..0ab6607cdad 100644
--- a/addons/edi/models/res_company.py
+++ b/addons/edi/models/res_company.py
@@ -37,13 +37,12 @@ class res_company(osv.osv):
an empty dict if no address can be found
"""
res_partner = self.pool.get('res.partner')
- res_partner_address = self.pool.get('res.partner.address')
addresses = res_partner.address_get(cr, uid, [company.partner_id.id], ['default', 'contact', 'invoice'])
addr_id = addresses['invoice'] or addresses['contact'] or addresses['default']
result = {}
if addr_id:
- address = res_partner_address.browse(cr, uid, addr_id, context=context)
- result = res_partner_address.edi_export(cr, uid, [address], edi_struct=edi_address_struct, context=context)[0]
+ address = res_partner.browse(cr, uid, addr_id, context=context)
+ result = res_partner.edi_export(cr, uid, [address], edi_struct=edi_address_struct, context=context)[0]
if company.logo:
result['logo'] = company.logo # already base64-encoded
if company.paypal_account:
@@ -52,7 +51,7 @@ class res_company(osv.osv):
res_partner_bank = self.pool.get('res.partner.bank')
bank_ids = res_partner_bank.search(cr, uid, [('company_id','=',company.id),('footer','=',True)], context=context)
if bank_ids:
- result['bank_ids'] = res_partner_address.edi_m2m(cr, uid,
+ result['bank_ids'] = res_partner.edi_m2m(cr, uid,
res_partner_bank.browse(cr, uid, bank_ids, context=context),
context=context)
return result
diff --git a/addons/edi/models/res_partner.py b/addons/edi/models/res_partner.py
index 7c40a5c7354..357fdec061b 100644
--- a/addons/edi/models/res_partner.py
+++ b/addons/edi/models/res_partner.py
@@ -20,13 +20,16 @@
##############################################################################
import logging
-from osv import fields,osv
+from osv import fields,osv
from edi import EDIMixin
from openerp import SUPERUSER_ID
from tools.translate import _
-RES_PARTNER_ADDRESS_EDI_STRUCT = {
+RES_PARTNER_EDI_STRUCT = {
'name': True,
+ 'ref': True,
+ 'lang': True,
+ 'website': True,
'email': True,
'street': True,
'street2': True,
@@ -39,14 +42,6 @@ RES_PARTNER_ADDRESS_EDI_STRUCT = {
'mobile': True,
}
-RES_PARTNER_EDI_STRUCT = {
- 'name': True,
- 'ref': True,
- 'lang': True,
- 'website': True,
- 'address': RES_PARTNER_ADDRESS_EDI_STRUCT
-}
-
class res_partner(osv.osv, EDIMixin):
_inherit = "res.partner"
@@ -55,9 +50,6 @@ class res_partner(osv.osv, EDIMixin):
edi_struct or dict(RES_PARTNER_EDI_STRUCT),
context=context)
-class res_partner_address(osv.osv, EDIMixin):
- _inherit = "res.partner.address"
-
def _get_bank_type(self, cr, uid, context=None):
# first option: the "normal" bank type, installed by default
res_partner_bank_type = self.pool.get('res.partner.bank.type')
@@ -65,7 +57,6 @@ class res_partner_address(osv.osv, EDIMixin):
return self.pool.get('ir.model.data').get_object(cr, uid, 'base', 'bank_normal', context=context).code
except ValueError:
pass
-
# second option: create a new custom type for EDI or use it if already created, as IBAN type is
# not always appropriate: we need a free-form bank type for max flexibility (users can correct
# data manually after import)
@@ -78,19 +69,14 @@ class res_partner_address(osv.osv, EDIMixin):
'code': label})
return code
- def edi_export(self, cr, uid, records, edi_struct=None, context=None):
- return super(res_partner_address,self).edi_export(cr, uid, records,
- edi_struct or dict(RES_PARTNER_ADDRESS_EDI_STRUCT),
- context=context)
-
def edi_import(self, cr, uid, edi_document, context=None):
# handle bank info, if any
edi_bank_ids = edi_document.pop('bank_ids', None)
- address_id = super(res_partner_address,self).edi_import(cr, uid, edi_document, context=context)
+ contact_id = super(res_partner,self).edi_import(cr, uid, edi_document, context=context)
if edi_bank_ids:
- address = self.browse(cr, uid, address_id, context=context)
+ contact = self.browse(cr, uid, contact_id, context=context)
import_ctx = dict((context or {}),
- default_partner_id=address.partner_id.id,
+ default_partner_id = contact.id,
default_state=self._get_bank_type(cr, uid, context))
for ext_bank_id, bank_name in edi_bank_ids:
try:
@@ -101,5 +87,7 @@ class res_partner_address(osv.osv, EDIMixin):
logging.getLogger('edi.res_partner').warning('Failed to import bank account using'
'bank type: %s, ignoring', import_ctx['default_state'],
exc_info=True)
- return address_id
+ return contact_id
+
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py
index acd1aed24de..86f136ca5b9 100644
--- a/addons/email_template/email_template.py
+++ b/addons/email_template/email_template.py
@@ -57,6 +57,8 @@ class email_template(osv.osv):
:param int res_id: id of the document record this mail is related to.
"""
if not template: return u""
+ if context is None:
+ context = {}
try:
template = tools.ustr(template)
record = None
diff --git a/addons/email_template/wizard/mail_compose_message.py b/addons/email_template/wizard/mail_compose_message.py
index ef4572429a1..a4fd749979c 100644
--- a/addons/email_template/wizard/mail_compose_message.py
+++ b/addons/email_template/wizard/mail_compose_message.py
@@ -95,7 +95,7 @@ class mail_compose_message(osv.osv_memory):
for fname, fcontent in attachment.iteritems():
data_attach = {
'name': fname,
- 'datas': base64.b64encode(fcontent),
+ 'datas': fcontent,
'datas_fname': fname,
'description': fname,
'res_model' : self._name,
diff --git a/addons/event/__openerp__.py b/addons/event/__openerp__.py
index 06252001c83..ea0e4316ef5 100644
--- a/addons/event/__openerp__.py
+++ b/addons/event/__openerp__.py
@@ -53,6 +53,7 @@ Note that:
],
'demo_xml': ['event_demo.xml'],
'test': ['test/process/event_draft2done.yml'],
+ 'css': ['static/src/css/event.css'],
'installable': True,
'application': True,
'auto_install': False,
diff --git a/addons/event/board_association_view.xml b/addons/event/board_association_view.xml
index 0a4755ab105..96db3db6781 100644
--- a/addons/event/board_association_view.xml
+++ b/addons/event/board_association_view.xml
@@ -62,8 +62,10 @@
form
+
@@ -42,34 +41,44 @@
- 50350
- Conference on ERP Buisness
+ Conference on ERP Business200
-
+ Agrolait
+ s.l@agrolait.be
+ 003281588558
+ 5
+ ASUStek
+ info@asustek.com
+ + 1 64 61 04 01
+ 10
+ Syleam
+ contact@syleam.fr
+ +33 (0) 2 33 31 22 10
+ 6
@@ -77,6 +86,9 @@
+ Camptocamp
+ openerp@camptocamp.com
+ +41 21 619 10 04 5
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index f396d97827e..4e22569c3e1 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -2,7 +2,7 @@
-
+
@@ -41,7 +41,7 @@
form
-
+
@@ -63,7 +63,7 @@
-
+
@@ -156,6 +156,71 @@
+
+
+
+
+ event.event.kanban
+ event.event
+ kanban
+
+
+
+
+
+
+
+
+
+
+
+
+
+
${company.partner_id.address and company.partner_id.address[0].street or ''|entity}
${_("phone")}:
${company.partner_id.address and company.partner_id.address[0].phone or ''|entity}
+
${company.partner_id and company.partner_id.street or ''|entity}
${_("phone")}:
${company.partner_id and company.partner_id.phone or ''|entity}
-
${company.partner_id.address and company.partner_id.address[0].street2 or ''|entity}
${_('Fax')}:
${company.partner_id.address and company.partner_id.address[0].fax or ''|entity}
+
${company.partner_id and company.partner_id.street2 or ''|entity}
${_('Fax')}:
${company.partner_id and company.partner_id.fax or ''|entity}
-
${company.partner_id.address and company.partner_id.address[0].zip or ''|entity} ${company.partner_id.address and company.partner_id.address[0].city or ''|entity}
diff --git a/addons/marketing_campaign/marketing_campaign_view.xml b/addons/marketing_campaign/marketing_campaign_view.xml
index 0300122e8ff..c7540935005 100644
--- a/addons/marketing_campaign/marketing_campaign_view.xml
+++ b/addons/marketing_campaign/marketing_campaign_view.xml
@@ -122,7 +122,7 @@
-
+
@@ -1022,7 +1022,7 @@
parent="base.menu_mrp_root" sequence="2"
groups="base.group_extended"/>
diff --git a/addons/mrp/report/mrp_report_view.xml b/addons/mrp/report/mrp_report_view.xml
index b7e51dd7cf0..251eafc89ea 100644
--- a/addons/mrp/report/mrp_report_view.xml
+++ b/addons/mrp/report/mrp_report_view.xml
@@ -41,8 +41,8 @@
-
+
diff --git a/addons/mrp/security/ir.model.access.csv b/addons/mrp/security/ir.model.access.csv
index 4289010d165..cd6b8db2195 100644
--- a/addons/mrp/security/ir.model.access.csv
+++ b/addons/mrp/security/ir.model.access.csv
@@ -37,7 +37,6 @@ access_product_product_user,product.product user,product.model_product_product,m
access_product_template_user,product.template user,product.model_product_template,mrp.group_mrp_user,1,0,0,0
access_product_uom_user,product.uom user,product.model_product_uom,mrp.group_mrp_user,1,0,0,0
access_product_supplierinfo_user,product.supplierinfo user,product.model_product_supplierinfo,mrp.group_mrp_user,1,1,1,1
-access_res_partner_address,res.partner.address,base.model_res_partner_address,mrp.group_mrp_user,1,0,0,0
access_stock_tracking,stock.tracking,stock.model_stock_tracking,mrp.group_mrp_user,1,1,1,0
access_res_partner,res.partner,base.model_res_partner,mrp.group_mrp_user,1,0,0,0
access_workcenter_user,mrp.production.workcenter.line.user,model_mrp_production_workcenter_line,mrp.group_mrp_user,1,1,1,1
diff --git a/addons/mrp/test/order_process.yml b/addons/mrp/test/order_process.yml
index 496e039d0d4..ee78e036d44 100644
--- a/addons/mrp/test/order_process.yml
+++ b/addons/mrp/test/order_process.yml
@@ -22,8 +22,8 @@
assert line.product_qty == (2.0*factor), "Qty is not correspond."
assert line.product_uom.id == ref('product.product_uom_unit'), "UOM is not correspond"
sidepanel = True
- elif line.product_id.id == ref('product.product_product_woodlintelm0'): #LIN40 4*0.25 Meter
- assert not woodlintelm, "Production line is already generated for LIN40."
+ elif line.product_id.id == ref('product.product_product_woodlintelm0'): #LIN40 4*0.25 Meter
+ assert not woodlintelm, "Production line is already generated for LIN40."
assert line.product_qty == (4*0.25*factor), "Qty is not correspond."
assert line.product_uom.id == ref('product.product_uom_meter'), "UOM is not correspond"
woodlintelm = True
@@ -32,7 +32,7 @@
assert line.product_qty == (0.25*factor), "Qty is not correspond."
assert line.product_uom.id == ref('product.product_uom_meter'), "UOM is not correspond"
woodmm0 = True
- elif line.product_id.id == ref('product.product_product_metalcleats0'): #METC000 4*3 Unit
+ elif line.product_id.id == ref('product.product_product_metalcleats0'): #METC000 4*3 Unit
assert not metalcleats, "Production line is already generated for METC000."
assert line.product_qty == (4*3*factor), "Qty is not correspond."
assert line.product_uom.id == ref('product.product_uom_unit'), "UOM is not correspond"
@@ -107,7 +107,7 @@
routing_loc = None
if order.bom_id.routing_id and order.bom_id.routing_id.location_id:
routing_loc = order.bom_id.routing_id.location_id.id
- date_planned = order.date_planned
+ date_planned = order.date_planned
for move_line in order.move_lines:
for order_line in order.product_lines:
if move_line.product_id.type not in ('product', 'consu'):
@@ -129,18 +129,18 @@
procurement = self.pool.get('procurement.order')
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"))
assert order.picking_id, 'Internal Shipment should be created!'
-
+
routing_loc = None
pick_type = 'internal'
- address_id = False
+ partner_id = False
if order.bom_id.routing_id and order.bom_id.routing_id.location_id:
routing_loc = order.bom_id.routing_id.location_id
if routing_loc.usage <> 'internal':
pick_type = 'out'
- address_id = routing_loc.address_id and routing_loc.address_id.id or False
+ partner_id = routing_loc.partner_id and routing_loc.partner_id.id or False
routing_loc = routing_loc.id
assert order.picking_id.type == pick_type, "Shipment should be Internal."
- assert order.picking_id.address_id.id == address_id, "Shipment Address is not correspond with Adderss of Routing Location."
+ assert order.picking_id.partner_id.id == partner_id, "Shipment Address is not correspond with Adderss of Routing Location."
date_planned = order.date_planned
for move_line in order.picking_id.move_lines:
for order_line in order.product_lines:
@@ -167,7 +167,7 @@
assert shipment_procurement.product_uos.id == order_line.product_uos.id, "UOS is not correspond in procurement."
assert shipment_procurement.location_id.id == order.location_src_id.id, "Location is not correspond in procurement."
assert shipment_procurement.procure_method == order_line.product_id.procure_method, "Procure method is not correspond in procurement."
-
+
-
I change production qty with 3 Dozen Shelf 100cm.
-
@@ -187,7 +187,7 @@
assert order.product_qty == 3, "Qty is not changed in order."
move = order.move_created_ids[0]
assert move.product_qty == order.product_qty, "Qty is not changed in move line."
--
+-
I run scheduler.
-
!python {model: procurement.order}: |
@@ -223,7 +223,7 @@
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"))
for move in order.move_lines:
move.action_consume(move.product_qty)
- if move.product_id.id == ref("product.product_product_metalcleats0"):
+ if move.product_id.id == ref("product.product_product_metalcleats0"):
move.action_scrap(5.0, scrap_location_id)
-
I produce product.
@@ -242,8 +242,8 @@
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"))
assert order.state == 'done', "Production order should be closed."
--
- I check Total Costs at End of Production.
+-
+ I check Total Costs at End of Production.
-
!python {model: mrp.production}: |
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"))
@@ -275,7 +275,7 @@
assert line.journal_id.id == wc.costs_journal_id.id, "Account Journal is not correspond."
assert line.product_id.id == wc.product_id.id, "Product is not correspond."
assert line.product_uom_id.id == wc.product_id.uom_id.id, "UOM is not correspond."
-
+
-
I print a "BOM Structure".
-
diff --git a/addons/mrp_operations/mrp_operations_view.xml b/addons/mrp_operations/mrp_operations_view.xml
index c40b9611fb5..00b4947122e 100644
--- a/addons/mrp_operations/mrp_operations_view.xml
+++ b/addons/mrp_operations/mrp_operations_view.xml
@@ -261,17 +261,17 @@
id="menu_mrp_production_wc_order"
action="mrp_production_wc_action_form"
groups="base.group_extended" sequence="2"/>
-
-
+ groups="base.group_extended"/>-->
diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py
index 2edaba9431a..4a0085e3db9 100644
--- a/addons/mrp_repair/mrp_repair.py
+++ b/addons/mrp_repair/mrp_repair.py
@@ -70,12 +70,12 @@ class mrp_repair(osv.osv):
for line in repair.operations:
#manage prices with tax included use compute_all instead of compute
if line.to_invoice:
- tax_calculate = tax_obj.compute_all(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty, repair.partner_invoice_id.id, line.product_id, repair.partner_id)
+ tax_calculate = tax_obj.compute_all(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty, line.product_id, repair.partner_id)
for c in tax_calculate['taxes']:
val += c['amount']
for line in repair.fees_lines:
if line.to_invoice:
- tax_calculate = tax_obj.compute_all(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty, repair.partner_invoice_id.id, line.product_id, repair.partner_id)
+ tax_calculate = tax_obj.compute_all(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty, line.product_id, repair.partner_id)
for c in tax_calculate['taxes']:
val += c['amount']
res[repair.id] = cur_obj.round(cr, uid, cur, val)
@@ -117,8 +117,8 @@ class mrp_repair(osv.osv):
'name': fields.char('Repair Reference',size=24, required=True),
'product_id': fields.many2one('product.product', string='Product to Repair', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'partner_id' : fields.many2one('res.partner', 'Partner', select=True, help='This field allow you to choose the parner that will be invoiced and delivered'),
- 'address_id': fields.many2one('res.partner.address', 'Delivery Address', domain="[('partner_id','=',partner_id)]"),
- 'default_address_id': fields.function(_get_default_address, type="many2one", relation="res.partner.address"),
+ 'address_id': fields.many2one('res.partner', 'Delivery Address', domain="[('parent_id','=',partner_id)]"),
+ 'default_address_id': fields.function(_get_default_address, type="many2one", relation="res.partner"),
'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number', select=True, domain="[('product_id','=',product_id)]"),
'state': fields.selection([
('draft','Quotation'),
@@ -142,7 +142,7 @@ class mrp_repair(osv.osv):
'guarantee_limit': fields.date('Guarantee limit', help="The guarantee limit is computed as: last move date + warranty defined on selected product. If the current date is below the guarantee limit, each operation and fee you will add will be set as 'not to invoiced' by default. Note that you can change manually afterwards."),
'operations' : fields.one2many('mrp.repair.line', 'repair_id', 'Operation Lines', readonly=True, states={'draft':[('readonly',False)]}),
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', help='The pricelist comes from the selected partner, by default.'),
- 'partner_invoice_id':fields.many2one('res.partner.address', 'Invoicing Address', domain="[('partner_id','=',partner_id)]"),
+ 'partner_invoice_id':fields.many2one('res.partner', 'Invoicing Address'),
'invoice_method':fields.selection([
("none","No Invoice"),
("b4repair","Before Repair"),
@@ -229,12 +229,12 @@ class mrp_repair(osv.osv):
data['value']['guarantee_limit'] = limit.strftime('%Y-%m-%d')
data['value']['location_id'] = move.location_dest_id.id
data['value']['location_dest_id'] = move.location_dest_id.id
- if move.address_id:
- data['value']['partner_id'] = move.address_id.partner_id and move.address_id.partner_id.id
+ if move.partner_id:
+ data['value']['partner_id'] = move.partner_id and move.partner_id.id
else:
data['value']['partner_id'] = False
- data['value']['address_id'] = move.address_id and move.address_id.id
- d = self.onchange_partner_id(cr, uid, ids, data['value']['partner_id'], data['value']['address_id'])
+ data['value']['partner_id'] = move.partner_id and move.partner_id.id
+ d = self.onchange_partner_id(cr, uid, ids, data['value']['partner_id'], data['value']['partner_id'])
data['value'].update(d['value'])
return data
@@ -261,7 +261,7 @@ class mrp_repair(osv.osv):
partner = part_obj.browse(cr, uid, part)
pricelist = partner.property_product_pricelist and partner.property_product_pricelist.id or False
return {'value': {
- 'address_id': address_id or addr['delivery'],
+ 'address_id': addr['delivery'] or addr['default'],
'partner_invoice_id': addr['invoice'],
'pricelist_id': pricelist
}
@@ -389,7 +389,6 @@ class mrp_repair(osv.osv):
'type': 'out_invoice',
'account_id': account_id,
'partner_id': repair.partner_id.id,
- 'address_invoice_id': repair.address_id.id,
'currency_id': repair.pricelist_id.currency_id.id,
'comment': repair.quotation_notes,
'fiscal_position': repair.partner_id.property_account_position.id
@@ -516,7 +515,7 @@ class mrp_repair(osv.osv):
'product_id': move.product_id.id,
'product_qty': move.product_uom_qty,
'product_uom': move.product_uom.id,
- 'address_id': repair.address_id and repair.address_id.id or False,
+ 'partner_id': repair.address_id and repair.address_id.id or False,
'location_id': move.location_id.id,
'location_dest_id': move.location_dest_id.id,
'tracking_id': False,
@@ -531,7 +530,7 @@ class mrp_repair(osv.osv):
'origin': repair.name,
'state': 'draft',
'move_type': 'one',
- 'address_id': repair.address_id and repair.address_id.id or False,
+ 'partner_id': repair.address_id and repair.address_id.id or False,
'note': repair.internal_notes,
'invoice_state': 'none',
'type': 'out',
@@ -543,7 +542,7 @@ class mrp_repair(osv.osv):
'product_qty': move.product_uom_qty or 1.0,
'product_uom': repair.product_id.uom_id.id,
'prodlot_id': repair.prodlot_id and repair.prodlot_id.id or False,
- 'address_id': repair.address_id and repair.address_id.id or False,
+ 'partner_id': repair.address_id and repair.address_id.id or False,
'location_id': repair.location_id.id,
'location_dest_id': repair.location_dest_id.id,
'tracking_id': False,
@@ -684,7 +683,7 @@ class mrp_repair_line(osv.osv, ProductChangeMixin):
location_id = location_id and location_id[0] or False
if type == 'add':
- # TOCHECK: Find stock location for user's company warehouse or
+ # TOCHECK: Find stock location for user's company warehouse or
# repair order's company's warehouse (company_id field is added in fix of lp:831583)
args = company_id and [('company_id', '=', company_id)] or []
warehouse_ids = warehouse_obj.search(cr, uid, args, context=context)
diff --git a/addons/pad_project/i18n/fi.po b/addons/pad_project/i18n/fi.po
new file mode 100644
index 00000000000..941bb5239e4
--- /dev/null
+++ b/addons/pad_project/i18n/fi.po
@@ -0,0 +1,39 @@
+# Finnish translation for openobject-addons
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 00:36+0000\n"
+"PO-Revision-Date: 2012-03-30 10:23+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Finnish \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-03-31 05:08+0000\n"
+"X-Generator: Launchpad (build 15032)\n"
+
+#. module: pad_project
+#: constraint:project.task:0
+msgid "Error ! Task end-date must be greater then task start-date"
+msgstr ""
+"Virhe! Tehtävän lopetuspäivän tulee olla myöhäisempi kuin aloituspäivä"
+
+#. module: pad_project
+#: model:ir.model,name:pad_project.model_project_task
+msgid "Task"
+msgstr "Tehtävä"
+
+#. module: pad_project
+#: view:project.task:0
+msgid "Pad"
+msgstr ""
+
+#. module: pad_project
+#: constraint:project.task:0
+msgid "Error ! You cannot create recursive tasks."
+msgstr "Virhe ! Et voi luoda rekursiivisiä tehtäviä."
diff --git a/addons/plugin_outlook/plugin_outlook.xml b/addons/plugin_outlook/plugin_outlook.xml
index 37b924f319f..a267dc24e8f 100644
--- a/addons/plugin_outlook/plugin_outlook.xml
+++ b/addons/plugin_outlook/plugin_outlook.xml
@@ -66,8 +66,8 @@
{'menu':True}
-
-
+
+
diff --git a/addons/plugin_thunderbird/plugin_thunderbird.xml b/addons/plugin_thunderbird/plugin_thunderbird.xml
index 3b4107c8358..f7971f1f981 100644
--- a/addons/plugin_thunderbird/plugin_thunderbird.xml
+++ b/addons/plugin_thunderbird/plugin_thunderbird.xml
@@ -61,8 +61,8 @@
automatic
-
-
+
+
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index 4a88ce3cc16..5af78b131b2 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -50,7 +50,7 @@ class pos_order(osv.osv):
_name = "pos.order"
_description = "Point of Sale"
_order = "id desc"
-
+
def create_from_ui(self, cr, uid, orders, context=None):
#_logger.info("orders: %r", orders)
list = []
@@ -205,7 +205,7 @@ class pos_order(osv.osv):
addr = order.partner_id and partner_obj.address_get(cr, uid, [order.partner_id.id], ['delivery']) or {}
picking_id = picking_obj.create(cr, uid, {
'origin': order.name,
- 'address_id': addr.get('delivery',False),
+ 'partner_id': addr.get('delivery',False),
'type': 'out',
'company_id': order.company_id.id,
'move_type': 'direct',
@@ -414,7 +414,7 @@ class pos_order(osv.osv):
wf_service.trg_validate(uid, 'pos.order', order.id, 'invoice', cr)
if not inv_ids: return {}
-
+
mod_obj = self.pool.get('ir.model.data')
res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_form')
res_id = res and res[1] or False
diff --git a/addons/point_of_sale/point_of_sale_demo.xml b/addons/point_of_sale/point_of_sale_demo.xml
index 1e4b2ec7c35..8d5fdc67d63 100644
--- a/addons/point_of_sale/point_of_sale_demo.xml
+++ b/addons/point_of_sale/point_of_sale_demo.xml
@@ -31,9 +31,7 @@
SAJ/2010/010
-
- noneopen
diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml
index 5461bf690bd..adb05fec578 100644
--- a/addons/point_of_sale/point_of_sale_view.xml
+++ b/addons/point_of_sale/point_of_sale_view.xml
@@ -748,7 +748,7 @@
-
+
@@ -770,8 +770,10 @@
[('origin','like','POS')]
+
+
+ id="menu_pos_details" parent="menu_point_of_sale_reporting" sequence="6" />
Start Point of Sale
diff --git a/addons/point_of_sale/report/pos_receipt.py b/addons/point_of_sale/report/pos_receipt.py
index 721f4bc86e2..93604e755e0 100644
--- a/addons/point_of_sale/report/pos_receipt.py
+++ b/addons/point_of_sale/report/pos_receipt.py
@@ -42,7 +42,7 @@ class order(report_sxw.rml_parse):
'disc': self.discount,
'net': self.netamount,
'get_journal_amt': self._get_journal_amt,
- 'address': partner.address and partner.address[0] or False,
+ 'address': partner or False,
'titlize': titlize
})
diff --git a/addons/point_of_sale/wizard/pos_open_statement.py b/addons/point_of_sale/wizard/pos_open_statement.py
index 11bc8b33558..31e35d3fa10 100644
--- a/addons/point_of_sale/wizard/pos_open_statement.py
+++ b/addons/point_of_sale/wizard/pos_open_statement.py
@@ -52,9 +52,9 @@ class pos_open_statement(osv.osv_memory):
ids = statement_obj.search(cr, uid, [('state', '!=', 'confirm'), ('user_id', '=', uid), ('journal_id', '=', journal.id)], context=context)
if journal.sequence_id:
- number = sequence_obj.next_by_id(cr, uid, journal.sequence_id.id)
+ number = sequence_obj.next_by_id(cr, uid, journal.sequence_id.id, context=context)
else:
- number = sequence_obj.next_by_code(cr, uid, 'account.cash.statement')
+ number = sequence_obj.next_by_code(cr, uid, 'account.cash.statement', context=context)
data.update({
'journal_id': journal.id,
diff --git a/addons/point_of_sale/wizard/pos_return.py b/addons/point_of_sale/wizard/pos_return.py
index 30b16a717d4..0e5d4e1fbb5 100644
--- a/addons/point_of_sale/wizard/pos_return.py
+++ b/addons/point_of_sale/wizard/pos_return.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -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 .
+# along with this program. If not, see .
#
##############################################################################
@@ -53,8 +53,8 @@ class pos_return(osv.osv_memory):
for order in order_obj.browse(cr, uid, active_ids, context=context):
for line in order.lines:
result.append({
- 'product_id' : line.product_id.id,
- 'quantity' : line.qty,
+ 'product_id' : line.product_id.id,
+ 'quantity' : line.qty,
'line_id':line.id
})
res.update({'pos_moves_ids': result})
@@ -93,7 +93,7 @@ class pos_return(osv.osv_memory):
'type': 'ir.actions.act_window',
}
def create_returns2(self, cr, uid, ids, context=None):
-
+
if context is None:
context = {}
active_id = context.get('active_id', False)
@@ -113,7 +113,7 @@ class pos_return(osv.osv_memory):
for order_id in order_obj.browse(cr, uid, [active_id], context=context):
source_stock_id = property_obj.get(cr, uid, 'property_stock_customer', 'res.partner', context=context).id
cr.execute("SELECT s.id FROM stock_location s, stock_warehouse w "
- "WHERE w.lot_stock_id=s.id AND w.id=%s ",
+ "WHERE w.lot_stock_id=s.id AND w.id=%s ",
(order_id.shop_id.warehouse_id.id,))
res = cr.fetchone()
location_id = res and res[0] or None
@@ -121,7 +121,7 @@ class pos_return(osv.osv_memory):
'move_lines': [],
'state':'draft',
'type': 'in',
- 'address_id': order_id.partner_id.id,
+ 'partner_id': order_id.partner_id.id,
'date': date_cur })
new_order = order_obj.copy(cr, uid, order_id.id, {'name': 'Refund %s'%order_id.name,
'lines':[],
@@ -268,7 +268,7 @@ class add_product(osv.osv_memory):
wf_service = netsvc.LocalService("workflow")
self_data = self.browse(cr, uid, ids, context=context)[0]
order_obj.add_product(cr, uid, active_ids[0], self_data.product_id.id, self_data.quantity, context=context)
-
+
for order_id in order_obj.browse(cr, uid, active_ids, context=context):
stock_dest_id = property_obj.get(cr, uid, 'property_stock_customer', 'res.partner', context=context).id
cr.execute("SELECT s.id FROM stock_location s, stock_warehouse w "
@@ -287,7 +287,7 @@ class add_product(osv.osv_memory):
})
for line in order_id.lines:
key= 'return%s' % line.id
- if line.id:
+ if line.id:
if data.has_key(key):
qty = data[key]
lines_obj.write(cr,uid,[line.id], {
diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py
index e35e8225469..0eceec3f46b 100644
--- a/addons/portal/wizard/portal_wizard.py
+++ b/addons/portal/wizard/portal_wizard.py
@@ -94,27 +94,21 @@ class wizard(osv.osv_memory):
return { # a user config based on a contact (address)
'name': address.name,
'user_email': extract_email(address.email),
- 'lang': address.partner_id and address.partner_id.lang or 'en_US',
- 'partner_id': address.partner_id and address.partner_id.id,
+ 'lang': address.parent_id and address.parent_id.lang or 'en_US',
+ 'partner_id': address.parent_id and address.parent_id.id,
}
user_ids = []
- if context.get('active_model') == 'res.partner.address':
- address_obj = self.pool.get('res.partner.address')
- address_ids = context.get('active_ids', [])
- addresses = address_obj.browse(cr, uid, address_ids, context)
- user_ids = map(create_user_from_address, addresses)
-
- elif context.get('active_model') == 'res.partner':
+ if context.get('active_model') == 'res.partner':
partner_obj = self.pool.get('res.partner')
partner_ids = context.get('active_ids', [])
partners = partner_obj.browse(cr, uid, partner_ids, context)
for p in partners:
# add one user per contact, or one user if no contact
- if p.address:
- user_ids.extend(map(create_user_from_address, p.address))
+ if p.child_ids:
+ user_ids.extend(map(create_user_from_address, p.child_ids))
else:
- user_ids.append({'lang': p.lang or 'en_US', 'partner_id': p.id})
+ user_ids.append({'lang': p.lang or 'en_US', 'parent_id': p.id})
return user_ids
diff --git a/addons/portal/wizard/portal_wizard_view.xml b/addons/portal/wizard/portal_wizard_view.xml
index 537055e5fb2..7f36272720c 100644
--- a/addons/portal/wizard/portal_wizard_view.xml
+++ b/addons/portal/wizard/portal_wizard_view.xml
@@ -10,15 +10,6 @@
key2="client_action_multi" target="new"
groups="group_portal_officer"/>
-
-
-
Add Portal Access
diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml
index 518a8900072..6ce26ecb98c 100644
--- a/addons/procurement/procurement_view.xml
+++ b/addons/procurement/procurement_view.xml
@@ -273,7 +273,7 @@
-
+
diff --git a/addons/product/pricelist_view.xml b/addons/product/pricelist_view.xml
index 3ddfe1e6900..3b8eeb750cf 100644
--- a/addons/product/pricelist_view.xml
+++ b/addons/product/pricelist_view.xml
@@ -4,7 +4,7 @@
-
+ product.pricelist.version.form
@@ -180,7 +180,7 @@
+ parent="base.menu_base_config" sequence="20"/>
product.price.type.form
@@ -195,7 +195,7 @@
-
+
Price Typesir.actions.act_window
@@ -206,7 +206,7 @@
+ parent="product.menu_product_pricelist_main" sequence="4" groups="base.group_no_one"/>
diff --git a/addons/project_planning/project_planning_view.xml b/addons/project_planning/project_planning_view.xml
index 83da24292ae..d12b62dbf18 100644
--- a/addons/project_planning/project_planning_view.xml
+++ b/addons/project_planning/project_planning_view.xml
@@ -214,8 +214,8 @@
With its global system to schedule all resources of a company (people and material), OpenERP allows you to encode and then automatically compute tasks and phases scheduling, track resource allocation and availability.
-
+
@@ -292,14 +292,11 @@
-
-
+
+ parent="project.menu_project_dashboard"/>
diff --git a/addons/project_scrum/board_project_scrum_view.xml b/addons/project_scrum/board_project_scrum_view.xml
index dd01832b575..924a1cbf5cc 100644
--- a/addons/project_scrum/board_project_scrum_view.xml
+++ b/addons/project_scrum/board_project_scrum_view.xml
@@ -98,7 +98,7 @@
diff --git a/addons/project_scrum/project_scrum_view.xml b/addons/project_scrum/project_scrum_view.xml
index 7dc2cc1d4f0..7fb84f12213 100644
--- a/addons/project_scrum/project_scrum_view.xml
+++ b/addons/project_scrum/project_scrum_view.xml
@@ -4,7 +4,7 @@
+ parent="base.menu_main_pm" sequence="7"/>
@@ -178,7 +178,7 @@
Product Backlogsproject.scrum.product.backlogform
- {'search_default_current':1, 'search_default_user_id':uid,'search_default_project_id':project_id}
+ {'search_default_user_id':uid,'search_default_project_id':project_id}The scrum agile methodology is used in software development projects. The Product Backlog is the list of features to be implemented. A product backlog can be planified in a development sprint and may be split into several tasks. The product backlog is managed by the product owner of the project.
@@ -349,7 +349,7 @@
formtree,form,calendar
- {"search_default_current": 1}
+ {}The scrum agile methodology is used in software development projects. In this methodology, a sprint is a short period of time (e.g. one month) during which the team implements a list of product backlogs. The sprint review is organized when the team presents its work to the customer and product owner.
@@ -450,7 +450,7 @@
project.scrum.meetingformtree,form,calendar
- {'search_default_scrum_daily':1,'search_default_project_id':project_id}
+ {'search_default_project_id':project_id}The scrum agile methodology is used in software development projects. In this methodology, a daily meeting is organized by the scrum master with his team in order to detect the difficulties the team faced/will face.
diff --git a/addons/project_timesheet/project_timesheet_data.xml b/addons/project_timesheet/project_timesheet_data.xml
index 59a25c142b5..ed87cb8c65f 100644
--- a/addons/project_timesheet/project_timesheet_data.xml
+++ b/addons/project_timesheet/project_timesheet_data.xml
@@ -1,8 +1,8 @@
-
-
+
+
+
diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml
index 07873c00592..0412bdabb38 100644
--- a/addons/project_timesheet/project_timesheet_view.xml
+++ b/addons/project_timesheet/project_timesheet_view.xml
@@ -84,7 +84,7 @@
formtree,form[]
- {'search_default_to_invoice': 1}
+ {}You will find here all works made on tasks that you can invoice.
In order to invoice the time spent on a project, you must define the
@@ -101,18 +101,18 @@ the project form.
parent="base.menu_main_pm" sequence="5"/>
-
+
-
+
Customer Projectsaccount.analytic.accountformtree,form,graph
- {'search_default_has_partner':1, 'search_default_my_accounts':1, 'search_default_draft':1, 'search_default_pending':1, 'search_default_open':1}
+ {}[('type','=','normal')]You will find here the contracts related to your customer projects in order to track the invoicing progress.
diff --git a/addons/project_timesheet/report/task_report_view.xml b/addons/project_timesheet/report/task_report_view.xml
index e24f604fbe6..b1ba9b8672e 100644
--- a/addons/project_timesheet/report/task_report_view.xml
+++ b/addons/project_timesheet/report/task_report_view.xml
@@ -3,8 +3,8 @@
@@ -43,7 +43,7 @@
+ help="Task hours of last month"/>
@@ -58,7 +58,7 @@
-
+
report.timesheet.task.user.graphreport.timesheet.task.user
@@ -71,7 +71,7 @@
-
+
Task Hours Per Monthreport.timesheet.task.user
diff --git a/addons/purchase/board_purchase_view.xml b/addons/purchase/board_purchase_view.xml
index 0bf011e5cc5..4c9e776b96b 100644
--- a/addons/purchase/board_purchase_view.xml
+++ b/addons/purchase/board_purchase_view.xml
@@ -4,8 +4,8 @@
+ name="Purchase"
+ parent="base.menu_reporting_dashboard" sequence="5"/>
Request for Quotations
diff --git a/addons/purchase/edi/purchase_order.py b/addons/purchase/edi/purchase_order.py
index b8359f3bf7f..787974646ff 100644
--- a/addons/purchase/edi/purchase_order.py
+++ b/addons/purchase/edi/purchase_order.py
@@ -65,7 +65,7 @@ class purchase_order(osv.osv, EDIMixin):
"""Exports a purchase order"""
edi_struct = dict(edi_struct or PURCHASE_ORDER_EDI_STRUCT)
res_company = self.pool.get('res.company')
- res_partner_address = self.pool.get('res.partner.address')
+ res_partner_obj = self.pool.get('res.partner')
edi_doc_list = []
for order in records:
# generate the main report
@@ -79,7 +79,7 @@ class purchase_order(osv.osv, EDIMixin):
'__import_module': 'sale',
'company_address': res_company.edi_export_address(cr, uid, order.company_id, context=context),
- 'partner_address': res_partner_address.edi_export(cr, uid, [order.partner_address_id], context=context)[0],
+ 'partner_address': res_partner_obj.edi_export(cr, uid, [order.partner_id], context=context)[0],
'currency': self.pool.get('res.currency').edi_export(cr, uid, [order.pricelist_id.currency_id],
context=context)[0],
})
@@ -95,29 +95,22 @@ class purchase_order(osv.osv, EDIMixin):
# the desired company among the user's allowed companies
self._edi_requires_attributes(('company_id','company_address'), edi_document)
- res_partner_address = self.pool.get('res.partner.address')
- res_partner = self.pool.get('res.partner')
-
- # imported company = as a new partner
- src_company_id, src_company_name = edi_document.pop('company_id')
- partner_id = self.edi_import_relation(cr, uid, 'res.partner', src_company_name,
- src_company_id, context=context)
- partner_value = {'customer': True}
- res_partner.write(cr, uid, [partner_id], partner_value, context=context)
+ res_partner_obj = self.pool.get('res.partner')
# imported company_address = new partner address
+ src_company_id, src_company_name = edi_document.pop('company_id')
address_info = edi_document.pop('company_address')
- address_info['partner_id'] = (src_company_id, src_company_name)
- address_info['type'] = 'default'
- address_id = res_partner_address.edi_import(cr, uid, address_info, context=context)
+ address_info['customer'] = True
+ if 'name' not in address_info:
+ address_info['name'] = src_company_name
+ address_id = res_partner_obj.edi_import(cr, uid, address_info, context=context)
# modify edi_document to refer to new partner/address
- partner_address = res_partner_address.browse(cr, uid, address_id, context=context)
- edi_document['partner_id'] = (src_company_id, src_company_name)
+ partner_address = res_partner_obj.browse(cr, uid, address_id, context=context)
edi_document.pop('partner_address', False) # ignored
- edi_document['partner_address_id'] = self.edi_m2o(cr, uid, partner_address, context=context)
+ edi_document['partner_id'] = self.edi_m2o(cr, uid, partner_address, context=context)
- return partner_id
+ return address_id
def _edi_get_pricelist(self, cr, uid, partner_id, currency, context=None):
# TODO: refactor into common place for purchase/sale, e.g. into product module
diff --git a/addons/purchase/edi/purchase_order_action_data.xml b/addons/purchase/edi/purchase_order_action_data.xml
index f3f610b8e75..c4a7f75819a 100644
--- a/addons/purchase/edi/purchase_order_action_data.xml
+++ b/addons/purchase/edi/purchase_order_action_data.xml
@@ -21,8 +21,6 @@
-
-
-
- Addresses
- ir.actions.act_window
- res.partner.address
- form
- {"search_default_supplier":1}
-
- Access your supplier records and maintain a good relationship with your suppliers. You can track all your interactions with them through the History tab: emails, orders, meetings, etc.
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
+ parent="purchase.menu_purchase_partner_cat" groups="base.group_no_one"/>
-
-
+
-
@@ -306,7 +279,7 @@
-
+
purchase.order.treepurchase.order
diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml
index ffea456d77f..6c3250c59c6 100644
--- a/addons/purchase/report/order.rml
+++ b/addons/purchase/report/order.rml
@@ -166,8 +166,8 @@
Shipping address :
- [[ (o.dest_address_id and o.dest_address_id.partner_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 displaye_address(o.warehouse_id.partner_address_id)) or '']]
+ [[ (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_id)) or '']]
@@ -182,13 +182,13 @@
[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]
- [[ o.partner_address_id and display_address(o.partner_address_id) ]]
+ [[ o.partner_id and display_address(o.partner_id) ]]
- Tél. : [[ (o.partner_address_id and o.partner_address_id.phone) or removeParentNode('para') ]]
- Fax : [[ (o.partner_address_id and o.partner_address_id.fax) or removeParentNode('para') ]]
- TVA : [[ (o.partner_id and o.partner_id.vat) or removeParentNode('para') ]]
+ Tél. : [[ (o.partner_id.phone) or removeParentNode('para') ]]
+ Fax : [[ (o.partner_id.fax) or removeParentNode('para') ]]
+ TVA : [[ (o.partner_id.vat) or removeParentNode('para') ]]
diff --git a/addons/purchase/report/purchase_report.py b/addons/purchase/report/purchase_report.py
index e3a4a651b7f..99692907591 100644
--- a/addons/purchase/report/purchase_report.py
+++ b/addons/purchase/report/purchase_report.py
@@ -46,8 +46,6 @@ class purchase_report(osv.osv):
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', readonly=True),
'location_id': fields.many2one('stock.location', 'Destination', readonly=True),
'partner_id':fields.many2one('res.partner', 'Supplier', readonly=True),
- 'partner_address_id':fields.many2one('res.partner.address', 'Address Contact Name', readonly=True),
- 'dest_address_id':fields.many2one('res.partner.address', 'Dest. Address Contact Name',readonly=True),
'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', readonly=True),
'date_approve':fields.date('Date Approved', readonly=True),
'expected_date':fields.date('Expected Date', readonly=True),
@@ -82,7 +80,6 @@ class purchase_report(osv.osv):
s.state,
s.date_approve,
date_trunc('day',s.minimum_planned_date) as expected_date,
- s.partner_address_id,
s.dest_address_id,
s.pricelist_id,
s.validator,
@@ -122,7 +119,6 @@ class purchase_report(osv.osv):
l.date_planned,
l.product_uom,
date_trunc('day',s.minimum_planned_date),
- s.partner_address_id,
s.pricelist_id,
s.validator,
s.dest_address_id,
diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml
index 095f17090da..0ac69172612 100644
--- a/addons/purchase/report/purchase_report_view.xml
+++ b/addons/purchase/report/purchase_report_view.xml
@@ -172,7 +172,7 @@
-
@@ -185,7 +185,7 @@
{'full':'1','contact_display': 'partner','search_default_done':1, 'search_default_month':1, 'search_default_group_type':1, 'group_by': [], 'group_by_no_leaf':1,'search_default_year':1,}Reception Analysis allows you to easily check and analyse your company order receptions and the performance of your supplier's deliveries.
-
+
diff --git a/addons/purchase/report/request_quotation.rml b/addons/purchase/report/request_quotation.rml
index e75d062542c..2372ab4d8e4 100644
--- a/addons/purchase/report/request_quotation.rml
+++ b/addons/purchase/report/request_quotation.rml
@@ -91,7 +91,7 @@
Expected Delivery address:
- [[ (order.dest_address_id and order.dest_address_id.partner_id.name) or (order.warehouse_id and order.warehouse_id.name) or '']]
+ [[ (order.dest_address_id and order.dest_address_id.name) or (order.warehouse_id and order.warehouse_id.name) or '']][[ order.dest_address_id and display_address(order.dest_address_id) ]]
@@ -100,14 +100,14 @@
- [[ (order.partner_id and order.partner_id.title and order.partner_id.title.name) or '' ]] [[ order.partner_id.name ]]
- [[ order.partner_address_id and display_address(order.partner_address_id) ]]
+ [[ (order.partner_id.title and order.partner_id.title.name) or '' ]] [[ order.partner_id.name ]]
+ [[ display_address(order.partner_id) ]]
- Tel.: [[ (order.partner_address_id and order.partner_address_id.phone) or removeParentNode('para') ]]
- Fax: [[ (order.partner_address_id and order.partner_address_id.fax) or removeParentNode('para') ]]
- TVA: [[ (order.partner_id and order.partner_id.vat) or removeParentNode('para') ]]
+ Tel.: [[ (order.partner_id.phone) or removeParentNode('para') ]]
+ Fax: [[ (order.partner_id.fax) or removeParentNode('para') ]]
+ TVA: [[ (order.partner_id.vat) or removeParentNode('para') ]]
diff --git a/addons/purchase/security/ir.model.access.csv b/addons/purchase/security/ir.model.access.csv
index 0ea49a9900b..b19a62bf5d1 100644
--- a/addons/purchase/security/ir.model.access.csv
+++ b/addons/purchase/security/ir.model.access.csv
@@ -30,7 +30,6 @@ access_account_invoice_tax_purchase,account_invoice.tax purchase,account.model_a
access_account_fiscal_position_purchase_user,account.fiscal.position purchase,account.model_account_fiscal_position,group_purchase_user,1,0,0,0
access_account_sequence_fiscalyear_purchase_user,account.sequence.fiscalyear purchase,account.model_account_sequence_fiscalyear,group_purchase_user,1,1,1,1
access_res_partner_purchase_user,res.partner purchase,base.model_res_partner,group_purchase_user,1,0,0,0
-access_res_partner_address_purchase_user,res.partner.address purchase,base.model_res_partner_address,group_purchase_user,1,0,0,0
access_account_journal_period,account.journal.period,account.model_account_journal_period,group_purchase_user,1,1,1,0
access_account_journal,account.journal,account.model_account_journal,group_purchase_user,1,0,0,0
access_account_journal_manager,account.journal,account.model_account_journal,group_purchase_manager,1,0,0,0
diff --git a/addons/purchase/stock.py b/addons/purchase/stock.py
index 34579d2a7d9..35193dfa07b 100644
--- a/addons/purchase/stock.py
+++ b/addons/purchase/stock.py
@@ -58,8 +58,6 @@ class stock_picking(osv.osv):
"""
invoice_vals = super(stock_picking, self)._prepare_invoice(cr, uid, picking, partner, inv_type, journal_id, context=context)
if picking.purchase_id:
- invoice_vals['address_contact_id'], invoice_vals['address_invoice_id'] = \
- self.pool.get('res.partner').address_get(cr, uid, [partner.id], ['contact', 'invoice']).values()
invoice_vals['fiscal_position'] = picking.purchase_id.fiscal_position.id
return invoice_vals
diff --git a/addons/purchase/stock_view.xml b/addons/purchase/stock_view.xml
index 7afcc96767f..06d67eed281 100644
--- a/addons/purchase/stock_view.xml
+++ b/addons/purchase/stock_view.xml
@@ -78,15 +78,12 @@
domain="[('invoice_state', '=', '2binvoiced')]"/>
-
-
diff --git a/addons/purchase/test/process/edi_purchase_order.yml b/addons/purchase/test/process/edi_purchase_order.yml
index abbc3047d9a..661536dd5ce 100644
--- a/addons/purchase/test/process/edi_purchase_order.yml
+++ b/addons/purchase/test/process/edi_purchase_order.yml
@@ -3,7 +3,6 @@
-
!record {model: purchase.order, id: purchase_order_edi_1}:
partner_id: base.res_partner_agrolait
- partner_address_id: base.res_partner_address_8invoice
location_id: stock.stock_location_3
pricelist_id: 1
order_line:
@@ -59,7 +58,7 @@
"partner_address": {
"__id": "base:724f93ec-ddd0-11e0-88ec-701a04e25543.res_partner_address_7wdsjasdjh",
"__module": "base",
- "__model": "res.partner.address",
+ "__model": "res.partner",
"phone": "(+32).81.81.37.00",
"street": "Chaussee de Namur 40",
"city": "Gerompont",
@@ -70,7 +69,7 @@
"company_address": {
"__id": "base:724f93ec-ddd0-11e0-88ec-701a04e25543.main_address",
"__module": "base",
- "__model": "res.partner.address",
+ "__model": "res.partner",
"city": "Gerompont",
"zip": "1367",
"country_id": ["base:724f93ec-ddd0-11e0-88ec-701a04e25543.be", "Belgium"],
diff --git a/addons/purchase/test/process/merge_order.yml b/addons/purchase/test/process/merge_order.yml
index 2ea8b7e2a31..5ba4a1a21f2 100644
--- a/addons/purchase/test/process/merge_order.yml
+++ b/addons/purchase/test/process/merge_order.yml
@@ -26,7 +26,6 @@
assert total_new_qty == total_qty,"product quantities are not correspond"
assert order.partner_id == order3.partner_id ,"partner is not correspond"
- assert order.partner_address_id == order3.partner_address_id ,"Partner address is not correspond"
assert order.warehouse_id == order3.warehouse_id or order7.warehouse_id,"Warehouse is not correspond"
assert order.state == 'draft',"New created order state should be in draft"
assert order.pricelist_id == order3.pricelist_id,"Price list is not correspond"
diff --git a/addons/purchase/test/process/rfq2order2done.yml b/addons/purchase/test/process/rfq2order2done.yml
index 80c9e85778f..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_address_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/purchase/wizard/purchase_line_invoice.py b/addons/purchase/wizard/purchase_line_invoice.py
index 236cde7dde5..1c94ba08588 100644
--- a/addons/purchase/wizard/purchase_line_invoice.py
+++ b/addons/purchase/wizard/purchase_line_invoice.py
@@ -86,8 +86,6 @@ class purchase_line_invoice(osv.osv_memory):
'reference' : partner.ref,
'account_id': a,
'partner_id': partner.id,
- 'address_invoice_id': orders[0].partner_address_id.id,
- 'address_contact_id': orders[0].partner_address_id.id,
'invoice_line': [(6,0,lines_ids)],
'currency_id' : orders[0].pricelist_id.currency_id.id,
'comment': multiple_order_invoice_notes(orders),
diff --git a/addons/purchase_double_validation/i18n/pt.po b/addons/purchase_double_validation/i18n/pt.po
new file mode 100644
index 00000000000..4dd263e1652
--- /dev/null
+++ b/addons/purchase_double_validation/i18n/pt.po
@@ -0,0 +1,70 @@
+# Portuguese translation for openobject-addons
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 00:37+0000\n"
+"PO-Revision-Date: 2012-03-29 11:26+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Portuguese \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-03-30 04:34+0000\n"
+"X-Generator: Launchpad (build 15032)\n"
+
+#. module: purchase_double_validation
+#: view:purchase.double.validation.installer:0
+msgid "Purchase Application Configuration"
+msgstr ""
+
+#. module: purchase_double_validation
+#: view:purchase.double.validation.installer:0
+msgid "Define minimum amount after which puchase is needed to be validated."
+msgstr ""
+
+#. module: purchase_double_validation
+#: view:purchase.double.validation.installer:0
+msgid "title"
+msgstr ""
+
+#. module: purchase_double_validation
+#: field:purchase.double.validation.installer,config_logo:0
+msgid "Image"
+msgstr ""
+
+#. module: purchase_double_validation
+#: model:ir.actions.act_window,name:purchase_double_validation.action_config_purchase_limit_amount
+#: view:purchase.double.validation.installer:0
+msgid "Configure Limit Amount for Purchase"
+msgstr ""
+
+#. module: purchase_double_validation
+#: view:board.board:0
+#: model:ir.actions.act_window,name:purchase_double_validation.purchase_waiting
+msgid "Purchase Order Waiting Approval"
+msgstr ""
+
+#. module: purchase_double_validation
+#: view:purchase.double.validation.installer:0
+msgid "res_config_contents"
+msgstr ""
+
+#. module: purchase_double_validation
+#: help:purchase.double.validation.installer,limit_amount:0
+msgid "Maximum amount after which validation of purchase is required."
+msgstr ""
+
+#. module: purchase_double_validation
+#: model:ir.model,name:purchase_double_validation.model_purchase_double_validation_installer
+msgid "purchase.double.validation.installer"
+msgstr ""
+
+#. module: purchase_double_validation
+#: field:purchase.double.validation.installer,limit_amount:0
+msgid "Maximum Purchase Amount"
+msgstr ""
diff --git a/addons/purchase_requisition/purchase_requisition.py b/addons/purchase_requisition/purchase_requisition.py
index c43bd524090..43cfe2de069 100644
--- a/addons/purchase_requisition/purchase_requisition.py
+++ b/addons/purchase_requisition/purchase_requisition.py
@@ -128,7 +128,6 @@ class purchase_requisition(osv.osv):
res_partner = self.pool.get('res.partner')
fiscal_position = self.pool.get('account.fiscal.position')
supplier = res_partner.browse(cr, uid, partner_id, context=context)
- delivery_address_id = res_partner.address_get(cr, uid, [supplier.id], ['delivery'])['delivery']
supplier_pricelist = supplier.property_product_pricelist_purchase or False
res = {}
for requisition in self.browse(cr, uid, ids, context=context):
@@ -138,7 +137,6 @@ class purchase_requisition(osv.osv):
purchase_id = purchase_order.create(cr, uid, {
'origin': requisition.name,
'partner_id': supplier.id,
- 'partner_address_id': delivery_address_id,
'pricelist_id': supplier_pricelist.id,
'location_id': location_id,
'company_id': requisition.company_id.id,
diff --git a/addons/purchase_requisition/purchase_requisition_demo.xml b/addons/purchase_requisition/purchase_requisition_demo.xml
index 9ef7bc40d97..41491cc64ca 100644
--- a/addons/purchase_requisition/purchase_requisition_demo.xml
+++ b/addons/purchase_requisition/purchase_requisition_demo.xml
@@ -32,7 +32,6 @@
-
@@ -50,7 +49,6 @@
-
diff --git a/addons/purchase_requisition/purchase_requisition_view.xml b/addons/purchase_requisition/purchase_requisition_view.xml
index bd47d093df0..d6a736eea9c 100644
--- a/addons/purchase_requisition/purchase_requisition_view.xml
+++ b/addons/purchase_requisition/purchase_requisition_view.xml
@@ -166,7 +166,7 @@
purchase.requisitionformtree,form
- {"search_default_create_uid":uid,'search_default_draft': 1}
+ {"search_default_create_uid":uid}A purchase requisition is the step before a request for quotation. In a purchase requisition (or purchase tender), you can record the products you need to buy and trigger the creation of RfQs to suppliers. After the negotiation, once you have reviewed all the supplier's offers, you can validate some and cancel others.
diff --git a/addons/purchase_requisition/report/purchase_requisition.rml b/addons/purchase_requisition/report/purchase_requisition.rml
index 56e4c1ae0af..f33f25536af 100644
--- a/addons/purchase_requisition/report/purchase_requisition.rml
+++ b/addons/purchase_requisition/report/purchase_requisition.rml
@@ -223,7 +223,7 @@
- [[ (purchase_ids.partner_address_id and purchase_ids.partner_address_id.partner_id and purchase_ids.partner_address_id.partner_id.name) or '' ]]
+ [[ (purchase_ids.partner_id and purchase_ids.partner_id.name) or '' ]]
- [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]
- [[ o.address_invoice_id and display_address(o.address_invoice_id) ]]
+ [[ (o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]
+ [[ o.partner_id and display_address(o.partner_id) ]]
- Tel. : [[ (o.address_invoice_id and o.address_invoice_id.phone) or removeParentNode('para') ]]
- Fax : [[ (o.address_invoice_id and o.address_invoice_id.fax) or removeParentNode('para') ]]
- VAT : [[ (o.partner_id and o.partner_id.vat) or removeParentNode('para') ]]
+ Tel. : [[ (o.partner_id.phone) or removeParentNode('para') ]]
+ Fax : [[ (o.partner_id.fax) or removeParentNode('para') ]]
+ VAT : [[ (o.partner_id.vat) or removeParentNode('para') ]]
- [[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]
+ [[ (o.partner_id.ref) or ' ' ]]
@@ -398,4 +398,4 @@
-
\ No newline at end of file
+
diff --git a/addons/report_intrastat/report_intrastat.py b/addons/report_intrastat/report_intrastat.py
index ffe90b54d4f..5a0c31bbdcc 100644
--- a/addons/report_intrastat/report_intrastat.py
+++ b/addons/report_intrastat/report_intrastat.py
@@ -112,10 +112,9 @@ class report_intrastat(osv.osv):
left join product_uom uom on uom.id=inv_line.uos_id
left join product_uom puom on puom.id = pt.uom_id
left join report_intrastat_code intrastat on pt.intrastat_id = intrastat.id
- left join (res_partner_address inv_address
+ left join (res_partner inv_address
left join res_country inv_country on (inv_country.id = inv_address.country_id))
- on (inv_address.id = inv.address_invoice_id)
-
+ on (inv_address.id = inv.partner_id)
where
inv.state in ('open','paid')
and inv_line.product_id is not null
diff --git a/addons/report_intrastat/report_intrastat_view.xml b/addons/report_intrastat/report_intrastat_view.xml
index b14b94ef315..2527f2e4f97 100644
--- a/addons/report_intrastat/report_intrastat_view.xml
+++ b/addons/report_intrastat/report_intrastat_view.xml
@@ -68,7 +68,7 @@
+ parent="base.menu_config_address_book" sequence="2" groups="base.group_no_one"/>
diff --git a/addons/report_intrastat/test/report_intrastat_report.yml b/addons/report_intrastat/test/report_intrastat_report.yml
index 2c85007e70c..e049c0ffcb8 100644
--- a/addons/report_intrastat/test/report_intrastat_report.yml
+++ b/addons/report_intrastat/test/report_intrastat_report.yml
@@ -4,13 +4,11 @@
!record {model: account.invoice, id: test_invoice_1}:
currency_id: base.EUR
company_id: base.main_company
- address_invoice_id: base.res_partner_address_tang
partner_id: base.res_partner_asus
state: draft
type: out_invoice
account_id: account.a_recv
name: Test invoice 1
- address_contact_id: base.res_partner_address_tang
-
In order to test the PDF reports defined using report_intrastat module, we print a Intrastat Report
-
diff --git a/addons/report_webkit/data.xml b/addons/report_webkit/data.xml
index 6cc254b1451..fb58c9fb1ac 100644
--- a/addons/report_webkit/data.xml
+++ b/addons/report_webkit/data.xml
@@ -67,15 +67,15 @@
-
${company.partner_id.address and company.partner_id.address[0].street or ''|entity}
+
${company.partner_id.street or ''|entity}
-
Phone: ${company.partner_id.address and company.partner_id.address[0].phone or ''|entity}
+
Phone: ${company.partner_id.phone or ''|entity}
-
Mail: ${company.partner_id.address and company.partner_id.address[0].email or ''|entity}