Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
faircoop
FairCoopTech
FairCoopSites
invoices.freedoomcop.eu
Commits
cf0f297d
Commit
cf0f297d
authored
Nov 08, 2017
by
santi
Browse files
Added the betbank_id field
Cleaned te partner form for users
parent
c891d226
Changes
5
Hide whitespace changes
Inline
Side-by-side
partner_custom/__init__.py
View file @
cf0f297d
# -*- coding: utf-8 -*-
#
import models
import
models
partner_custom/__openerp__.py
View file @
cf0f297d
...
...
@@ -2,7 +2,7 @@
{
'name'
:
'Partner FreedomCoop Custom'
,
'depends'
:
[
'base'
],
'depends'
:
[
'base'
,
'account'
],
'author'
:
'Santi Punto0 - FairCooop'
,
'category'
:
'Base'
,
'description'
:
"""
...
...
partner_custom/models/__init__.py
0 → 100644
View file @
cf0f297d
import
res_partner
partner_custom/models/res_partner.py
0 → 100644
View file @
cf0f297d
# -*- coding: utf-8 -*-
import
logging
from
openerp
import
models
,
fields
,
api
,
osv
,
_
_logger
=
logging
.
getLogger
(
__name__
)
class
ResPartner
(
models
.
Model
):
_inherit
=
'res.partner'
betabank_id
=
fields
.
Char
(
'Betabank User Id'
,
help
=
"The user id in betabank to print in the invoice"
)
partner_custom/views/partner_view.xml
View file @
cf0f297d
...
...
@@ -6,6 +6,9 @@
<field
name=
"model"
>
res.partner
</field>
<field
name=
"inherit_id"
ref=
"base.view_partner_form"
/>
<field
name=
"arch"
type=
"xml"
>
<xpath
expr=
"//field[@name='website']"
position=
"after"
>
<field
name=
"betabank_id"
groups=
"account.group_account_user"
/>
</xpath>
<xpath
expr=
"//field[@name='user_id']"
position=
"attributes"
>
<attribute
name=
"groups"
>
"account.group_account_user"
</attribute>
</xpath>
...
...
@@ -18,21 +21,43 @@
<xpath
expr=
"//group/field[@name='customer']"
position=
"attributes"
>
<attribute
name=
"groups"
>
"account.group_account_user"
</attribute>
</xpath>
<!--
<xpath expr="//field[@name='notify_email']" position="attributes">
<xpath
expr=
"//group/field[@name='supplier']"
position=
"attributes"
>
<attribute
name=
"groups"
>
"account.group_account_user"
</attribute>
</xpath>
<xpath expr="//field[@name='
opt_out
']" position="attributes">
<xpath
expr=
"//field[@name='
active
']"
position=
"attributes"
>
<attribute
name=
"groups"
>
"account.group_account_user"
</attribute>
</xpath>
<xpath expr="//group/field[@name='supplier']" position="attributes">
</field>
</record>
<record
id=
"partner_form_view_inherit_account"
model=
"ir.ui.view"
>
<field
name=
"name"
>
partner.form.view.inherit.account
</field>
<field
name=
"model"
>
res.partner
</field>
<field
name=
"inherit_id"
ref=
"account.view_partner_property_form"
/>
<field
name=
"arch"
type=
"xml"
>
<xpath
expr=
"//page[@name='accounting']"
position=
"attributes"
>
<attribute
name=
"groups"
>
"account.group_account_user"
</attribute>
</xpath>
<xpath expr="//field[@name='active']" position="attributes">
</field>
</record>
<record
id=
"partner_form_view_inherit_mail"
model=
"ir.ui.view"
>
<field
name=
"name"
>
partner.form.view.inherit.mail
</field>
<field
name=
"model"
>
res.partner
</field>
<field
name=
"inherit_id"
ref=
"mail.view_emails_partner_info_form"
/>
<field
name=
"arch"
type=
"xml"
>
<xpath
expr=
"//field[@name='notify_email']"
position=
"attributes"
>
<attribute
name=
"groups"
>
"account.group_account_user"
</attribute>
</xpath>
-->
</field>
</field>
</record>
<record
id=
"partner_form_view_inherit_opt"
model=
"ir.ui.view"
>
<field
name=
"name"
>
partner.form.view.inherit.opt
</field>
<field
name=
"model"
>
res.partner
</field>
<field
name=
"inherit_id"
ref=
"email_template.res_partner_opt_out_form"
/>
<field
name=
"arch"
type=
"xml"
>
<xpath
expr=
"//field[@name='opt_out']"
position=
"attributes"
>
<attribute
name=
"groups"
>
"account.group_account_user"
</attribute>
</xpath>
</field>
</record>
</data>
</openerp>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment