[MERGE] account: remove res.partner.address
bzr revid: sbh@tinyerp.com-20120306120530-ruzk6xx0ju5b6vbo
This commit is contained in:
commit
6cb6a9e649
|
@ -162,7 +162,7 @@
|
|||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]</para>
|
||||
<para style="terp_default_8">[[ display_address(o.partner_id) ]]</para>
|
||||
<para style="terp_default_8">[[ display_address(o.partner_id,'invoice') ]]</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
|
|
@ -73,8 +73,8 @@ class account_invoice_line(osv.osv):
|
|||
_inherit = "account.invoice.line"
|
||||
_description = "Invoice Line"
|
||||
|
||||
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):
|
||||
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id=currency_id, context=context, company_id=company_id)
|
||||
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):
|
||||
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id=currency_id, context=context, company_id=company_id)
|
||||
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context)
|
||||
if rec:
|
||||
res_prod['value'].update({'account_analytic_id': rec.analytic_id.id})
|
||||
|
|
|
@ -307,8 +307,8 @@ class account_invoice_line(osv.osv):
|
|||
res ['analytics_id'] = line.analytics_id and line.analytics_id.id or False
|
||||
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):
|
||||
res_prod = super(account_invoice_line, 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, company_id=company_id)
|
||||
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):
|
||||
res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context=context, company_id=company_id)
|
||||
rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context)
|
||||
if rec and rec.analytics_id:
|
||||
res_prod['value'].update({'analytics_id': rec.analytics_id.id})
|
||||
|
|
|
@ -136,9 +136,9 @@ class account_invoice_line(osv.osv):
|
|||
res += diff_res
|
||||
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):
|
||||
fiscal_pool = self.pool.get('account.fiscal.position')
|
||||
res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context, company_id)
|
||||
res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, currency_id, context, company_id)
|
||||
if not product:
|
||||
return res
|
||||
if type in ('in_invoice','in_refund'):
|
||||
|
|
|
@ -45,9 +45,8 @@ class report_rappel(report_sxw.rml_parse):
|
|||
|
||||
def _adr_get(self, stat_line, type):
|
||||
res_partner = pooler.get_pool(self.cr.dbname).get('res.partner')
|
||||
res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address')
|
||||
adr = res_partner.address_get(self.cr, self.uid, [stat_line.partner_id.id], [type])[type]
|
||||
return adr and res_partner_address.read(self.cr, self.uid, [adr]) or [{}]
|
||||
return adr and res_partner.read(self.cr, self.uid, [adr]) or [{}]
|
||||
|
||||
def _lines_get(self, stat_by_partner_line):
|
||||
pool = pooler.get_pool(self.cr.dbname)
|
||||
|
|
|
@ -193,12 +193,12 @@
|
|||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]</para>
|
||||
<para style="terp_default_8">[[ display_address(o.address_invoice_id) ]]</para>
|
||||
<para style="terp_default_8">[[ display_address(o.partner_id, 'invoice') ]]</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">Tel. : [[ (o.address_invoice_id and o.address_invoice_id.phone) or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_8">Fax : [[ (o.address_invoice_id and o.address_invoice_id.fax) or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_8">Tel. : [[ (o.partner_id and o.partner_id.phone) or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_8">Fax : [[ (o.partner_id and o.partner_id.fax) or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_8">VAT : [[ (o.partner_id and o.partner_id.vat) or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -247,7 +247,7 @@
|
|||
<para style="terp_default_Centre_9">[[ o.name or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]</para>
|
||||
<para style="terp_default_Centre_9">[[ (o.partner_id and o.partner_id.ref) or ' ' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
|
@ -197,12 +197,12 @@
|
|||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]</para>
|
||||
<para style="terp_default_8">[[ display_address(o.address_invoice_id) ]]</para>
|
||||
<para style="terp_default_8">[[ display_address(o.partner_id, 'invoice') ]]</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">Tel. : [[ (o.address_invoice_id and o.address_invoice_id.phone) or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_8">Fax : [[ (o.address_invoice_id and o.address_invoice_id.fax) or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_8">Tel. : [[ (o.partner_id and o.partner_id.phone) or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_8">Fax : [[ (o.partner_id and o.partner_id.fax) or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_8">VAT : [[ (o.partner_id and o.partner_id.vat) or removeParentNode('para') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -251,7 +251,7 @@
|
|||
<para style="terp_default_Centre_9">[[ o.name or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ (o.address_invoice_id and o.address_invoice_id.partner_id and o.address_invoice_id.partner_id.ref) or ' ' ]]</para>
|
||||
<para style="terp_default_Centre_9">[[ ( o.partner_id and o.partner_id.ref) or ' ' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
|
@ -73,8 +73,6 @@
|
|||
-
|
||||
!record {model: account.invoice, id: account_invoice_jan}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.USD
|
||||
date_invoice: !eval "'%s-01-01' %(datetime.now().year)"
|
||||
|
@ -108,8 +106,6 @@
|
|||
-
|
||||
!record {model: account.invoice, id: account_invoice_feb}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.USD
|
||||
date_invoice: !eval "'%s-02-01' %(datetime.now().year)"
|
||||
|
|
|
@ -44,8 +44,6 @@
|
|||
!record {model: account.invoice, id: account_first_invoice_jan_suppl}:
|
||||
account_id: account.a_pay
|
||||
type : in_invoice
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.USD
|
||||
date_invoice: !eval "'%s-01-01' %(datetime.now().year)"
|
||||
|
@ -80,8 +78,6 @@
|
|||
-
|
||||
!record {model: account.invoice, id: account_second_invoice_feb_suppl}:
|
||||
account_id: account.a_pay
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.USD
|
||||
date_invoice: !eval "'%s-02-01' %(datetime.now().year)"
|
||||
|
|
|
@ -79,8 +79,6 @@
|
|||
-
|
||||
!record {model: account.invoice, id: account_first_invoice_jan}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.USD
|
||||
date_invoice: !eval "'%s-01-01' %(datetime.now().year)"
|
||||
|
@ -114,8 +112,6 @@
|
|||
-
|
||||
!record {model: account.invoice, id: account_second_invoice_feb}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.USD
|
||||
date_invoice: !eval "'%s-02-01' %(datetime.now().year)"
|
||||
|
|
|
@ -79,8 +79,6 @@
|
|||
-
|
||||
!record {model: account.invoice, id: account_first_invoice_jan_michal}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.USD
|
||||
date_invoice: !eval "'%s-01-01' %(datetime.now().year)"
|
||||
|
@ -114,8 +112,6 @@
|
|||
-
|
||||
!record {model: account.invoice, id: account_second_invoice_feb_michal}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.USD
|
||||
date_invoice: !eval "'%s-02-01' %(datetime.now().year)"
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
-
|
||||
!record {model: account.invoice, id: account_first_invoice_jan_eur}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
date_invoice: !eval "'%s-01-01' %(datetime.now().year)"
|
||||
|
@ -68,8 +66,6 @@
|
|||
-
|
||||
!record {model: account.invoice, id: account_second_invoice_feb_eur}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
date_invoice: !eval "'%s-02-01' %(datetime.now().year)"
|
||||
|
|
|
@ -67,8 +67,6 @@
|
|||
-
|
||||
!record {model: account.invoice, id: account_first_invoice_jan_cad}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.CAD
|
||||
date_invoice: !eval "'%s-01-01' %(datetime.now().year)"
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
-
|
||||
!record {model: account.invoice, id: account_invoice_0}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_7
|
||||
address_invoice_id: base.res_partner_address_7
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
invoice_line:
|
||||
|
|
|
@ -103,8 +103,8 @@ sale_order_line()
|
|||
class account_invoice_line(osv.osv):
|
||||
_inherit = "account.invoice.line"
|
||||
|
||||
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):
|
||||
res = super(account_invoice_line, 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, company_id=company_id)
|
||||
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):
|
||||
res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit,currency_id, context=context, company_id=company_id)
|
||||
|
||||
def get_real_price(res_dict, product_id, qty, uom, pricelist):
|
||||
item_obj = self.pool.get('product.pricelist.item')
|
||||
|
|
Loading…
Reference in New Issue