[MERGE] Merged with main branch
bzr revid: pso@tinyerp.com-20120809121923-fyl377g9ggp55hq9
This commit is contained in:
commit
4bf04e1476
|
@ -45,6 +45,9 @@
|
|||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to setup a new bank account.
|
||||
</p><p>
|
||||
Configure your company's bank account and select those that must
|
||||
appear on the report footer.
|
||||
</p><p>
|
||||
If you use the accounting application of OpenERP, journals and
|
||||
accounts will be created automatically based on these data.
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
rml="account/report/account_print_invoice.rml"
|
||||
string="Invoices"
|
||||
attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')"
|
||||
attachment_use="True"
|
||||
usage="default"
|
||||
/>
|
||||
<report id="account_transfers" model="account.transfer" name="account.transfer" string="Transfers" xml="account/report/transfer.xml" xsl="account/report/transfer.xsl"/>
|
||||
|
|
|
@ -43,6 +43,8 @@ class account_config_settings(osv.osv_memory):
|
|||
string='Default company currency', help="Main currency of the company."),
|
||||
'paypal_account': fields.related('company_id', 'paypal_account', type='char', size=128,
|
||||
string='Paypal account', help="Paypal account (email) for receiving online payments (credit card, etc.) If you set a paypal account, the customer will be able to pay your invoices or quotations with a button \"Pay with Paypal\" in automated emails or through the OpenERP portal."),
|
||||
'company_footer': fields.related('company_id', 'rml_footer2', type='char', size=250, readonly=True,
|
||||
string='Bank accounts on reports will display as followed', help="Bank accounts as printed in the footer of each customer document. This is for information purpose only, you should configure these bank accounts through the above button \"Configure Bank Accounts\"."),
|
||||
|
||||
'has_chart_of_accounts': fields.boolean('Company has a chart of accounts'),
|
||||
'chart_template_id': fields.many2one('account.chart.template', 'Template', domain="[('visible','=', True)]"),
|
||||
|
@ -152,6 +154,7 @@ class account_config_settings(osv.osv_memory):
|
|||
'expects_chart_of_accounts': company.expects_chart_of_accounts,
|
||||
'currency_id': company.currency_id.id,
|
||||
'paypal_account': company.paypal_account,
|
||||
'company_footer': company.rml_footer2,
|
||||
'has_chart_of_accounts': has_chart_of_accounts,
|
||||
'has_fiscal_year': bool(fiscalyear_count),
|
||||
'chart_template_id': False,
|
||||
|
|
|
@ -225,6 +225,8 @@
|
|||
icon="gtk-go-forward"
|
||||
type="action"
|
||||
class="oe_inline oe_link"/>
|
||||
<label for="company_footer"/>
|
||||
<field name="company_footer"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="paypal_account"/>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
company_id: base.main_company
|
||||
partner_id: base.main_partner
|
||||
acc_number: 123456789
|
||||
footer: True
|
||||
bank: base.res_bank_1
|
||||
bank_name: Reserve
|
||||
-
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
!context
|
||||
'type': 'receipt'
|
||||
-
|
||||
I create the first voucher of payment with values 240 USD, journal USD,
|
||||
On the first March, I create the first voucher of payment with values 240 USD, journal USD,
|
||||
-
|
||||
!record {model: account.voucher, id: account_voucher_1_case1, view: view_vendor_receipt_form}:
|
||||
account_id: account.cash
|
||||
|
@ -235,7 +235,7 @@
|
|||
move_line = move_line_obj.browse(cr, uid, move_lines[0])
|
||||
assert (move_line.amount_residual_currency == 30.0) , "Residual amount is not correct for first Invoice"
|
||||
-
|
||||
I create the second voucher of payment with values 45 USD, journal USD,
|
||||
On the first April, I create the second voucher of payment with values 45 USD, journal USD,
|
||||
-
|
||||
!record {model: account.voucher, id: account_voucher_2_case1}:
|
||||
account_id: account.cash
|
||||
|
|
|
@ -47,6 +47,13 @@ class res_company(osv.osv):
|
|||
result['logo'] = company.logo # already base64-encoded
|
||||
if company.paypal_account:
|
||||
result['paypal_account'] = company.paypal_account
|
||||
# bank info: include only bank account supposed to be displayed in document footers
|
||||
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.edi_m2m(cr, uid,
|
||||
res_partner_bank.browse(cr, uid, bank_ids, context=context),
|
||||
context=context)
|
||||
return result
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -19,14 +19,20 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import web.common.http
|
||||
try:
|
||||
# embedded
|
||||
import openerp.addons.web.common.http as openerpweb
|
||||
except ImportError:
|
||||
# standalone
|
||||
import web.common.http as openerpweb
|
||||
|
||||
import base64
|
||||
import urllib2
|
||||
|
||||
class Binary(web.common.http.Controller):
|
||||
class Binary(openerpweb.Controller):
|
||||
_cp_path = "/web_linkedin/binary"
|
||||
|
||||
@web.common.http.jsonrequest
|
||||
@openerpweb.jsonrequest
|
||||
def url2binary(self, req,url):
|
||||
bfile = urllib2.urlopen(url)
|
||||
return base64.b64encode(bfile.read())
|
||||
|
|
Loading…
Reference in New Issue