[IMP] sale_portal: add a config setting to make the portal payment option visible to all employees
bzr revid: odo@openerp.com-20121026170548-h825iisbs4vn865l
This commit is contained in:
parent
52ee9769f6
commit
657de17a68
|
@ -223,7 +223,7 @@
|
|||
</div>
|
||||
</group>
|
||||
<separator string="Bank & Cash"/>
|
||||
<group>
|
||||
<group name="bank_cash">
|
||||
<label for="id" string="Configuration"/>
|
||||
<div>
|
||||
<div>
|
||||
|
|
|
@ -19,4 +19,5 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import portal_sale
|
||||
import portal_sale
|
||||
import res_config
|
|
@ -48,6 +48,7 @@ by default, you simply need to configure a Paypal account in the Accounting sett
|
|||
'data': [
|
||||
'security/portal_security.xml',
|
||||
'portal_sale_view.xml',
|
||||
'res_config_view.xml',
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
'auto_install': True,
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Business Applications
|
||||
# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import fields, osv
|
||||
|
||||
class sale_portal_config_settings(osv.TransientModel):
|
||||
_inherit = 'account.config.settings'
|
||||
|
||||
_columns = {
|
||||
'group_payment_options': fields.boolean('Show payment buttons',
|
||||
implied_group='portal_sale.group_payment_options',
|
||||
help="Show online payment options to all employees on Sale Orders and Customer Invoices. "
|
||||
"If not enabled, these options will only be visible to portal users"),
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Add payment options to sale.order and invoice forms -->
|
||||
<record model="ir.ui.view" id="portal_sale_payment_option_config">
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="account.view_account_config_settings"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='bank_cash']/div" version="7.0" position="inside">
|
||||
<div>
|
||||
<field name="group_payment_options" class="oe_inline"/>
|
||||
<label for="group_payment_options"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
Loading…
Reference in New Issue