From 3d8176991fc3e5f5b85015da6493fb1bda358cc4 Mon Sep 17 00:00:00 2001 From: Ahmed Aly Date: Wed, 27 Sep 2017 10:51:21 +0200 Subject: [PATCH] added setup funktion remove_standard_translations added new modules for the reports of account, sale, purchase and stock --- ext/custom-addons/dp_max_width/__init__.py | 22 -- .../dp_max_width/__manifest__.py | 40 ---- .../dp_max_width/static/description/icon.png | Bin 2225 -> 0 bytes .../dp_max_width/static/src/css/max_width.css | 13 -- .../dp_max_width/views/max_width.xml | 12 -- .../dp_report/views/delivery.xml | 84 -------- ext/custom-addons/dp_report/views/invoice.xml | 65 ------ ext/custom-addons/dp_report/views/layouts.xml | 58 ------ .../dp_report/views/saleorder.xml | 85 -------- .../{dp_report => dp_reports}/__init__.py | 0 .../{dp_report => dp_reports}/__manifest__.py | 8 +- .../dp_reports/data/paperformat.xml | 18 ++ .../{dp_report => dp_reports}/i18n/de.po | 0 .../models/__init__.py | 2 + .../dp_reports/models/report_helper.py | 51 +++++ .../dp_reports/reports/layouts.xml | 115 +++++++++++ .../security/ir.model.access.csv | 0 .../static/src/less/report_backend.less | 7 + .../dp_reports_account/__init__.py | 3 + .../dp_reports_account/__manifest__.py | 23 +++ .../dp_reports_account/i18n/de.po | 19 ++ .../dp_reports_account/models/__init__.py | 4 + .../models/report_helper.py | 10 + .../dp_reports_account/reports/invoice.xml | 184 +++++++++++++++++ .../security/ir.model.access.csv | 1 + .../dp_reports_purchase/__init__.py | 3 + .../dp_reports_purchase/__manifest__.py | 24 +++ .../dp_reports_purchase/i18n/de.po | 19 ++ .../dp_reports_purchase/models/__init__.py | 3 + .../models/report_helper.py | 16 ++ .../dp_reports_purchase/reports/purchase.xml | 174 ++++++++++++++++ .../reports/purchasequotation.xml | 157 +++++++++++++++ .../security/ir.model.access.csv | 1 + ext/custom-addons/dp_reports_sale/__init__.py | 3 + .../dp_reports_sale/__manifest__.py | 23 +++ ext/custom-addons/dp_reports_sale/i18n/de.po | 19 ++ .../dp_reports_sale/models/__init__.py | 3 + .../dp_reports_sale/models/report_helper.py | 10 + .../dp_reports_sale/reports/sale.xml | 188 ++++++++++++++++++ .../security/ir.model.access.csv | 1 + .../dp_reports_stock/__init__.py | 3 + .../dp_reports_stock/__manifest__.py | 23 +++ ext/custom-addons/dp_reports_stock/i18n/de.po | 19 ++ .../dp_reports_stock/models/__init__.py | 3 + .../dp_reports_stock/models/report_helper.py | 10 + .../dp_reports_stock/reports/stock.xml | 123 ++++++++++++ .../security/ir.model.access.csv | 1 + setup/lib/cli.py | 6 + setup/lib/functions.py | 17 ++ 49 files changed, 1289 insertions(+), 384 deletions(-) delete mode 100755 ext/custom-addons/dp_max_width/__init__.py delete mode 100755 ext/custom-addons/dp_max_width/__manifest__.py delete mode 100644 ext/custom-addons/dp_max_width/static/description/icon.png delete mode 100644 ext/custom-addons/dp_max_width/static/src/css/max_width.css delete mode 100644 ext/custom-addons/dp_max_width/views/max_width.xml delete mode 100644 ext/custom-addons/dp_report/views/delivery.xml delete mode 100644 ext/custom-addons/dp_report/views/invoice.xml delete mode 100644 ext/custom-addons/dp_report/views/layouts.xml delete mode 100644 ext/custom-addons/dp_report/views/saleorder.xml rename ext/custom-addons/{dp_report => dp_reports}/__init__.py (100%) rename ext/custom-addons/{dp_report => dp_reports}/__manifest__.py (75%) create mode 100644 ext/custom-addons/dp_reports/data/paperformat.xml rename ext/custom-addons/{dp_report => dp_reports}/i18n/de.po (100%) rename ext/custom-addons/{dp_report => dp_reports}/models/__init__.py (52%) create mode 100644 ext/custom-addons/dp_reports/models/report_helper.py create mode 100644 ext/custom-addons/dp_reports/reports/layouts.xml rename ext/custom-addons/{dp_report => dp_reports}/security/ir.model.access.csv (100%) create mode 100644 ext/custom-addons/dp_reports/static/src/less/report_backend.less create mode 100644 ext/custom-addons/dp_reports_account/__init__.py create mode 100644 ext/custom-addons/dp_reports_account/__manifest__.py create mode 100644 ext/custom-addons/dp_reports_account/i18n/de.po create mode 100644 ext/custom-addons/dp_reports_account/models/__init__.py create mode 100644 ext/custom-addons/dp_reports_account/models/report_helper.py create mode 100644 ext/custom-addons/dp_reports_account/reports/invoice.xml create mode 100644 ext/custom-addons/dp_reports_account/security/ir.model.access.csv create mode 100644 ext/custom-addons/dp_reports_purchase/__init__.py create mode 100644 ext/custom-addons/dp_reports_purchase/__manifest__.py create mode 100644 ext/custom-addons/dp_reports_purchase/i18n/de.po create mode 100644 ext/custom-addons/dp_reports_purchase/models/__init__.py create mode 100644 ext/custom-addons/dp_reports_purchase/models/report_helper.py create mode 100644 ext/custom-addons/dp_reports_purchase/reports/purchase.xml create mode 100644 ext/custom-addons/dp_reports_purchase/reports/purchasequotation.xml create mode 100644 ext/custom-addons/dp_reports_purchase/security/ir.model.access.csv create mode 100644 ext/custom-addons/dp_reports_sale/__init__.py create mode 100644 ext/custom-addons/dp_reports_sale/__manifest__.py create mode 100644 ext/custom-addons/dp_reports_sale/i18n/de.po create mode 100644 ext/custom-addons/dp_reports_sale/models/__init__.py create mode 100644 ext/custom-addons/dp_reports_sale/models/report_helper.py create mode 100644 ext/custom-addons/dp_reports_sale/reports/sale.xml create mode 100644 ext/custom-addons/dp_reports_sale/security/ir.model.access.csv create mode 100644 ext/custom-addons/dp_reports_stock/__init__.py create mode 100644 ext/custom-addons/dp_reports_stock/__manifest__.py create mode 100644 ext/custom-addons/dp_reports_stock/i18n/de.po create mode 100644 ext/custom-addons/dp_reports_stock/models/__init__.py create mode 100644 ext/custom-addons/dp_reports_stock/models/report_helper.py create mode 100644 ext/custom-addons/dp_reports_stock/reports/stock.xml create mode 100644 ext/custom-addons/dp_reports_stock/security/ir.model.access.csv diff --git a/ext/custom-addons/dp_max_width/__init__.py b/ext/custom-addons/dp_max_width/__init__.py deleted file mode 100755 index 487b990e..00000000 --- a/ext/custom-addons/dp_max_width/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# datenpol gmbh -# Copyright (C) 2013-TODAY datenpol gmbh () -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/ext/custom-addons/dp_max_width/__manifest__.py b/ext/custom-addons/dp_max_width/__manifest__.py deleted file mode 100755 index da20972f..00000000 --- a/ext/custom-addons/dp_max_width/__manifest__.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# datenpol gmbh -# Copyright (C) 2013-TODAY datenpol gmbh () -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -{ - 'name': 'Max. Width for Form View', - 'category': 'Custom', - 'version': '1.0', - 'description': """ - """, - 'author': 'datenpol GmbH', - 'website': 'http://www.datenpol.at', - 'depends': [], - 'data': [ - 'views/max_width.xml', - ], - 'installable': True, - 'sequence': 150, - 'auto_install': False, -} - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/ext/custom-addons/dp_max_width/static/description/icon.png b/ext/custom-addons/dp_max_width/static/description/icon.png deleted file mode 100644 index 8387d76554e8c52cf9256f9dc3f0358744f26f8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 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*XaFap9!FwQXWfgpT=8DER{LkXyoMaHiIe05GFFc!o9Lv@ac zXy*qvN_NFtJFh=jX&BV3{)i0V8i3s*Y`&yQme(Jw6oO7q@eT+-><+cH&MJW(Pm9Z4 zeElo|RjR9SJhcDGnZh}u=o1-;O0F@mV{EuIG?SZBv$1&H`D6wj(ulmjlk;q zU@I~GK$+=Kcc{&lI%p(v2*A$K;nElE`ghfJO^pQnPW=EPY+Z`Pm9Za&u|S1*#O2GBu;T% zBf=R5{?Hw2>q$r7eZGKO&Nu!Bpd$WvxC|B6}U~Iy8e=SmQtMC9E zfUYC$R~UFrF$|4b2_%9~8S0sf6R-?sXkJ!^*4kBLdwU?`Q6-b{G8}}0XkkbhDwIXW zDlG*1{DE>c0B5*PIf=l|&OIZHSoY|)G5MSp0;Mq4s9}_Dr#3slmSlot_GlrH!7G&g z@EjZoI2ewg@!BW+&7GXjkN$ zP9V?c50t9~0|^8sJp#MB+Q&dRs(hvIdps?!oR>bsP%9BeVgjR&z)829_9`QbW1UDj zi}el7_s6PcZxc$~o=mxlZ34SH_MKG^paDFSOc_MB!IZoMO1iEB7 zuXu=3X&J~QdDC<$9qJCXeK(!CjdUI!yxjNpvWluOfVIk>Jj*Mp?ps{E?nE*@92wd3 zHf~uj1Wu}w7i%_r%x-VX^m!H?i%itH6kBA0LH<;%Te|RgT3qgu|NJ!3x&T~~aD7on zm6@Sqv4i~=ddeyubQ5T`@^$W&jBhPlS@qw0OV+(HThi$D2P+Hj8hw>O8xnm~hU?3^ zO7v!}<)48*B5Y5$%jm;mTT}85HNuFG1qz~tn{<{Z&-$ek47^5!U86Tjdv#U$`}~1& zQ-~mef|#axF()pah?fK#*PaY9@k<0cl?s_Yf1q5F@hB4-)pY!n_vF&GCl-~iYYM>L z#XAuO&I!UGOY}3uJMmQkEX4vMS<1vqh-oE&O4zt_iwFlzc5TmONpi-oewsY6i9R)x zdSw8)fAv#BA}5=yHzBz|9(m-EM;>|Pk)!w@TDLdXvm#rS00000NkvXXu0mjf$QcM^ diff --git a/ext/custom-addons/dp_max_width/static/src/css/max_width.css b/ext/custom-addons/dp_max_width/static/src/css/max_width.css deleted file mode 100644 index a4458693..00000000 --- a/ext/custom-addons/dp_max_width/static/src/css/max_width.css +++ /dev/null @@ -1,13 +0,0 @@ -.o_followers .o_invite { - float: none !important; - display: block; - padding-left: 0px; -} - -.o_form_sheet { - max-width: 95% !important; -} - -.o_form_view .o_group.o_inner_group > tbody > tr > td.o_td_label { - min-width: 200px !important; -} diff --git a/ext/custom-addons/dp_max_width/views/max_width.xml b/ext/custom-addons/dp_max_width/views/max_width.xml deleted file mode 100644 index 4a819b1f..00000000 --- a/ext/custom-addons/dp_max_width/views/max_width.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/ext/custom-addons/dp_report/views/delivery.xml b/ext/custom-addons/dp_report/views/delivery.xml deleted file mode 100644 index 90d9385c..00000000 --- a/ext/custom-addons/dp_report/views/delivery.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/ext/custom-addons/dp_report/views/invoice.xml b/ext/custom-addons/dp_report/views/invoice.xml deleted file mode 100644 index 700f6b01..00000000 --- a/ext/custom-addons/dp_report/views/invoice.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/ext/custom-addons/dp_report/views/layouts.xml b/ext/custom-addons/dp_report/views/layouts.xml deleted file mode 100644 index 73ae4291..00000000 --- a/ext/custom-addons/dp_report/views/layouts.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - diff --git a/ext/custom-addons/dp_report/views/saleorder.xml b/ext/custom-addons/dp_report/views/saleorder.xml deleted file mode 100644 index 95d12c95..00000000 --- a/ext/custom-addons/dp_report/views/saleorder.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/ext/custom-addons/dp_report/__init__.py b/ext/custom-addons/dp_reports/__init__.py similarity index 100% rename from ext/custom-addons/dp_report/__init__.py rename to ext/custom-addons/dp_reports/__init__.py diff --git a/ext/custom-addons/dp_report/__manifest__.py b/ext/custom-addons/dp_reports/__manifest__.py similarity index 75% rename from ext/custom-addons/dp_report/__manifest__.py rename to ext/custom-addons/dp_reports/__manifest__.py index c2879695..8a7565b3 100644 --- a/ext/custom-addons/dp_report/__manifest__.py +++ b/ext/custom-addons/dp_reports/__manifest__.py @@ -11,13 +11,11 @@ 'website': 'http://www.datenpol.at/', 'depends': [ 'base', + 'report' ], 'data': [ - # 'security/ir.model.access.csv', - 'views/layouts.xml', - 'views/saleorder.xml', - 'views/invoice.xml', - 'views/delivery.xml', + 'data/paperformat.xml', + 'reports/layouts.xml', ], # only loaded in demonstration mode 'demo': [], diff --git a/ext/custom-addons/dp_reports/data/paperformat.xml b/ext/custom-addons/dp_reports/data/paperformat.xml new file mode 100644 index 00000000..f23cb430 --- /dev/null +++ b/ext/custom-addons/dp_reports/data/paperformat.xml @@ -0,0 +1,18 @@ + + + + European A4 + + A4 + 0 + 0 + Portrait + 55 + 20 + 10 + 10 + + 40 + 90 + + diff --git a/ext/custom-addons/dp_report/i18n/de.po b/ext/custom-addons/dp_reports/i18n/de.po similarity index 100% rename from ext/custom-addons/dp_report/i18n/de.po rename to ext/custom-addons/dp_reports/i18n/de.po diff --git a/ext/custom-addons/dp_report/models/__init__.py b/ext/custom-addons/dp_reports/models/__init__.py similarity index 52% rename from ext/custom-addons/dp_report/models/__init__.py rename to ext/custom-addons/dp_reports/models/__init__.py index 40a96afc..8daea8e4 100644 --- a/ext/custom-addons/dp_report/models/__init__.py +++ b/ext/custom-addons/dp_reports/models/__init__.py @@ -1 +1,3 @@ # -*- coding: utf-8 -*- + +import report_helper diff --git a/ext/custom-addons/dp_reports/models/report_helper.py b/ext/custom-addons/dp_reports/models/report_helper.py new file mode 100644 index 00000000..2a1d04d5 --- /dev/null +++ b/ext/custom-addons/dp_reports/models/report_helper.py @@ -0,0 +1,51 @@ +from odoo import api, models +from odoo.report import report_sxw + + +class ReportHelper(report_sxw.rml_parse): + + def __init__(self, cr, uid, name, context): + super(ReportHelper, self).__init__(cr, uid, name, context=context) + self.localcontext.update({ + 'field_set_in_lines': self._field_set_in_lines, + 'formatLang': self._formatLang, + }) + + @api.model + def _field_set_in_lines(self, lines, field): + fields = field.split('.') + for line in lines: + temp = None + for idx, field in enumerate(fields): + if not temp and idx == 0: + temp = line.__getattribute__(field) + elif not temp and idx != 0: + return False + else: + temp = temp.__getattribute__(field) + if not temp: + return False + return True + + @api.model + def _formatLang(self, value, currency=True): + lang = self.partner_id.lang + lang_objs = self.env['res.lang'].search([('code', '=', lang)]) + if not lang_objs: + lang_objs = self.env['res.lang'].search([], limit=1) + lang_obj = lang_objs[0] + + res = lang_obj.format('%.' + str(2) + 'f', value, grouping=True, monetary=True) + currency_obj = self.currency_id + + if currency_obj and currency_obj.symbol and currency: + if currency_obj.position == 'after': + res = '%s %s' % (res, currency_obj.symbol) + elif currency_obj and currency_obj.position == 'before': + res = '%s %s' % (currency_obj.symbol, res) + return res + + +class AbstractReport(models.AbstractModel): + _inherit = 'report.abstract_report' + _wrapped_report_class = ReportHelper diff --git a/ext/custom-addons/dp_reports/reports/layouts.xml b/ext/custom-addons/dp_reports/reports/layouts.xml new file mode 100644 index 00000000..3b63e420 --- /dev/null +++ b/ext/custom-addons/dp_reports/reports/layouts.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + diff --git a/ext/custom-addons/dp_report/security/ir.model.access.csv b/ext/custom-addons/dp_reports/security/ir.model.access.csv similarity index 100% rename from ext/custom-addons/dp_report/security/ir.model.access.csv rename to ext/custom-addons/dp_reports/security/ir.model.access.csv diff --git a/ext/custom-addons/dp_reports/static/src/less/report_backend.less b/ext/custom-addons/dp_reports/static/src/less/report_backend.less new file mode 100644 index 00000000..f9ba1431 --- /dev/null +++ b/ext/custom-addons/dp_reports/static/src/less/report_backend.less @@ -0,0 +1,7 @@ +.bold { + font-weight: bold; +} + +td.noborder, td.noborder{ + border: 0; +} diff --git a/ext/custom-addons/dp_reports_account/__init__.py b/ext/custom-addons/dp_reports_account/__init__.py new file mode 100644 index 00000000..cde864ba --- /dev/null +++ b/ext/custom-addons/dp_reports_account/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models diff --git a/ext/custom-addons/dp_reports_account/__manifest__.py b/ext/custom-addons/dp_reports_account/__manifest__.py new file mode 100644 index 00000000..e4e94fe5 --- /dev/null +++ b/ext/custom-addons/dp_reports_account/__manifest__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +# noinspection PyStatementEffect +{ + 'name': 'datepol Report-Anpassungen', + 'category': 'Custom', + 'version': '1.0', + 'summary': """Individuelle Report Anpassungen""", + 'description': """Individuelle Report Anpassungen""", + 'author': 'datenpol gmbh', + 'website': 'http://www.datenpol.at/', + 'depends': [ + 'dp_reports', + 'account' + ], + 'data': [ + 'reports/invoice.xml', + ], + # only loaded in demonstration mode + 'demo': [], + 'installable': True, + 'auto_install': False, +} diff --git a/ext/custom-addons/dp_reports_account/i18n/de.po b/ext/custom-addons/dp_reports_account/i18n/de.po new file mode 100644 index 00000000..6762beec --- /dev/null +++ b/ext/custom-addons/dp_reports_account/i18n/de.po @@ -0,0 +1,19 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * dp_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-10-12 09:17+0000\n" +"PO-Revision-Date: 2016-10-13 11:58+0000\n" +"Last-Translator: datenpol\n" +"Language-Team: German (http://www.transifex.com/odoo/odoo-9/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + + diff --git a/ext/custom-addons/dp_reports_account/models/__init__.py b/ext/custom-addons/dp_reports_account/models/__init__.py new file mode 100644 index 00000000..cbe7df63 --- /dev/null +++ b/ext/custom-addons/dp_reports_account/models/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- + + +import report_helper diff --git a/ext/custom-addons/dp_reports_account/models/report_helper.py b/ext/custom-addons/dp_reports_account/models/report_helper.py new file mode 100644 index 00000000..ca41a24a --- /dev/null +++ b/ext/custom-addons/dp_reports_account/models/report_helper.py @@ -0,0 +1,10 @@ + + +from odoo import api, models + + +class AccountInvoice(models.AbstractModel): + _name = 'report.account.report_invoice' + _inherit = 'report.abstract_report' + _template = 'account.report_invoice' + diff --git a/ext/custom-addons/dp_reports_account/reports/invoice.xml b/ext/custom-addons/dp_reports_account/reports/invoice.xml new file mode 100644 index 00000000..8084a739 --- /dev/null +++ b/ext/custom-addons/dp_reports_account/reports/invoice.xml @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + diff --git a/ext/custom-addons/dp_reports_account/security/ir.model.access.csv b/ext/custom-addons/dp_reports_account/security/ir.model.access.csv new file mode 100644 index 00000000..0343f29f --- /dev/null +++ b/ext/custom-addons/dp_reports_account/security/ir.model.access.csv @@ -0,0 +1 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" diff --git a/ext/custom-addons/dp_reports_purchase/__init__.py b/ext/custom-addons/dp_reports_purchase/__init__.py new file mode 100644 index 00000000..cde864ba --- /dev/null +++ b/ext/custom-addons/dp_reports_purchase/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models diff --git a/ext/custom-addons/dp_reports_purchase/__manifest__.py b/ext/custom-addons/dp_reports_purchase/__manifest__.py new file mode 100644 index 00000000..5fb0eadd --- /dev/null +++ b/ext/custom-addons/dp_reports_purchase/__manifest__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + +# noinspection PyStatementEffect +{ + 'name': 'datepol Report-Anpassungen', + 'category': 'Custom', + 'version': '1.0', + 'summary': """Individuelle Report Anpassungen""", + 'description': """Individuelle Report Anpassungen""", + 'author': 'datenpol gmbh', + 'website': 'http://www.datenpol.at/', + 'depends': [ + 'dp_reports', + 'purchase' + ], + 'data': [ + 'reports/purchase.xml', + 'reports/purchasequotation.xml', + ], + # only loaded in demonstration mode + 'demo': [], + 'installable': True, + 'auto_install': False, +} diff --git a/ext/custom-addons/dp_reports_purchase/i18n/de.po b/ext/custom-addons/dp_reports_purchase/i18n/de.po new file mode 100644 index 00000000..6762beec --- /dev/null +++ b/ext/custom-addons/dp_reports_purchase/i18n/de.po @@ -0,0 +1,19 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * dp_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-10-12 09:17+0000\n" +"PO-Revision-Date: 2016-10-13 11:58+0000\n" +"Last-Translator: datenpol\n" +"Language-Team: German (http://www.transifex.com/odoo/odoo-9/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + + diff --git a/ext/custom-addons/dp_reports_purchase/models/__init__.py b/ext/custom-addons/dp_reports_purchase/models/__init__.py new file mode 100644 index 00000000..8daea8e4 --- /dev/null +++ b/ext/custom-addons/dp_reports_purchase/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +import report_helper diff --git a/ext/custom-addons/dp_reports_purchase/models/report_helper.py b/ext/custom-addons/dp_reports_purchase/models/report_helper.py new file mode 100644 index 00000000..bfa5b3b8 --- /dev/null +++ b/ext/custom-addons/dp_reports_purchase/models/report_helper.py @@ -0,0 +1,16 @@ + + +from odoo import api, models + + +class PurchaseQuotation(models.AbstractModel): + _name = 'report.purchase.report_purchasequotation' + _inherit = 'report.abstract_report' + _template = 'purchase.report_purchasequotation' + + +class PurchaseOrder(models.AbstractModel): + _name = 'report.purchase.report_purchaseorder' + _inherit = 'report.abstract_report' + _template = 'purchase.report_purchaseorder' + diff --git a/ext/custom-addons/dp_reports_purchase/reports/purchase.xml b/ext/custom-addons/dp_reports_purchase/reports/purchase.xml new file mode 100644 index 00000000..8aa971d0 --- /dev/null +++ b/ext/custom-addons/dp_reports_purchase/reports/purchase.xml @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + diff --git a/ext/custom-addons/dp_reports_purchase/reports/purchasequotation.xml b/ext/custom-addons/dp_reports_purchase/reports/purchasequotation.xml new file mode 100644 index 00000000..527b7684 --- /dev/null +++ b/ext/custom-addons/dp_reports_purchase/reports/purchasequotation.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + diff --git a/ext/custom-addons/dp_reports_purchase/security/ir.model.access.csv b/ext/custom-addons/dp_reports_purchase/security/ir.model.access.csv new file mode 100644 index 00000000..0343f29f --- /dev/null +++ b/ext/custom-addons/dp_reports_purchase/security/ir.model.access.csv @@ -0,0 +1 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" diff --git a/ext/custom-addons/dp_reports_sale/__init__.py b/ext/custom-addons/dp_reports_sale/__init__.py new file mode 100644 index 00000000..cde864ba --- /dev/null +++ b/ext/custom-addons/dp_reports_sale/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models diff --git a/ext/custom-addons/dp_reports_sale/__manifest__.py b/ext/custom-addons/dp_reports_sale/__manifest__.py new file mode 100644 index 00000000..2a1a8046 --- /dev/null +++ b/ext/custom-addons/dp_reports_sale/__manifest__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +# noinspection PyStatementEffect +{ + 'name': 'datepol Report-Anpassungen', + 'category': 'Custom', + 'version': '1.0', + 'summary': """Individuelle Report Anpassungen""", + 'description': """Individuelle Report Anpassungen""", + 'author': 'datenpol gmbh', + 'website': 'http://www.datenpol.at/', + 'depends': [ + 'dp_reports', + 'sale' + ], + 'data': [ + 'reports/sale.xml', + ], + # only loaded in demonstration mode + 'demo': [], + 'installable': True, + 'auto_install': False, +} diff --git a/ext/custom-addons/dp_reports_sale/i18n/de.po b/ext/custom-addons/dp_reports_sale/i18n/de.po new file mode 100644 index 00000000..6762beec --- /dev/null +++ b/ext/custom-addons/dp_reports_sale/i18n/de.po @@ -0,0 +1,19 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * dp_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-10-12 09:17+0000\n" +"PO-Revision-Date: 2016-10-13 11:58+0000\n" +"Last-Translator: datenpol\n" +"Language-Team: German (http://www.transifex.com/odoo/odoo-9/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + + diff --git a/ext/custom-addons/dp_reports_sale/models/__init__.py b/ext/custom-addons/dp_reports_sale/models/__init__.py new file mode 100644 index 00000000..8daea8e4 --- /dev/null +++ b/ext/custom-addons/dp_reports_sale/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +import report_helper diff --git a/ext/custom-addons/dp_reports_sale/models/report_helper.py b/ext/custom-addons/dp_reports_sale/models/report_helper.py new file mode 100644 index 00000000..2d09a4d8 --- /dev/null +++ b/ext/custom-addons/dp_reports_sale/models/report_helper.py @@ -0,0 +1,10 @@ + + +from odoo import api, models + + +class SaleOrder(models.AbstractModel): + _name = 'report.sale.report_saleorder' + _inherit = 'report.abstract_report' + _template = 'sale.report_saleorder' + diff --git a/ext/custom-addons/dp_reports_sale/reports/sale.xml b/ext/custom-addons/dp_reports_sale/reports/sale.xml new file mode 100644 index 00000000..c9f2d1b3 --- /dev/null +++ b/ext/custom-addons/dp_reports_sale/reports/sale.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + diff --git a/ext/custom-addons/dp_reports_sale/security/ir.model.access.csv b/ext/custom-addons/dp_reports_sale/security/ir.model.access.csv new file mode 100644 index 00000000..0343f29f --- /dev/null +++ b/ext/custom-addons/dp_reports_sale/security/ir.model.access.csv @@ -0,0 +1 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" diff --git a/ext/custom-addons/dp_reports_stock/__init__.py b/ext/custom-addons/dp_reports_stock/__init__.py new file mode 100644 index 00000000..cde864ba --- /dev/null +++ b/ext/custom-addons/dp_reports_stock/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models diff --git a/ext/custom-addons/dp_reports_stock/__manifest__.py b/ext/custom-addons/dp_reports_stock/__manifest__.py new file mode 100644 index 00000000..996fc886 --- /dev/null +++ b/ext/custom-addons/dp_reports_stock/__manifest__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +# noinspection PyStatementEffect +{ + 'name': 'datepol Report-Anpassungen', + 'category': 'Custom', + 'version': '1.0', + 'summary': """Individuelle Report Anpassungen""", + 'description': """Individuelle Report Anpassungen""", + 'author': 'datenpol gmbh', + 'website': 'http://www.datenpol.at/', + 'depends': [ + 'dp_reports', + 'stock' + ], + 'data': [ + 'reports/stock.xml', + ], + # only loaded in demonstration mode + 'demo': [], + 'installable': True, + 'auto_install': False, +} diff --git a/ext/custom-addons/dp_reports_stock/i18n/de.po b/ext/custom-addons/dp_reports_stock/i18n/de.po new file mode 100644 index 00000000..6762beec --- /dev/null +++ b/ext/custom-addons/dp_reports_stock/i18n/de.po @@ -0,0 +1,19 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * dp_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-10-12 09:17+0000\n" +"PO-Revision-Date: 2016-10-13 11:58+0000\n" +"Last-Translator: datenpol\n" +"Language-Team: German (http://www.transifex.com/odoo/odoo-9/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + + diff --git a/ext/custom-addons/dp_reports_stock/models/__init__.py b/ext/custom-addons/dp_reports_stock/models/__init__.py new file mode 100644 index 00000000..8daea8e4 --- /dev/null +++ b/ext/custom-addons/dp_reports_stock/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +import report_helper diff --git a/ext/custom-addons/dp_reports_stock/models/report_helper.py b/ext/custom-addons/dp_reports_stock/models/report_helper.py new file mode 100644 index 00000000..229bbdb5 --- /dev/null +++ b/ext/custom-addons/dp_reports_stock/models/report_helper.py @@ -0,0 +1,10 @@ + + +from odoo import api, models + + +class StockPicking(models.AbstractModel): + _name = 'report.stock.report_deliveryslip' + _inherit = 'report.abstract_report' + _template = 'stock.report_deliveryslip' + diff --git a/ext/custom-addons/dp_reports_stock/reports/stock.xml b/ext/custom-addons/dp_reports_stock/reports/stock.xml new file mode 100644 index 00000000..f26795c9 --- /dev/null +++ b/ext/custom-addons/dp_reports_stock/reports/stock.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + diff --git a/ext/custom-addons/dp_reports_stock/security/ir.model.access.csv b/ext/custom-addons/dp_reports_stock/security/ir.model.access.csv new file mode 100644 index 00000000..0343f29f --- /dev/null +++ b/ext/custom-addons/dp_reports_stock/security/ir.model.access.csv @@ -0,0 +1 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" diff --git a/setup/lib/cli.py b/setup/lib/cli.py index e052eca8..59591da0 100755 --- a/setup/lib/cli.py +++ b/setup/lib/cli.py @@ -205,6 +205,12 @@ def main(): 'invalidate_email', ] + if cmd == 'remove_standard_translations': + methods = [ + 'login', + 'remove_standard_translations' + ] + if not methods: print 'Unbekanntes Kommando' _usage() diff --git a/setup/lib/functions.py b/setup/lib/functions.py index b2658bf2..22504e09 100644 --- a/setup/lib/functions.py +++ b/setup/lib/functions.py @@ -950,3 +950,20 @@ class DatenpolFunctions(): planner_ids = self._execute('web.planner', 'search', []) return self._execute('web.planner', 'write', planner_ids, {'active': False}) + + def remove_standard_translations(self): + """entferne standard odoo ueberseztungen""" + + res_ids = [] + + res_ids += self._execute('ir.translation', 'search', + [('name', '=', 'stock.location,name'), + ('src', '=', 'Stock'), + ('value', '=', 'Lager')]) + + res = True + if res_ids: + res = self._execute('ir.translation', 'unlink', res_ids) + + return res +