diff --git a/models/partner.py b/models/partner.py index 344117f..6a8d014 100644 --- a/models/partner.py +++ b/models/partner.py @@ -9,7 +9,24 @@ from string import ascii_uppercase class partner(models.Model): _inherit = 'res.partner' - + type = fields.Selection( + [('contact', 'Contact'), + ('invoice', 'Invoice Address'), + ('delivery', 'Delivery Address'), + ('other', 'Other Address'), + ("private", "Private Address"), + ], string='Address Type', + default='private', + help="Invoice & Delivery addresses are used in sales orders. Private addresses are only visible by authorized users.") + + locality=fields.Char('Locality') + tax_street=fields.Char('Street') + tax_street2=fields.Char('Street2') + tax_locality=fields.Char('Locality') + tax_city=fields.Char('City') + tax_zip=fields.Char('Zip ') + tax_country_id=fields.Many2one('res.country') + def _compute_address_count(self): # The current user may not have access rights for donations for partner in self: @@ -129,32 +146,32 @@ class partner(models.Model): def _alpha(self,id): alpha={} - alpha[1]='A' - alpha[2]='B' - alpha[3]='C' - alpha[4]='D' - alpha[5]='E' - alpha[6]='F' - alpha[7]='G' - alpha[8]='H' - alpha[9]='I' - alpha[10]='J' - alpha[11]='K' - alpha[12]='L' - alpha[13]='M' - alpha[14]='N' - alpha[15]='O' - alpha[16]='P' - alpha[17]='Q' - alpha[18]='R' - alpha[19]='S' - alpha[20]='T' - alpha[21]='U' - alpha[22]='V' - alpha[23]='W' - alpha[24]='X' - alpha[25]='Y' - alpha[26]='Z' + alpha[0]='A' + alpha[1]='B' + alpha[2]='C' + alpha[3]='D' + alpha[4]='E' + alpha[5]='F' + alpha[6]='G' + alpha[7]='H' + alpha[8]='I' + alpha[9]='J' + alpha[10]='K' + alpha[11]='L' + alpha[12]='M' + alpha[13]='N' + alpha[14]='O' + alpha[15]='P' + alpha[16]='Q' + alpha[17]='R' + alpha[18]='S' + alpha[19]='T' + alpha[20]='U' + alpha[21]='V' + alpha[22]='W' + alpha[23]='X' + alpha[24]='Y' + alpha[25]='Z' return (alpha[id%26]) def _compute_key(self): diff --git a/views/partner.xml b/views/partner.xml index 2ee18b1..761b3ce 100644 --- a/views/partner.xml +++ b/views/partner.xml @@ -2,6 +2,23 @@ + + Contacts + ir.actions.act_window + res.partner + kanban,tree,form,activity + + {'default_is_company': False,'type':'private'} + +

+ Create a contact in your address book +

+ Odoo helps you to easily track all activities related to a customer. +

+
+
+ + Text qualifiers opendons_qualifier.partnerqualifier @@ -70,12 +87,36 @@ + + + + + + + + + + +
+ + + + + + +
+
+
+
+
+ + @@ -98,26 +139,10 @@ - - - - + - +