From 7ec1b4ab8e3e1bd61d2827b82464da5bc22dc1ce Mon Sep 17 00:00:00 2001 From: Ahmed Aly Date: Wed, 4 Apr 2018 08:46:15 +0200 Subject: [PATCH 01/13] Fall 5398: CR1 - Anpassungen SST-01 / Neues Feld --- .../interfaces/sst11_pg_create_company.py | 5 +- .../dp_custom/models/res_partner.py | 37 +- .../dp_custom/views/res_partner_views.xml | 4 +- .../dp_reports/reports/report_templates.xml | 316 ++++++++++-------- 4 files changed, 210 insertions(+), 152 deletions(-) diff --git a/dev/scripts/interfaces/sst11_pg_create_company.py b/dev/scripts/interfaces/sst11_pg_create_company.py index 7fef7bc5..40785145 100755 --- a/dev/scripts/interfaces/sst11_pg_create_company.py +++ b/dev/scripts/interfaces/sst11_pg_create_company.py @@ -13,9 +13,10 @@ odoo.login(db, user, pw) values = { "name": "Company2", - "street": "Elterleinplatz 11", + "name2": "Unternehmen 2", + "street": "Matzleinsdorferplatz 5", "street2": "Teststrasse 30", - "zip": 1170, + "zip": 1050, "city": "Wien", "country_id": "AT", "fax": "+43 55567051", diff --git a/ext/custom-addons/dp_custom/models/res_partner.py b/ext/custom-addons/dp_custom/models/res_partner.py index 3e7671a9..5c6ad7ee 100644 --- a/ext/custom-addons/dp_custom/models/res_partner.py +++ b/ext/custom-addons/dp_custom/models/res_partner.py @@ -245,7 +245,7 @@ class Partner(models.Model): elif self.env.context.get('sst_11', False): common_list.extend(['name', 'ref', 'partner_sector_id', 'comment', 'vat', 'property_payment_term_id', 'property_pricelist_id', 'date_vat_check', 'active', 'property_product_pricelist', - 'retail_partner_id', 'retailer', 'info_uid']) + 'retail_partner_id', 'retailer', 'info_uid', 'name2']) elif self.env.context.get('sst_14', False): common_list.extend(['firstname', 'lastname', 'midname', 'company_odoo_id', 'portal_id']) return common_list @@ -296,6 +296,41 @@ class Partner(models.Model): vals[field] = False return super(Partner, self).write(vals) + @api.multi + def name_get(self): + res = [] + for partner in self: + name = partner.name or '' + if partner.name2: + name += " " + partner.name2 + + if partner.company_name or partner.parent_id: + if not name and partner.type in ['invoice', 'delivery', 'other']: + name = dict(self.fields_get(['type'])['type']['selection'])[partner.type] + if not partner.is_company: + name = "%s, %s" % (partner.commercial_company_name or partner.parent_id.name, name) + if self._context.get('show_address_only'): + name = partner._display_address(without_company=True) + if self._context.get('show_address'): + name = name + "\n" + partner._display_address(without_company=True) + name = name.replace('\n\n', '\n') + name = name.replace('\n\n', '\n') + if self._context.get('show_email') and partner.email: + name = "%s <%s>" % (name, partner.email) + if self._context.get('html_format'): + name = name.replace('\n', '
') + res.append((partner.id, name)) + return res + + @api.depends('company_name', 'parent_id.is_company', 'commercial_partner_id.name') + def _compute_commercial_company_name(self): + res = super(Partner, self)._compute_commercial_company_name() + for partner in self: + p = partner.commercial_partner_id + if p.is_company and p.name2: + partner.commercial_company_name += " " + p.name2 + return res + class PartnerSector(models.Model): _name = 'res.partner.sector' diff --git a/ext/custom-addons/dp_custom/views/res_partner_views.xml b/ext/custom-addons/dp_custom/views/res_partner_views.xml index 844e9ee9..c8211623 100644 --- a/ext/custom-addons/dp_custom/views/res_partner_views.xml +++ b/ext/custom-addons/dp_custom/views/res_partner_views.xml @@ -12,9 +12,9 @@ class="btn-danger" attrs="{'invisible':[('portal_pending','=',False)]}"/> - +

- +

diff --git a/ext/custom-addons/dp_reports/reports/report_templates.xml b/ext/custom-addons/dp_reports/reports/report_templates.xml index bcec8bd6..bf59339f 100644 --- a/ext/custom-addons/dp_reports/reports/report_templates.xml +++ b/ext/custom-addons/dp_reports/reports/report_templates.xml @@ -1,166 +1,188 @@ - - + - - - - - - + + + From c7780a1cc54af4e8b8e18efa7f9f52d125f0709e Mon Sep 17 00:00:00 2001 From: Ahmed Aly Date: Wed, 4 Apr 2018 08:59:05 +0200 Subject: [PATCH 02/13] =?UTF-8?q?Fall=205400:=20CR1=20-=20Zahlungsbedingun?= =?UTF-8?q?gen=20H=C3=A4ndler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ext/custom-addons/dp_custom/models/sale.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index 43dbccef..714a6b46 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -52,6 +52,13 @@ class SaleOrder(models.Model): weight_total = fields.Float(string='Gesamtgewicht', compute='_compute_weight_total') confirmation_nr = fields.Char('Freigabe-Nr.') + @api.multi + @api.onchange('partner_invoice_id') + def _onchange_partner_invoice_id(self): + for record in self: + if record.partner_invoice_id.retail_partner_id: + record.payment_term_id = record.partner_invoice_id.retail_partner_id.property_payment_term_id + @api.multi def _compute_weight_total(self): for record in self: @@ -175,11 +182,14 @@ class SaleOrder(models.Model): order_line_vals = vals.get('order_lines', False) vals = self.remove_not_specified_fields(vals) vals = self.correct_values(vals) + payment_term = partner.property_payment_term_id + if partner.retail_partner_id: + payment_term = partner.retail_partner_id.property_payment_term_id vals.update({ 'partner_id': partner.id, 'fiscal_position_id': partner.property_account_position_id.id, 'user_id': partner.user_id.id, - 'payment_term_id': partner.property_payment_term_id.id, + 'payment_term_id': payment_term.id, 'partner_shipping_id': delivery_partner.id, 'partner_invoice_id': partner.id, 'incoterm': partner.sale_incoterm_id.id From 344eb4d7a47ba52c285c146b1ab7cb29aa0cb81b Mon Sep 17 00:00:00 2001 From: Ahmed Aly Date: Wed, 4 Apr 2018 12:26:07 +0200 Subject: [PATCH 03/13] Fall 5389: Designanpassungen Odoo-Backend lt. Monika Haider --- ext/custom-addons/dp_style/LICENSE | 27 ++++++++ ext/custom-addons/dp_style/__init__.py | 0 ext/custom-addons/dp_style/__manifest__.py | 21 ++++++ .../dp_style/static/description/icon.png | Bin 0 -> 2225 bytes .../dp_style/static/src/img/favicon.ico | Bin 0 -> 26622 bytes .../dp_style/static/src/less/variables.less | 60 ++++++++++++++++++ ext/custom-addons/dp_style/views/assets.xml | 10 +++ 7 files changed, 118 insertions(+) create mode 100644 ext/custom-addons/dp_style/LICENSE create mode 100644 ext/custom-addons/dp_style/__init__.py create mode 100644 ext/custom-addons/dp_style/__manifest__.py create mode 100644 ext/custom-addons/dp_style/static/description/icon.png create mode 100644 ext/custom-addons/dp_style/static/src/img/favicon.ico create mode 100644 ext/custom-addons/dp_style/static/src/less/variables.less create mode 100644 ext/custom-addons/dp_style/views/assets.xml diff --git a/ext/custom-addons/dp_style/LICENSE b/ext/custom-addons/dp_style/LICENSE new file mode 100644 index 00000000..1a40586b --- /dev/null +++ b/ext/custom-addons/dp_style/LICENSE @@ -0,0 +1,27 @@ +Odoo Proprietary License v1.0 + +This software and associated files (the "Software") may only be used (executed, +modified, executed after modifications) if you have purchased a valid license +from the authors, typically via Odoo Apps, or if you have received a written +agreement from the authors of the Software (see the COPYRIGHT file). + +You may develop Odoo modules that use the Software as a library (typically by +depending on it, importing it and using its resources), but without copying any +source code or material from the Software. You may distribute those modules +under the license of your choice, provided that this license is compatible with +the terms of the Odoo Proprietary License (For example: LGPL, MIT, +or proprietary licenses similar to this one). + +It is forbidden to publish, distribute, sublicense, or sell copies of the Software +or modified copies of the Software. + +The above copyright notice and this permission notice must be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/ext/custom-addons/dp_style/__init__.py b/ext/custom-addons/dp_style/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ext/custom-addons/dp_style/__manifest__.py b/ext/custom-addons/dp_style/__manifest__.py new file mode 100644 index 00000000..7deae8d4 --- /dev/null +++ b/ext/custom-addons/dp_style/__manifest__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Copyright 2018-Today datenpol gmbh() +# License OPL-1 or later (https://www.odoo.com/documentation/user/11.0/legal/licenses/licenses.html#licenses). + + +# noinspection PyStatementEffect +{ + 'name': 'Dp Style', + 'version': '11.0.1.0.0', + 'license': 'OPL-1', + 'author': 'datenpol gmbh', + 'website': 'https://www.datenpol.at', + 'depends': [ + 'web', + ], + 'data': [ + 'views/assets.xml', + ], + 'installable': True, + 'auto_install': False, +} diff --git a/ext/custom-addons/dp_style/static/description/icon.png b/ext/custom-addons/dp_style/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8387d76554e8c52cf9256f9dc3f0358744f26f8e GIT binary patch literal 2225 zcmV;i2u}BjP)e zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{005UN6GXZYpd*5GTM;9mttz230kztuXpqw7k0!Bk-aY#xp76VI(r5cRu^;~ayve)o z`g`Zx^W&a#fjsiaBab}t$Rm%O1kLpVeEvYW6vi3`uOQG;0ObG{0Vo1c82h&o0Amac z3c?@*S0U*yqwkfR@9k}wxT6U4cv@TwO0Ihd_zE+s0W3~qx(I+C0Dmlq7KS=I_l!7} zKyTgFVuQ>r%)AM}k_@~e0>V*g^6nEy_W#{61lHC*zVOz(@Q;XTTbxQ}8r@Rz)3ZS& zWmHv*uYVgrD}aS_u|F~Rxp~p~Etyp9j1aiKq51x($uAP{`7AJ$L(HQ2c*n0^$q53h zH*Q%^B!4qkQa7zM67L?n@v*0LTWzfb*3>sW3C6Qo?6!4_uvy>L)jpPW1XkAt_Yi1X zwmZHI^f6pDCl2o&)-j*ZLSB8aH5bT>NlcZ%#Od1F#}{UW1m=L+PAiE<*z}~U&aU*- zwyAL%@~(l<7h7pnh8*Xa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f$QcM^ literal 0 HcmV?d00001 diff --git a/ext/custom-addons/dp_style/static/src/img/favicon.ico b/ext/custom-addons/dp_style/static/src/img/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..3c33e99bbdd94ba4a177804b29d9dfa9769712e6 GIT binary patch literal 26622 zcmeHQJ#X7a7-r!D2D-RQyA|q~wQCk<$Py_=48%4H{{Yo?Q6O8#sK^j>>)xeX|A2mg zf^1&BdT<5--RzNrVD@>AN8|2zCyUg3G$ot@nlDe}@$PxQU!IsO`wIUK4>SDzG5hbA zEc-sovS--Pl>LK^?dg*cNC+eZ5&{WRy21XTDP4>ii zif#Pv@bKHsL819be>;Bl-Py_TPXWwA_~zuv+1pn?H6LAnuTZ!t-L&*Egn?B1bQ^G_ zUSXr{dJGrnA#9(vZCbxyLY~y7j%g!H`K7+DruXQN{OhlD`A2r~^P3;EFIa}#T;TzX z+V}zGci=~qPg%~NIq~<8w12HyR+h*d<*XfMq1h74(tn3-1bNklPoaCpXa_F8hjo>) z$LM8@`&NA_xu*>X%j2}Kep=fmpT1HS$6fNCz61BX^5ZzX?3+ytV>i5{OjPpG<(~Ws zk85<*7Yu_s3q9&m=0d#D_Snp2w2llf#|H=Bgs$tNU5~A%vll0?Ctcis)q7}tuKP5^ z+pG2=eV)!+>wJX|k-nEie@igze7ux_O2fL#0 zHZO#!_9vzs6s%u_&X;KS)CA_6q_-{xs@`MkQV~lAwePa|g}lri(xPTP#Luh+mX@i~JjgSn&*qi-komX+_P#+9`!2S3CzGPPcxedtT=OcHnK@TG~N zR6c?}UD>{p9Cu&(s^@gWnZ(#?{YH+_CC1#Q508(Wx9P{d2J&a;yFIP%x#Mnn?91mQ zd-a&ud<(#^_ zmn$n0x`sXbY)t?rZyWvH)rb_on`AKWCi%y@$;6{{amgPE6mlxPa=L!`J0P$vt#fi)eo9M zW}ThtR~8(t4j_Y;50;24TMZ=AMZVlus(#8Lr~3VRjPumSw)^=JVvh9?v#-{%k(Gx) zCOcm@XOBwe$YG2V?eP{=iZUuwqa+qQlv z>KZosbO*me>N%gubIOHUuY~(i?qk#(z3ZVmcs2(7?0gvY>2>pLu0vv7LfcsDd4a*N zYqi!#pr)?SnC})_s7;A3gYHs%6B82 zK89o9_X`EvSDm}md0LNa@UB*k)i{JD<1*}vaUS8})kx;$+gGgfnqy;pfetzO-U&seJCv@vd65F3lO{g=N>snr^m z&M%^_Z`AusD$L6md*%1%M8TFexo>`=!e`Yz$1jwtHNki*-rrSvK52ioZ2aJ#g}{l zxzfB_?A>MAe#z7O-5F%8.o_main { + > .o_main_content { + > .o_content { + background-color: #eee; + } + } + } +} + +.main-nav > .container-fluid .o_sub_menu > .o_sub_menu_content > .oe_secondary_menu > li.app-name > .oe_menu_text { + color: #a72523; +} + +.o_control_panel { + border-bottom: 1px solid @odoo-control-panel-border-color; +} + +.o_mail_chat { + .o_mail_chat_content { + background-color: #eee; + } +} + +.o_dashboards { + .o_website_dashboard { + .o_dashboard_common { + .o_box { + background-color: #eee; + } + } + } +} + +.o_list_view { + background-color: #eee; + thead { + background-color: #9e9e9e; + color: #fff; + } +} diff --git a/ext/custom-addons/dp_style/views/assets.xml b/ext/custom-addons/dp_style/views/assets.xml new file mode 100644 index 00000000..67c1a1e3 --- /dev/null +++ b/ext/custom-addons/dp_style/views/assets.xml @@ -0,0 +1,10 @@ + + + + + + From 934c2558adf8c9be0a513254e250d0ef2c164180 Mon Sep 17 00:00:00 2001 From: Ahmed Aly Date: Wed, 4 Apr 2018 14:41:30 +0200 Subject: [PATCH 04/13] =?UTF-8?q?Fall=205370:=20Test-Feedback=20-=20Angebo?= =?UTF-8?q?t=20/=20Auftr=C3=A4ge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ext/custom-addons/dp_custom/models/sale.py | 2 +- .../dp_custom/views/sale_views.xml | 57 ++++++++++++++++--- 2 files changed, 49 insertions(+), 10 deletions(-) diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index 714a6b46..8128e8a6 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -50,7 +50,7 @@ class SaleOrder(models.Model): positions = fields.Integer(string='Positionen', compute='_compute_positions') num_items = fields.Integer(string='Anzahl der Artikel', compute='_compute_num_items') weight_total = fields.Float(string='Gesamtgewicht', compute='_compute_weight_total') - confirmation_nr = fields.Char('Freigabe-Nr.') + confirmation_nr = fields.Char('Freigabenummer') @api.multi @api.onchange('partner_invoice_id') diff --git a/ext/custom-addons/dp_custom/views/sale_views.xml b/ext/custom-addons/dp_custom/views/sale_views.xml index ae3ee58b..bc6ab6d9 100644 --- a/ext/custom-addons/dp_custom/views/sale_views.xml +++ b/ext/custom-addons/dp_custom/views/sale_views.xml @@ -6,9 +6,12 @@ sale.order + + - - + + + @@ -27,20 +30,56 @@
-