From c6e04a4739844597715df9b0f4c1e563ecd1fa9f Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Mon, 12 Mar 2012 14:16:36 +0530 Subject: [PATCH 1/4] [IMP]base/res_company and res_partner: add photo field and readonly address bzr revid: kjo@tinyerp.com-20120312084636-ew5j4arua8hjdpih --- openerp/addons/base/base_update.xml | 2 +- openerp/addons/base/res/res_company.py | 3 +- openerp/addons/base/res/res_partner_demo.xml | 9 +++- openerp/addons/base/res/res_partner_view.xml | 52 ++++++++++---------- 4 files changed, 37 insertions(+), 29 deletions(-) diff --git a/openerp/addons/base/base_update.xml b/openerp/addons/base/base_update.xml index c5594f76e22..e52bf54545c 100644 --- a/openerp/addons/base/base_update.xml +++ b/openerp/addons/base/base_update.xml @@ -225,7 +225,7 @@ - + diff --git a/openerp/addons/base/res/res_company.py b/openerp/addons/base/res/res_company.py index 3d3234ab551..0bfd1ba2c99 100644 --- a/openerp/addons/base/res/res_company.py +++ b/openerp/addons/base/res/res_company.py @@ -143,6 +143,7 @@ class res_company(osv.osv): 'vat': fields.related('partner_id', 'vat', string="Tax ID", type="char", size=32), 'company_registry': fields.char('Company Registry', size=64), 'paper_format': fields.selection([('a4', 'A4'), ('us_letter', 'US Letter')], "Paper Format", required=True), + 'photo': fields.related('partner_id', 'photo', string="Photo", type="binary"), } _sql_constraints = [ ('name_uniq', 'unique (name)', 'The company name must be unique !') @@ -227,7 +228,7 @@ class res_company(osv.osv): self.cache_restart(cr) return super(res_company, self).create(cr, uid, vals, context=context) obj_partner = self.pool.get('res.partner') - partner_id = obj_partner.create(cr, uid, {'name': vals['name']}, context=context) + partner_id = obj_partner.create(cr, uid, {'name': vals['name'],'is_company':1}, context=context) vals.update({'partner_id': partner_id}) self.cache_restart(cr) company_id = super(res_company, self).create(cr, uid, vals, context=context) diff --git a/openerp/addons/base/res/res_partner_demo.xml b/openerp/addons/base/res/res_partner_demo.xml index 70d4b1fcc13..4a6e5da754d 100644 --- a/openerp/addons/base/res/res_partner_demo.xml +++ b/openerp/addons/base/res/res_partner_demo.xml @@ -104,10 +104,16 @@ Camptocamp - 1 1 1 + Le Bourget du Lac + 73377 + +41 21 619 10 04 + + Savoie Technolac, BP 352 + default + openerp@camptocamp.com www.camptocamp.com @@ -539,6 +545,7 @@ PSE-A, EPFL default + diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index 6194f9001c5..191e9eea57a 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -358,22 +358,22 @@ on_change="onchange_address(use_parent_address, parent_id)"/> - - - - - - + + + + + + - - - - - - - + + + + + + + @@ -408,22 +408,22 @@ - - - - - - + + + + + + - - - - - - - + + + + + + + From d8f4e757332c93ff425418495bc84f18849d0216 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Mon, 12 Mar 2012 15:14:29 +0530 Subject: [PATCH 2/4] [IMP]base/res_partner: change demo data bzr revid: kjo@tinyerp.com-20120312094429-fpmceeizvbn8eraa --- openerp/addons/base/res/res_partner_demo.xml | 314 +++++++++++-------- 1 file changed, 176 insertions(+), 138 deletions(-) diff --git a/openerp/addons/base/res/res_partner_demo.xml b/openerp/addons/base/res/res_partner_demo.xml index 4a6e5da754d..fd4453c63f6 100644 --- a/openerp/addons/base/res/res_partner_demo.xml +++ b/openerp/addons/base/res/res_partner_demo.xml @@ -94,12 +94,27 @@ 1 1 + Taiwan + Tang + 23410 + + 31 Hong Kong street + info@asustek.com + + 1 64 61 04 01 www.asustek.com Agrolait 1 + Wavre + 5478 + + 69 rue de Chimay + default + s.l@agrolait.be + 003281588558 + www.agrolait.com @@ -120,11 +135,26 @@ www.syleam.fr Syleam + Alencon + 61000 + contact@syleam.fr + 1 place de l'Église + +33 (0) 2 33 31 22 10 + + default 1 SmartBusiness 1 + Buenos Aires + 1659 + contact@smartbusiness.ar + Palermo, Capital Federal + C1414CMS Capital Federal + (5411) 4773-9666 + + default @@ -132,23 +162,51 @@ 1 1 + Champs sur Marne + 77420 + + info@axelor.com + +33 1 64 61 04 01 + 12 rue Albert Einstein + default www.axelor.com/ Tiny AT Work 1 + Boston + 5501 + info@tinyatwork.com + +33 (0) 2 33 31 22 10 + + One Lincoln Street + default www.tinyatwork.com/ Bank Wealthy and sons 1 + Paris + 75016 + + 1 rue Rockfeller + default + a.g@wealthyandsons.com + 003368978776 www.wealthyandsons.com/ China Export 1 + Shanghai + 478552 + + 52 Chop Suey street + default + zen@chinaexport.com + +86-751-64845671 www.chinaexport.com/ @@ -157,12 +215,26 @@ 1 1 + Namur + 2541 + + 42 rue de la Lesse + default + info@distribpc.com + + 32 081256987 www.distribpc.com/ Ecole de Commerce de Liege 1 + Liege + 6985 + + 2 Impasse de la Soif + k.lesbrouffe@eci-liege.info + +32 421 52571 + default www.eci-liege.info// @@ -171,6 +243,13 @@ 1 1 + Brussels + 2365 + + 23 rue du Vieux Bruges + default + info@elecimport.com + + 32 025 897 456 Maxtor @@ -179,6 +258,14 @@ 1 1 + Hong Kong + Wong + 23540 + + 56 Beijing street + info@maxtor.com + + 11 8528 456 789 + default Seagate @@ -186,12 +273,25 @@ 1 1 + Cupertino + Seagate Technology + 95014 + + 10200 S. De Anza Blvd + info@seagate.com + +1 408 256987 + default http://mediapole.net Mediapole SPRL 1 + Louvain-la-Neuve + 1348 + + (+32).10.45.17.73 + Rue de l'Angelique, 1 www.balmerinc.com @@ -200,18 +300,38 @@ or 1 + Bruxelles + 1000 + + info@balmerinc.be + (+32)2 211 34 83 + Rue des Palais 51, bte 33 + default Tecsas 3020170000003 1 + Avignon CEDEX 09 + 84911 + + contact@tecsas.fr + (+33)4.32.74.10.57 + 85 rue du traite de Rome + default Leclerc 1 + default + rue Grande + Brest + 29200 + marine@leclerc.fr + +33-298.334558 Centrale d'achats BML @@ -219,6 +339,14 @@ 1 + default + Carl François + Bruxelles + 1000 + + 89 Chaussée de Waterloo + carl.françois@bml.be + +32-258-256545 Magazin BML 1 @@ -226,11 +354,23 @@ 1 + default + 89 Chaussée de Liège + Namur + 5000 + lucien.ferguson@bml.be + +32-621-568978 Université de Liège 1 + default + Place du 20Août + Liège + 4000 + martine.ohio@ulg.ac.be + +32-45895245 http://www.ulg.ac.be/ @@ -242,6 +382,11 @@ Dubois sprl 1 + + + + + http://www.dubois.be/ @@ -249,12 +394,22 @@ Eric Dubois 1 + + + + + + Fabien Dupont 1 + + + + @@ -275,6 +430,8 @@ The Shelve House 1 + + @@ -283,6 +440,12 @@ 1 0 1 + + + + + + vicking-direct.be @@ -292,6 +455,9 @@ 1 1 + + + woodywoodpecker.com @@ -299,6 +465,8 @@ ZeroOne Inc 1 + + http://www.zerooneinc.com/ @@ -307,14 +475,7 @@ --> - Bruxelles Michel Schumacher - 1000 - - info@balmerinc.be - (+32)2 211 34 83 - Rue des Palais 51, bte 33 - default @@ -327,25 +488,14 @@ 85 rue du traite de Rome default + - Champs sur Marne Laith Jubair - 77420 - - info@axelor.com - +33 1 64 61 04 01 - 12 rue Albert Einstein - default - Louvain-la-Neuve Thomas Passot - 1348 - - (+32).10.45.17.73 - Rue de l'Angelique, 1 @@ -357,39 +507,19 @@ info@asustek.com + 1 64 61 04 01 default + - Hong Kong Wong - 23540 - - 56 Beijing street - info@maxtor.com - + 11 8528 456 789 - default - Brussels Etienne Lacarte - 2365 - - 23 rue du Vieux Bruges - default - info@elecimport.com - + 32 025 897 456 - Namur Jean Guy Lavente - 2541 - - 42 rue de la Lesse - default - info@distribpc.com - + 32 081256987 @@ -401,6 +531,7 @@ default s.l@agrolait.be 003281588558 + @@ -413,6 +544,7 @@ delivery p.l@agrolait.be 003281588557 + @@ -425,52 +557,25 @@ invoice serge.l@agrolait.be 003281588556 + - Paris Arthur Grosbonnet - 75016 - - 1 rue Rockfeller - default - a.g@wealthyandsons.com - 003368978776 - Alencon Sebastien LANGE - 61000 - contact@syleam.fr - 1 place de l'Église - +33 (0) 2 33 31 22 10 - - default - Liege Karine Lesbrouffe - 6985 - - 2 Impasse de la Soif - k.lesbrouffe@eci-liege.info - +32 421 52571 - default - Shanghai Zen - 478552 - - 52 Chop Suey street - default - zen@chinaexport.com - +86-751-64845671 @@ -483,27 +588,15 @@ default l.dupont@tecsas.fr +33-658-256545 + - default Carl François - Bruxelles - 1000 - - 89 Chaussée de Waterloo - carl.françois@bml.be - +32-258-256545 - default Lucien Ferguson - 89 Chaussée de Liège - Namur - 5000 - lucien.ferguson@bml.be - +32-621-568978 @@ -514,6 +607,7 @@ 29200 marine@leclerc.fr +33-298.334558 + @@ -524,17 +618,12 @@ 29200 claude@leclerc.fr +33-298.334598 + - default Martine Ohio - Place du 20Août - Liège - 4000 - martine.ohio@ulg.ac.be - +32-45895245 @@ -549,37 +638,15 @@ - Cupertino Seagate Technology - 95014 - - 10200 S. De Anza Blvd - info@seagate.com - +1 408 256987 - default - Buenos Aires Jack Daniels - 1659 - contact@smartbusiness.ar - Palermo, Capital Federal - C1414CMS Capital Federal - (5411) 4773-9666 - - default - Boston Tiny Work - 5501 - info@tinyatwork.com - +33 (0) 2 33 31 22 10 - - One Lincoln Street - default @@ -628,73 +695,44 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 41a5021110f34262b3889ddf83eb5f7a4e064093 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Tue, 13 Mar 2012 11:00:48 +0530 Subject: [PATCH 3/4] [IMP]base/res_partner : demo data change bzr revid: kjo@tinyerp.com-20120313053048-jmybumt3hif622y2 --- openerp/addons/base/res/res_partner_demo.xml | 213 +++++++++++++++---- openerp/addons/base/res/res_partner_view.xml | 52 ++--- 2 files changed, 202 insertions(+), 63 deletions(-) diff --git a/openerp/addons/base/res/res_partner_demo.xml b/openerp/addons/base/res/res_partner_demo.xml index fd4453c63f6..0b032fe4659 100644 --- a/openerp/addons/base/res/res_partner_demo.xml +++ b/openerp/addons/base/res/res_partner_demo.xml @@ -95,7 +95,6 @@ 1 Taiwan - Tang 23410 31 Hong Kong street @@ -111,10 +110,8 @@ 5478 69 rue de Chimay - default s.l@agrolait.be 003281588558 - www.agrolait.com @@ -127,7 +124,6 @@ +41 21 619 10 04 Savoie Technolac, BP 352 - default openerp@camptocamp.com www.camptocamp.com @@ -141,7 +137,6 @@ 1 place de l'Église +33 (0) 2 33 31 22 10 - default 1 @@ -154,7 +149,6 @@ C1414CMS Capital Federal (5411) 4773-9666 - default @@ -168,7 +162,6 @@ info@axelor.com +33 1 64 61 04 01 12 rue Albert Einstein - default www.axelor.com/ @@ -181,7 +174,6 @@ +33 (0) 2 33 31 22 10 One Lincoln Street - default www.tinyatwork.com/ @@ -191,7 +183,6 @@ 75016 1 rue Rockfeller - default a.g@wealthyandsons.com 003368978776 www.wealthyandsons.com/ @@ -204,7 +195,6 @@ 478552 52 Chop Suey street - default zen@chinaexport.com +86-751-64845671 www.chinaexport.com/ @@ -219,7 +209,6 @@ 2541 42 rue de la Lesse - default info@distribpc.com + 32 081256987 www.distribpc.com/ @@ -234,7 +223,6 @@ 2 Impasse de la Soif k.lesbrouffe@eci-liege.info +32 421 52571 - default www.eci-liege.info// @@ -247,7 +235,6 @@ 2365 23 rue du Vieux Bruges - default info@elecimport.com + 32 025 897 456 @@ -259,13 +246,11 @@ 1 Hong Kong - Wong 23540 56 Beijing street info@maxtor.com + 11 8528 456 789 - default Seagate @@ -274,13 +259,11 @@ 1 1 Cupertino - Seagate Technology 95014 10200 S. De Anza Blvd info@seagate.com +1 408 256987 - default http://mediapole.net @@ -306,7 +289,6 @@ info@balmerinc.be (+32)2 211 34 83 Rue des Palais 51, bte 33 - default Tecsas @@ -319,14 +301,12 @@ contact@tecsas.fr (+33)4.32.74.10.57 85 rue du traite de Rome - default Leclerc 1 - default rue Grande Brest 29200 @@ -339,7 +319,6 @@ 1 - default Carl François Bruxelles 1000 @@ -354,7 +333,6 @@ 1 - default 89 Chaussée de Liège Namur 5000 @@ -476,63 +454,108 @@ Michel Schumacher + www.balmerinc.com + or + Bruxelles + 1000 + + info@balmerinc.be + (+32)2 211 34 83 + Rue des Palais 51, bte 33 + - Avignon CEDEX 09 Laurent Jacot + Avignon CEDEX 09 84911 contact@tecsas.fr (+33)4.32.74.10.57 85 rue du traite de Rome - default + - Laith Jubair + Champs sur Marne + 77420 + + info@axelor.com + +33 1 64 61 04 01 + 12 rue Albert Einstein + www.axelor.com/ + Thomas Passot + http://mediapole.net + Louvain-la-Neuve + 1348 + + (+32).10.45.17.73 + Rue de l'Angelique, 1 + - Taiwan Tang + Taiwan 23410 31 Hong Kong street info@asustek.com + 1 64 61 04 01 - default - + www.asustek.com + Wong + Hong Kong + 23540 + + 56 Beijing street + info@maxtor.com + + 11 8528 456 789 + Etienne Lacarte + Brussels + 2365 + + 23 rue du Vieux Bruges + info@elecimport.com + + 32 025 897 456 + Jean Guy Lavente + Namur + 2541 + + 42 rue de la Lesse + info@distribpc.com + + 32 081256987 + www.distribpc.com/ + - Wavre Sylvie Lelitre + + Wavre 5478 69 rue de Chimay - default - s.l@agrolait.be - 003281588558 - - + s.l@agrolait.be + 003281588558 + www.agrolait.com + @@ -564,18 +587,50 @@ Arthur Grosbonnet + Paris + 75016 + + 1 rue Rockfeller + a.g@wealthyandsons.com + 003368978776 + www.wealthyandsons.com/ + Sebastien LANGE + www.syleam.fr + Alencon + 61000 + contact@syleam.fr + 1 place de l'Église + +33 (0) 2 33 31 22 10 + + Karine Lesbrouffe + Liege + 6985 + + 2 Impasse de la Soif + k.lesbrouffe@eci-liege.info + +32 421 52571 + www.eci-liege.info// + Zen + Shanghai + 478552 + + 52 Chop Suey street + zen@chinaexport.com + +86-751-64845671 + www.chinaexport.com/ + @@ -592,11 +647,24 @@ - Carl François + Carl + Bruxelles + 1000 + + 89 Chaussée de Waterloo + carl.françois@bml.be + +32-258-256545 + Lucien Ferguson + 89 Chaussée de Liège + Namur + 5000 + lucien.ferguson@bml.be + +32-621-568978 + @@ -624,6 +692,13 @@ Martine Ohio + Place du 20Août + Liège + 4000 + martine.ohio@ulg.ac.be + +32-45895245 + http://www.ulg.ac.be/ + @@ -639,14 +714,37 @@ Seagate Technology + Cupertino + 95014 + + 10200 S. De Anza Blvd + info@seagate.com + +1 408 256987 + Jack Daniels + Buenos Aires + 1659 + contact@smartbusiness.ar + Palermo, Capital Federal + C1414CMS Capital Federal + (5411) 4773-9666 + + Tiny Work + Boston + 5501 + info@tinyatwork.com + +33 (0) 2 33 31 22 10 + + One Lincoln Street + www.tinyatwork.com/ + @@ -696,42 +794,83 @@ + + + + + + + + + + vicking-direct.be + + 1 + + + + woodywoodpecker.com + + + + http://www.zerooneinc.com/ + + + + + + + http://www.dubois.be/ + - + + + + + + - + + + + + + + + + diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index 191e9eea57a..6194f9001c5 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -358,22 +358,22 @@ on_change="onchange_address(use_parent_address, parent_id)"/> - - - - - - + + + + + + - - - - - - - + + + + + + + @@ -408,22 +408,22 @@ - - - - - - + + + + + + - - - - - - - + + + + + + + From 3b56005bcb0b924a456643e5dda8db681fcbdda6 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Tue, 13 Mar 2012 12:09:06 +0530 Subject: [PATCH 4/4] [IMP]base/res_partner: set indentation in demo bzr revid: kjo@tinyerp.com-20120313063906-3gv0qpr9fafmj8el --- openerp/addons/base/res/res_partner_demo.xml | 62 ++++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/openerp/addons/base/res/res_partner_demo.xml b/openerp/addons/base/res/res_partner_demo.xml index 4c9d786f4d5..81f5c5dd21b 100644 --- a/openerp/addons/base/res/res_partner_demo.xml +++ b/openerp/addons/base/res/res_partner_demo.xml @@ -64,22 +64,22 @@ - - Consumers - - - - Retailers - - - - Miscellaneous Suppliers - - - - Wood Suppliers - - + + Consumers + + + + Retailers + + + + Miscellaneous Suppliers + + + + Wood Suppliers + +