[ADD]GOLEM Member Partner view with tree and search modification

This commit is contained in:
Fabien Bourgeois 2016-07-08 18:23:04 +02:00
parent 1eedf82ae7
commit 6792e72fbc
2 changed files with 21 additions and 0 deletions

View File

@ -31,6 +31,7 @@ class ResPartner(models.Model):
member_id = fields.One2many('golem.member', 'partner_id', 'GOLEM Member',
readonly=True)
member_number = fields.Char('Member number', related='member_id.number')
@api.multi
def create_golem_member(self):

View File

@ -41,8 +41,28 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record>
<!-- Trees -->
<record model="ir.ui.view" id="member_add">
<field name="name">Add member number to tree</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_tree" />
<field name="arch" type="xml">
<field name="display_name" position="before">
<field name="member_number" />
</field>
</field>
</record>
<!-- Searches -->
<record model="ir.ui.view" id="member_number_search">
<field name="name">Partner GOLEM Member Number search</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter" />
<field name="arch" type="xml">
<field name="name" position="after">
<field name="member_number" />
</field>
</field>
</record>
</data>
</openerp>