Merge branch 'master' of ssh://gitlab.datenpol.at:122/odoo/dp-template
commit
c27a8723ab
|
|
@ -1,8 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# OpenERP, Open Source Management Solution
|
# datenpol gmbh
|
||||||
# Copyright (C) 20014-2016 Camadeus GmbH (<http://www.camadeus.at>).
|
# Copyright (C) 2013-TODAY datenpol gmbh (<http://www.datenpol.at/>)
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Affero General Public License as
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
|
@ -22,4 +22,3 @@
|
||||||
import models
|
import models
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# datenpol gmbh
|
# datenpol gmbh
|
||||||
# Copyright (C) 2013-TODAY datenpol gmbh(<http://www.datenpol.at>)
|
# Copyright (C) 2013-TODAY datenpol gmbh (<http://www.datenpol.at/>)
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Affero General Public License as
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
|
@ -26,11 +26,13 @@
|
||||||
'version': '1.0',
|
'version': '1.0',
|
||||||
'description': """Individuelle Anpassungen""",
|
'description': """Individuelle Anpassungen""",
|
||||||
'author': 'datenpol gmbh',
|
'author': 'datenpol gmbh',
|
||||||
'website': 'http://www.datenpol.at',
|
'website': 'http://www.datenpol.at/',
|
||||||
'depends': ['base'],
|
'depends': [
|
||||||
|
'base',
|
||||||
|
],
|
||||||
'data': [
|
'data': [
|
||||||
'data/dp_custom_data.xml',
|
'data/dp_custom_data.xml',
|
||||||
'views/dp_custom_view.xml',
|
'views/dp_custom_views.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
],
|
],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
|
|
@ -1,127 +1,122 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<openerp>
|
<openerp>
|
||||||
<data noupdate="0">
|
<data noupdate="0">
|
||||||
|
<!-- UNITS -->
|
||||||
|
|
||||||
|
<!-- Einheit in Stück umbenennen -->
|
||||||
|
<record id="product.product_uom_unit" model="product.uom">
|
||||||
|
<field name="name">Stück</field>
|
||||||
|
</record>
|
||||||
|
<!-- 100 Stk. -->
|
||||||
|
<record id="product_uom_unit_100" model="product.uom">
|
||||||
|
<field name="category_id" ref="product.product_uom_categ_unit"/>
|
||||||
|
<field name="name">100 Stk.</field>
|
||||||
|
<field name="factor_inv" eval="100"/>
|
||||||
|
<field name="uom_type">bigger</field>
|
||||||
|
</record>
|
||||||
|
<!-- 1000 Stk. -->
|
||||||
|
<record id="product_uom_unit_1000" model="product.uom">
|
||||||
|
<field name="category_id" ref="product.product_uom_categ_unit"/>
|
||||||
|
<field name="name">1000 Stk.</field>
|
||||||
|
<field name="factor_inv" eval="1000"/>
|
||||||
|
<field name="uom_type">bigger</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Rolle -->
|
||||||
|
<record id="product_uom_rolle" model="product.uom">
|
||||||
|
<field name="category_id" ref="product.product_uom_categ_unit"/>
|
||||||
|
<field name="name">Rolle(n)</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Satz -->
|
||||||
|
<record id="product_uom_satz" model="product.uom">
|
||||||
|
<field name="category_id" ref="product.product_uom_categ_unit"/>
|
||||||
|
<field name="name">Satz</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Arbeitstag -->
|
||||||
|
<record id="product_uom_arbeitstag" model="product.uom">
|
||||||
|
<field name="category_id" ref="product.uom_categ_wtime"/>
|
||||||
|
<field name="name">Arbeitstag</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<!-- UNITS -->
|
<!-- MM -->
|
||||||
|
<record id="product_uom_mm" model="product.uom">
|
||||||
|
<field name="category_id" ref="product.uom_categ_length"/>
|
||||||
|
<field name="name">mm</field>
|
||||||
|
<field name="factor" eval="0.001"/>
|
||||||
|
<field name="uom_type">smaller</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<!-- Einheit in Stück umbenennen -->
|
<!-- M2 Quadratmeter Category-->
|
||||||
<record id="product.product_uom_unit" model="product.uom">
|
<record id="uom_categ_m2" model="product.uom.categ">
|
||||||
<field name="name">Stück</field>
|
<field name="name">Quadratm.</field>
|
||||||
</record>
|
</record>
|
||||||
<!-- 100 Stk. -->
|
<!-- M2, Quadratmeter -->
|
||||||
<record id="product_uom_unit_100" model="product.uom">
|
<record id="product_uom_m2" model="product.uom">
|
||||||
<field name="category_id" ref="product.product_uom_categ_unit"/>
|
<field name="name">m²</field>
|
||||||
<field name="name">100 Stk.</field>
|
<field name="category_id" ref="uom_categ_m2"/>
|
||||||
<field name="factor_inv" eval="100"/>
|
<field name="factor" eval="1.0"/>
|
||||||
<field name="uom_type">bigger</field>
|
<field name="rounding" eval="1"/>
|
||||||
</record>
|
</record>
|
||||||
<!-- 1000 Stk. -->
|
|
||||||
<record id="product_uom_unit_1000" model="product.uom">
|
|
||||||
<field name="category_id" ref="product.product_uom_categ_unit"/>
|
|
||||||
<field name="name">1000 Stk.</field>
|
|
||||||
<field name="factor_inv" eval="1000"/>
|
|
||||||
<field name="uom_type">bigger</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Rolle -->
|
<!-- M3 Quadratmeter Category-->
|
||||||
<record id="product_uom_rolle" model="product.uom">
|
<record id="uom_categ_m3" model="product.uom.categ">
|
||||||
<field name="category_id" ref="product.product_uom_categ_unit"/>
|
<field name="name">Kubikm.</field>
|
||||||
<field name="name">Rolle(n)</field>
|
</record>
|
||||||
</record>
|
<!-- M3, Kubikmeter -->
|
||||||
|
<record id="product_uom_m3" model="product.uom">
|
||||||
|
<field name="name">Kubikm.</field>
|
||||||
|
<field name="category_id" ref="uom_categ_m3"/>
|
||||||
|
<field name="factor" eval="1.0"/>
|
||||||
|
<field name="rounding" eval="1"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
<!-- Satz -->
|
<!-- PKG -->
|
||||||
<record id="product_uom_satz" model="product.uom">
|
<record id="product_uom_pkt" model="product.uom">
|
||||||
<field name="category_id" ref="product.product_uom_categ_unit"/>
|
<field name="name">Paket(e)</field>
|
||||||
<field name="name">Satz</field>
|
<field name="category_id" ref="product.product_uom_categ_unit"/>
|
||||||
</record>
|
<field name="factor" eval="1.0"/>
|
||||||
|
<field name="rounding" eval="1"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
<!-- Arbeitstag -->
|
<!-- Paar -->
|
||||||
<record id="product_uom_arbeitstag" model="product.uom">
|
<record id="product_uom_paar" model="product.uom">
|
||||||
<field name="category_id" ref="product.uom_categ_wtime"/>
|
<field name="name">Paar(e)</field>
|
||||||
<field name="name">Arbeitstag</field>
|
<field name="category_id" ref="product.product_uom_categ_unit"/>
|
||||||
</record>
|
<field name="factor" eval="1.0"/>
|
||||||
|
<field name="rounding" eval="1"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Minuten -->
|
||||||
|
<record id="product_uom_min" model="product.uom">
|
||||||
|
<field name="category_id" ref="product.uom_categ_wtime"/>
|
||||||
|
<field name="name">min</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<!-- MM -->
|
<!-- Variantenattribut Größe -->
|
||||||
<record id="product_uom_mm" model="product.uom">
|
<record id="prod_attr_size" model="product.attribute">
|
||||||
<field name="category_id" ref="product.uom_categ_length"/>
|
<field name="name">Größe</field>
|
||||||
<field name="name">mm</field>
|
<field name="type">radio</field>
|
||||||
<field name="factor" eval="0.001"/>
|
<field name="sequence" eval="10"/>
|
||||||
<field name="uom_type">smaller</field>
|
</record>
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- M2 Quadratmeter Category-->
|
|
||||||
<record id="uom_categ_m2" model="product.uom.categ">
|
|
||||||
<field name="name">Quadratm.</field>
|
|
||||||
</record>
|
|
||||||
<!-- M2, Quadratmeter -->
|
|
||||||
<record id="product_uom_m2" model="product.uom">
|
|
||||||
<field name="name">m²</field>
|
|
||||||
<field name="category_id" ref="uom_categ_m2"/>
|
|
||||||
<field name="factor" eval="1.0"/>
|
|
||||||
<field name="rounding" eval="1"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- M3 Quadratmeter Category-->
|
|
||||||
<record id="uom_categ_m3" model="product.uom.categ">
|
|
||||||
<field name="name">Kubikm.</field>
|
|
||||||
</record>
|
|
||||||
<!-- M3, Kubikmeter -->
|
|
||||||
<record id="product_uom_m3" model="product.uom">
|
|
||||||
<field name="name">Kubikm.</field>
|
|
||||||
<field name="category_id" ref="uom_categ_m3"/>
|
|
||||||
<field name="factor" eval="1.0"/>
|
|
||||||
<field name="rounding" eval="1"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- PKG -->
|
|
||||||
<record id="product_uom_pkt" model="product.uom">
|
|
||||||
<field name="name">Paket(e)</field>
|
|
||||||
<field name="category_id" ref="product.product_uom_categ_unit"/>
|
|
||||||
<field name="factor" eval="1.0"/>
|
|
||||||
<field name="rounding" eval="1"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Paar -->
|
|
||||||
<record id="product_uom_paar" model="product.uom">
|
|
||||||
<field name="name">Paar(e)</field>
|
|
||||||
<field name="category_id" ref="product.product_uom_categ_unit"/>
|
|
||||||
<field name="factor" eval="1.0"/>
|
|
||||||
<field name="rounding" eval="1"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Minuten -->
|
|
||||||
<record id="product_uom_min" model="product.uom">
|
|
||||||
<field name="category_id" ref="product.uom_categ_wtime"/>
|
|
||||||
<field name="name">min</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Variantenattribut Größe -->
|
<!-- Verpackungseiheiten -->
|
||||||
<record id="prod_attr_size" model="product.attribute">
|
<!-- TODO Rolle type in product_ul selection ergänzen -->
|
||||||
<field name="name">Größe</field>
|
<!-- Ausprägungen hier...? -->
|
||||||
<field name="type">radio</field>
|
<!-- <record id="product_ul_box" model="product.ul">
|
||||||
<field name="sequence" eval="10"/>
|
<field name="name">Box</field>
|
||||||
</record>
|
<field name="type">box</field>
|
||||||
|
</record> -->
|
||||||
|
<!--
|
||||||
<!-- Verpackungseiheiten -->
|
'name' : fields.char('Name', select=True, required=True, translate=True),
|
||||||
<!-- TODO Rolle type in product_ul selection ergänzen -->
|
'type' : fields.selection([('unit','Unit'),('pack','Pack'),('box', 'Box'), ('pallet', 'Pallet')], 'Type', required=True),
|
||||||
<!-- Ausprägungen hier...? -->
|
'height': fields.float('Height', help='The height of the package'),
|
||||||
<!-- <record id="product_ul_box" model="product.ul">
|
'width': fields.float('Width', help='The width of the package'),
|
||||||
<field name="name">Box</field>
|
'length': fields.float('Length', help='The length of the package'),
|
||||||
<field name="type">box</field>
|
'weight': fields.float('Empty Package Weight'), -->
|
||||||
</record> -->
|
</data>
|
||||||
<!--
|
|
||||||
'name' : fields.char('Name', select=True, required=True, translate=True),
|
|
||||||
'type' : fields.selection([('unit','Unit'),('pack','Pack'),('box', 'Box'), ('pallet', 'Pallet')], 'Type', required=True),
|
|
||||||
'height': fields.float('Height', help='The height of the package'),
|
|
||||||
'width': fields.float('Width', help='The width of the package'),
|
|
||||||
'length': fields.float('Length', help='The length of the package'),
|
|
||||||
'weight': fields.float('Empty Package Weight'), -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# datenpol gmbh
|
# datenpol gmbh
|
||||||
# Copyright (C) 2013-TODAY datenpol gmbh(<http://www.datenpol.at>)
|
# Copyright (C) 2013-TODAY datenpol gmbh (<http://www.datenpol.at/>)
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Affero General Public License as
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
|
@ -24,7 +24,6 @@ from openerp import api
|
||||||
from openerp.tools.translate import _
|
from openerp.tools.translate import _
|
||||||
from openerp import SUPERUSER_ID
|
from openerp import SUPERUSER_ID
|
||||||
from openerp import tools
|
from openerp import tools
|
||||||
from lxml import etree
|
|
||||||
|
|
||||||
DISABLED_MENUS = [
|
DISABLED_MENUS = [
|
||||||
]
|
]
|
||||||
|
|
@ -38,16 +37,16 @@ class ir_ui_menu(models.Model):
|
||||||
|
|
||||||
menu_ids = []
|
menu_ids = []
|
||||||
for menu in DISABLED_MENUS:
|
for menu in DISABLED_MENUS:
|
||||||
module,xml_id = menu.split('.')
|
module, xml_id = menu.split('.')
|
||||||
menu = data_obj.get_object(cr, uid, module, xml_id)
|
menu = data_obj.get_object(cr, uid, module, xml_id)
|
||||||
if menu:
|
if menu:
|
||||||
menu_ids.append(menu.id)
|
menu_ids.append(menu.id)
|
||||||
|
|
||||||
return menu_ids
|
return menu_ids
|
||||||
|
|
||||||
def _filter_visible_menus(self, cr, uid, ids, context=None):
|
def _filter_visible_menus(self, cr, uid, ids, context=None):
|
||||||
if uid != 1:
|
if uid != 1:
|
||||||
disabled_ids = self.get_disabled_menu_ids(cr, uid)
|
disabled_ids = self.get_disabled_menu_ids(cr, uid)
|
||||||
|
|
||||||
ids = [id for id in ids if id not in disabled_ids]
|
ids = [id for id in ids if id not in disabled_ids]
|
||||||
|
|
||||||
ids = super(ir_ui_menu, self)._filter_visible_menus(cr, uid, ids, context)
|
ids = super(ir_ui_menu, self)._filter_visible_menus(cr, uid, ids, context)
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
|
</data>
|
||||||
</data>
|
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,14 +1,16 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'datepol Report Anpassungen',
|
'name': 'datepol Report-Anpassungen',
|
||||||
'category': 'Custom',
|
'category': 'Custom',
|
||||||
'version': '1.0',
|
'version': '1.0',
|
||||||
'summary': """Individuelle Report Anpassungen""",
|
'summary': """Individuelle Report Anpassungen""",
|
||||||
'description': """Individuelle Report Anpassungen""",
|
'description': """Individuelle Report Anpassungen""",
|
||||||
'author': 'datenpol gmbh',
|
'author': 'datenpol gmbh',
|
||||||
'website': 'http://www.datenpol.at',
|
'website': 'http://www.datenpol.at/',
|
||||||
'depends': ['base'],
|
'depends': [
|
||||||
|
'base',
|
||||||
|
],
|
||||||
'data': [
|
'data': [
|
||||||
# 'security/ir.model.access.csv',
|
# 'security/ir.model.access.csv',
|
||||||
'views/layouts.xml',
|
'views/layouts.xml',
|
||||||
|
|
@ -1,75 +1,77 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
<!-- Delivery Body -->
|
<!-- Delivery Body -->
|
||||||
<template id="report_delivery_document" inherit_id="delivery.report_delivery_document2">
|
<template id="report_delivery_document" inherit_id="delivery.report_delivery_document2">
|
||||||
<h2 position="replace">
|
<h2 position="replace">
|
||||||
<h2>
|
<h2>
|
||||||
LIEFERSCHEIN <span t-field="o.name"/>
|
LIEFERSCHEIN <span t-field="o.name"/>
|
||||||
</h2>
|
|
||||||
</h2>
|
</h2>
|
||||||
<table class="table table-condensed" position="replace">
|
</h2>
|
||||||
<table class="table table-condensed">
|
<table class="table table-condensed" position="replace">
|
||||||
<thead>
|
<table class="table table-condensed">
|
||||||
<tr>
|
<thead>
|
||||||
<th name="td_sched_date_h"><strong>Scheduled Date</strong></th>
|
<tr>
|
||||||
<th><strong>Weight</strong></th>
|
<th name="td_sched_date_h"><strong>Scheduled Date</strong></th>
|
||||||
</tr>
|
<th><strong>Weight</strong></th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody>
|
</thead>
|
||||||
<tr>
|
<tbody>
|
||||||
<td name="td_sched_date">
|
<tr>
|
||||||
<span t-field="o.min_date"/>
|
<td name="td_sched_date">
|
||||||
</td>
|
<span t-field="o.min_date"/>
|
||||||
<td>
|
</td>
|
||||||
<span t-field="o.weight"/> kg
|
<td>
|
||||||
</td>
|
<span t-field="o.weight"/> kg
|
||||||
</tr>
|
</td>
|
||||||
</tbody>
|
</tr>
|
||||||
</table>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<xpath expr="//table[@t-if='not o.pack_operation_ids']/thead" position="replace">
|
</table>
|
||||||
<thead>
|
<xpath expr="//table[@t-if='not o.pack_operation_ids']/thead" position="replace">
|
||||||
<tr>
|
<thead>
|
||||||
<th><strong>Product</strong></th>
|
<tr>
|
||||||
<th><strong>Location</strong></th>
|
<th><strong>Product</strong></th>
|
||||||
<th class="text-right"><strong>Quantity</strong></th>
|
<th><strong>Location</strong></th>
|
||||||
</tr>
|
<th class="text-right"><strong>Quantity</strong></th>
|
||||||
</thead>
|
</tr>
|
||||||
</xpath>
|
</thead>
|
||||||
<xpath expr="//table[@t-if='not o.pack_operation_ids']/tbody/tr/td/span[@t-field='move.state']" position="replace"/>
|
</xpath>
|
||||||
<xpath expr="//table[@t-if='o.pack_operation_ids']/thead" position="replace">
|
<xpath expr="//table[@t-if='not o.pack_operation_ids']/tbody/tr/td/span[@t-field='move.state']" position="replace"/>
|
||||||
<thead>
|
<xpath expr="//table[@t-if='o.pack_operation_ids']/thead" position="replace">
|
||||||
<tr>
|
<thead>
|
||||||
<th><strong>Product</strong></th>
|
<tr>
|
||||||
<th t-if="has_serial_number"><strong>Serial Number</strong></th>
|
<th><strong>Product</strong></th>
|
||||||
<th><strong>Location</strong></th>
|
<th t-if="has_serial_number"><strong>Serial Number</strong></th>
|
||||||
<th class="text-right"><strong>Quantity</strong></th>
|
<th><strong>Location</strong></th>
|
||||||
</tr>
|
<th class="text-right"><strong>Quantity</strong></th>
|
||||||
</thead>
|
</tr>
|
||||||
</xpath>
|
</thead>
|
||||||
<xpath expr="//table[@t-if='o.pack_operation_ids']/tbody/tr/td[2]" position="replace"/>
|
</xpath>
|
||||||
</template>
|
<xpath expr="//table[@t-if='o.pack_operation_ids']/tbody/tr/td[2]" position="replace"/>
|
||||||
<!-- Render Report with Header -->
|
</template>
|
||||||
<template id="stock.report_deliveryslip">
|
|
||||||
<t t-set="header" t-value="1"/>
|
|
||||||
<t t-foreach="docs" t-as="o">
|
|
||||||
<t t-call="dp_report.report_delivery_document" t-lang="o.partner_id.lang"/>
|
|
||||||
</t>
|
|
||||||
</template>
|
|
||||||
<!-- Render Report without Header -->
|
|
||||||
<template id="report_deliveryslip_blank">
|
|
||||||
<t t-set="header" t-value="0"/>
|
|
||||||
<t t-foreach="docs" t-as="o">
|
|
||||||
<t t-call="dp_report.report_delivery_document" t-lang="o.partner_id.lang"/>
|
|
||||||
</t>
|
|
||||||
</template>
|
|
||||||
<!-- Create new Report -->
|
|
||||||
<report id="dp_report_deliveryslip_blank"
|
|
||||||
string="Lieferschein Ohne Logo"
|
|
||||||
model="stock.picking"
|
|
||||||
report_type="qweb-pdf"
|
|
||||||
name="dp_report.report_deliveryslip_blank"
|
|
||||||
file="dp_report.report_deliveryslip_blank"/>
|
|
||||||
|
|
||||||
</data>
|
<!-- Render Report with Header -->
|
||||||
|
<template id="stock.report_deliveryslip">
|
||||||
|
<t t-set="header" t-value="1"/>
|
||||||
|
<t t-foreach="docs" t-as="o">
|
||||||
|
<t t-call="dp_report.report_delivery_document" t-lang="o.partner_id.lang"/>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- Render Report without Header -->
|
||||||
|
<template id="report_deliveryslip_blank">
|
||||||
|
<t t-set="header" t-value="0"/>
|
||||||
|
<t t-foreach="docs" t-as="o">
|
||||||
|
<t t-call="dp_report.report_delivery_document" t-lang="o.partner_id.lang"/>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- Create new Report -->
|
||||||
|
<report id="dp_report_deliveryslip_blank"
|
||||||
|
string="Lieferschein Ohne Logo"
|
||||||
|
model="stock.picking"
|
||||||
|
report_type="qweb-pdf"
|
||||||
|
name="dp_report.report_deliveryslip_blank"
|
||||||
|
file="dp_report.report_deliveryslip_blank"/>
|
||||||
|
</data>
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
@ -1,65 +1,65 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
<!-- Invoice Body -->
|
<!-- Invoice Body -->
|
||||||
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
|
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
|
||||||
<th t-if="display_discount" position="replace">
|
<th t-if="display_discount" position="replace">
|
||||||
<th t-if="display_discount and o.sale_order_id.print_discount" class="text-right" groups="sale.group_discount_per_so_line">Disc.(%)</th>
|
<th t-if="display_discount and o.sale_order_id.print_discount" class="text-right" groups="sale.group_discount_per_so_line">Disc.(%)</th>
|
||||||
</th>
|
</th>
|
||||||
<td t-if="display_discount" position="replace">
|
<td t-if="display_discount" position="replace">
|
||||||
<td t-if="display_discount and o.sale_order_id.print_discount" class="text-right" groups="sale.group_discount_per_so_line">
|
<td t-if="display_discount and o.sale_order_id.print_discount" class="text-right" groups="sale.group_discount_per_so_line">
|
||||||
<span t-field="l.discount"/>
|
<span t-field="l.discount"/>
|
||||||
</td>
|
|
||||||
</td>
|
</td>
|
||||||
<div t-if="o.date_invoice" position="replace">
|
</td>
|
||||||
<div class="col-xs-2" t-if="o.date_invoice">
|
<div t-if="o.date_invoice" position="replace">
|
||||||
<strong>Invoice Date:</strong>
|
<div class="col-xs-2" t-if="o.date_invoice">
|
||||||
<p t-field="o.date_invoice"/>
|
<strong>Invoice Date:</strong>
|
||||||
</div>
|
<p t-field="o.date_invoice"/>
|
||||||
</div>
|
</div>
|
||||||
<div t-if="o.origin" position="replace">
|
</div>
|
||||||
<div class="col-xs-2" t-if="o.origin">
|
<div t-if="o.origin" position="replace">
|
||||||
<strong>Source:</strong>
|
<div class="col-xs-2" t-if="o.origin">
|
||||||
<p t-field="o.origin"/>
|
<strong>Source:</strong>
|
||||||
</div>
|
<p t-field="o.origin"/>
|
||||||
</div>
|
</div>
|
||||||
<div t-if="o.date_due and o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')" position="replace"/>
|
</div>
|
||||||
<xpath expr="//table[@class='table table-condensed']/thead/tr/th" position='replace'>
|
<div t-if="o.date_due and o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')" position="replace"/>
|
||||||
<th>Description</th>
|
<xpath expr="//table[@class='table table-condensed']/thead/tr/th" position='replace'>
|
||||||
</xpath>
|
<th>Description</th>
|
||||||
<div t-if="o.tax_line_ids" position="replace"/>
|
</xpath>
|
||||||
<p t-if="o.payment_term_id" position="replace">
|
<div t-if="o.tax_line_ids" position="replace"/>
|
||||||
<p t-if="o.payment_term_id">
|
<p t-if="o.payment_term_id" position="replace">
|
||||||
<strong><span t-field="o.payment_term_id.note"/></strong>
|
<p t-if="o.payment_term_id">
|
||||||
</p>
|
<strong><span t-field="o.payment_term_id.note"/></strong>
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</p>
|
||||||
<!-- Render Report with Header -->
|
</template>
|
||||||
<template id="account.report_invoice">
|
|
||||||
<t t-call="report.html_container">
|
|
||||||
<t t-set="header" t-value="1"/>
|
|
||||||
<t t-foreach="docs" t-as="o">
|
|
||||||
<t t-call="dp_report.report_invoice_document" t-lang="o.partner_id.lang">
|
|
||||||
</t>
|
|
||||||
</t>
|
|
||||||
</t>
|
|
||||||
</template>
|
|
||||||
<!-- Render Report without Header -->
|
|
||||||
<template id="report_invoice_blank">
|
|
||||||
<t t-call="report.html_container">
|
|
||||||
<t t-set="header" t-value="0"/>
|
|
||||||
<t t-foreach="docs" t-as="o">
|
|
||||||
<t t-call="dp_report.report_invoice_document" t-lang="o.partner_id.lang">
|
|
||||||
</t>
|
|
||||||
</t>
|
|
||||||
</t>
|
|
||||||
</template>
|
|
||||||
<!-- Create new Report -->
|
|
||||||
<report id="dp_report_invoice_blank"
|
|
||||||
string="Rechnung Ohne Logo"
|
|
||||||
model="account.invoice"
|
|
||||||
report_type="qweb-pdf"
|
|
||||||
name="dp_report.report_invoice_blank"
|
|
||||||
file="dp_report.report_invoice_blank"/>
|
|
||||||
|
|
||||||
</data>
|
<!-- Render Report with Header -->
|
||||||
|
<template id="account.report_invoice">
|
||||||
|
<t t-call="report.html_container">
|
||||||
|
<t t-set="header" t-value="1"/>
|
||||||
|
<t t-foreach="docs" t-as="o">
|
||||||
|
<t t-call="dp_report.report_invoice_document" t-lang="o.partner_id.lang"/>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- Render Report without Header -->
|
||||||
|
<template id="report_invoice_blank">
|
||||||
|
<t t-call="report.html_container">
|
||||||
|
<t t-set="header" t-value="0"/>
|
||||||
|
<t t-foreach="docs" t-as="o">
|
||||||
|
<t t-call="dp_report.report_invoice_document" t-lang="o.partner_id.lang"/>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- Create new Report -->
|
||||||
|
<report id="dp_report_invoice_blank"
|
||||||
|
string="Rechnung Ohne Logo"
|
||||||
|
model="account.invoice"
|
||||||
|
report_type="qweb-pdf"
|
||||||
|
name="dp_report.report_invoice_blank"
|
||||||
|
file="dp_report.report_invoice_blank"/>
|
||||||
|
</data>
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
@ -1,58 +1,58 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
<template id="report.external_layout">
|
<template id="report.external_layout">
|
||||||
<!-- Multicompany -->
|
<!-- Multicompany -->
|
||||||
<t t-if="not o and doc">
|
<t t-if="not o and doc">
|
||||||
<t t-set="o" t-value="doc"/>
|
<t t-set="o" t-value="doc"/>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="o and 'company_id' in o">
|
<t t-if="o and 'company_id' in o">
|
||||||
<t t-set="company" t-value="o.company_id"></t>
|
<t t-set="company" t-value="o.company_id"/>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="not o or not 'company_id' in o">
|
<t t-if="not o or not 'company_id' in o">
|
||||||
<t t-set="company" t-value="res_company"></t>
|
<t t-set="company" t-value="res_company"/>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="header == 1">
|
<t t-if="header == 1">
|
||||||
<t t-call="dp_report.external_layout_header" />
|
<t t-call="dp_report.external_layout_header"/>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="header == 0">
|
<t t-if="header == 0">
|
||||||
<t t-call="dp_report.external_layout_header_blank" />
|
<t t-call="dp_report.external_layout_header_blank"/>
|
||||||
</t>
|
</t>
|
||||||
<t t-raw="0" />
|
<t t-raw="0"/>
|
||||||
<t t-call="report.external_layout_footer" />
|
<t t-call="report.external_layout_footer"/>
|
||||||
<t t-esc="header"/>
|
<t t-esc="header"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Report Header Full -->
|
<!-- Report Header Full -->
|
||||||
<template id="external_layout_header">
|
<template id="external_layout_header">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-3" name="company_address">
|
<div class="col-xs-3" name="company_address">
|
||||||
<div t-field="company.partner_id"
|
<div t-field="company.partner_id"
|
||||||
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
|
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
|
||||||
style="border-bottom: 1px solid black;"/>
|
style="border-bottom: 1px solid black;"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-9 text-right">
|
<div class="col-xs-9 text-right">
|
||||||
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 105px;"/>
|
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 105px;"/>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- Report Header Blank -->
|
<!-- Report Header Blank -->
|
||||||
<template id="external_layout_header_blank">
|
<template id="external_layout_header_blank">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12" style="height: 45px;">
|
<div class="col-xs-12" style="height: 45px;">
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-3" name="company_address">
|
|
||||||
<div t-field="company.partner_id"
|
|
||||||
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
|
|
||||||
style="border-bottom: 1px solid black;"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
<div class="row">
|
||||||
</data>
|
<div class="col-xs-3" name="company_address">
|
||||||
|
<div t-field="company.partner_id"
|
||||||
|
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
|
||||||
|
style="border-bottom: 1px solid black;"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</data>
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
@ -1,85 +1,85 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
<!-- Sale Order Body -->
|
<!-- Sale Order Body -->
|
||||||
<template id="report_saleorder_document" inherit_id="sale.report_saleorder_document">
|
<template id="report_saleorder_document" inherit_id="sale.report_saleorder_document">
|
||||||
<th t-if="display_discount" position="replace">
|
<th t-if="display_discount" position="replace">
|
||||||
<th t-if="display_discount and doc.print_discount" class="text-right" groups="sale.group_discount_per_so_line">Disc.(%)</th>
|
<th t-if="display_discount and doc.print_discount" class="text-right" groups="sale.group_discount_per_so_line">Disc.(%)</th>
|
||||||
</th>
|
</th>
|
||||||
<td t-if="display_discount" position="replace">
|
<td t-if="display_discount" position="replace">
|
||||||
<td t-if="display_discount and doc.print_discount" class="text-right" groups="sale.group_discount_per_so_line">
|
<td t-if="display_discount and doc.print_discount" class="text-right" groups="sale.group_discount_per_so_line">
|
||||||
<span t-field="l.discount"/>
|
<span t-field="l.discount"/>
|
||||||
</td>
|
|
||||||
</td>
|
</td>
|
||||||
|
</td>
|
||||||
|
|
||||||
<xpath expr="//div[@class='page']/h2" position='replace'>
|
<xpath expr="//div[@class='page']/h2" position='replace'>
|
||||||
<h2>
|
<h2>
|
||||||
<span t-if="doc.state not in ['draft','sent']">Order # </span>
|
<span t-if="doc.state not in ['draft','sent']">Order # </span>
|
||||||
<span t-if="doc.state in ['draft','sent']">Quotation # </span>
|
<span t-if="doc.state in ['draft','sent']">Quotation # </span>
|
||||||
<span t-field="doc.name"/>
|
<span t-field="doc.name"/>
|
||||||
</h2>
|
</h2>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
<xpath expr="//div[@t-if='doc.user_id.name']" position='replace'/>
|
<xpath expr="//div[@t-if='doc.user_id.name']" position='replace'/>
|
||||||
<xpath expr="//div[@name='payment_term']" position='attributes'>
|
<xpath expr="//div[@name='payment_term']" position='attributes'>
|
||||||
<attribute name="style">display:none</attribute>
|
<attribute name="style">display:none</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<div name="total" position="replace">
|
<div name="total" position="replace">
|
||||||
<div class="row" name="total">
|
<div class="row" name="total">
|
||||||
<div class="col-xs-4 pull-right">
|
<div class="col-xs-4 pull-right">
|
||||||
<table class="table table-condensed">
|
<table class="table table-condensed">
|
||||||
<tr class="border-black">
|
<tr class="border-black">
|
||||||
<td><strong>Total Without Taxes</strong></td>
|
<td><strong>Total Without Taxes</strong></td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<span t-field="doc.amount_untaxed"
|
<span t-field="doc.amount_untaxed"
|
||||||
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
|
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Taxes</td>
|
<td>Taxes</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<span t-field="doc.amount_tax"
|
<span t-field="doc.amount_tax"
|
||||||
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
|
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="border-black">
|
<tr class="border-black">
|
||||||
<td><strong>Total</strong></td>
|
<td><strong>Total</strong></td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<span t-field="doc.amount_total"
|
<span t-field="doc.amount_total"
|
||||||
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
|
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</div>
|
||||||
<!-- Render Report with Header -->
|
</template>
|
||||||
<template id="sale.report_saleorder">
|
|
||||||
<t t-call="report.html_container">
|
|
||||||
<t t-set="header" t-value="1"/>
|
|
||||||
<t t-foreach="docs" t-as="doc">
|
|
||||||
<t t-call="dp_report.report_saleorder_document" t-lang="doc.partner_id.lang">
|
|
||||||
</t>
|
|
||||||
</t>
|
|
||||||
</t>
|
|
||||||
</template>
|
|
||||||
<!-- Render Report without Header -->
|
|
||||||
<template id="report_saleorder_blank">
|
|
||||||
<t t-call="report.html_container">
|
|
||||||
<t t-set="header" t-value="0"/>
|
|
||||||
<t t-foreach="docs" t-as="doc">
|
|
||||||
<t t-call="dp_report.report_saleorder_document" t-lang="doc.partner_id.lang">
|
|
||||||
</t>
|
|
||||||
</t>
|
|
||||||
</t>
|
|
||||||
</template>
|
|
||||||
<!-- Create new Report -->
|
|
||||||
<report id="dp_report_saleorder_blank"
|
|
||||||
string="Angebot / Bestellung Ohne Logo"
|
|
||||||
model="sale.order"
|
|
||||||
report_type="qweb-pdf"
|
|
||||||
name="dp_report.report_saleorder_blank"
|
|
||||||
file="dp_report.report_saleorder_blank"/>
|
|
||||||
|
|
||||||
</data>
|
<!-- Render Report with Header -->
|
||||||
|
<template id="sale.report_saleorder">
|
||||||
|
<t t-call="report.html_container">
|
||||||
|
<t t-set="header" t-value="1"/>
|
||||||
|
<t t-foreach="docs" t-as="doc">
|
||||||
|
<t t-call="dp_report.report_saleorder_document" t-lang="doc.partner_id.lang"/>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- Render Report without Header -->
|
||||||
|
<template id="report_saleorder_blank">
|
||||||
|
<t t-call="report.html_container">
|
||||||
|
<t t-set="header" t-value="0"/>
|
||||||
|
<t t-foreach="docs" t-as="doc">
|
||||||
|
<t t-call="dp_report.report_saleorder_document" t-lang="doc.partner_id.lang"/>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- Create new Report -->
|
||||||
|
<report id="dp_report_saleorder_blank"
|
||||||
|
string="Angebot / Bestellung Ohne Logo"
|
||||||
|
model="sale.order"
|
||||||
|
report_type="qweb-pdf"
|
||||||
|
name="dp_report.report_saleorder_blank"
|
||||||
|
file="dp_report.report_saleorder_blank"/>
|
||||||
|
</data>
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
@ -82,7 +82,6 @@ def main():
|
||||||
'login',
|
'login',
|
||||||
'install_module_sale',
|
'install_module_sale',
|
||||||
#'setup_accounting',
|
#'setup_accounting',
|
||||||
#'setup_accounting2',
|
|
||||||
'set_admin_rights',
|
'set_admin_rights',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -127,7 +126,9 @@ def main():
|
||||||
#'update_special_values',
|
#'update_special_values',
|
||||||
'set_sys_params',
|
'set_sys_params',
|
||||||
#'setup_reports',
|
#'setup_reports',
|
||||||
]
|
'consume_tours',
|
||||||
|
'disable_planners',
|
||||||
|
]
|
||||||
|
|
||||||
if cmd == 'setup':
|
if cmd == 'setup':
|
||||||
methods = setup_methods
|
methods = setup_methods
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ class Config():
|
||||||
'website': 'http://www.datenpol.at/',
|
'website': 'http://www.datenpol.at/',
|
||||||
'company_registry': '359270p',
|
'company_registry': '359270p',
|
||||||
'country_id': 'at', # 'de' für Deutschland
|
'country_id': 'at', # 'de' für Deutschland
|
||||||
'logo': False,
|
|
||||||
'vat': 'ATU 66309611',
|
'vat': 'ATU 66309611',
|
||||||
'rml_header1': False,
|
'rml_header1': False,
|
||||||
'vat_check_vies': True,
|
'vat_check_vies': True,
|
||||||
|
|
@ -84,13 +83,13 @@ class Config():
|
||||||
|
|
||||||
# Einstellungen Verkauf
|
# Einstellungen Verkauf
|
||||||
self.sale_config = {
|
self.sale_config = {
|
||||||
'group_sale_delivery_address': True, # Verschiedene Adressen für Rechnung und Lieferung
|
'group_sale_delivery_address': 0, # Verschiedene Adressen für Rechnung und Lieferung
|
||||||
'group_sale_pricelist': True, # Preislisten verwenden
|
'sale_pricelist_setting': 'fixed', # Verkaufspreis: [fixed], [percentage], [formula]
|
||||||
'group_discount_per_so_line': True, # Rabatte verwenden
|
'group_discount_per_so_line': 0, # Rabatt auf Verkaufszeilen
|
||||||
'group_uom': True, # Verwende Mengeneinheiten
|
'group_uom': 0, # Verwende Mengeneinheiten
|
||||||
'group_invoice_deli_orders': True, # Erstelle Rechnungen durch Auslieferungen
|
'default_invoice_policy': 'order' # Standardabrechnung: [order], [delivery]
|
||||||
}
|
}
|
||||||
self.order_policy = 'picking' # Erzeuge Rechnung: [manual], [picking],[prepaid]
|
self.order_policy = 'picking' # Erzeuge Rechnung: [manual], [picking], [prepaid]
|
||||||
|
|
||||||
# Einstellungen Einkauf
|
# Einstellungen Einkauf
|
||||||
self.purchase_config = {
|
self.purchase_config = {
|
||||||
|
|
@ -101,26 +100,27 @@ class Config():
|
||||||
'group_costing_method': True, # Benutzen Sie 'Einkaufs-' oder 'Durchschnittspreis' zur Bestandsbewertung
|
'group_costing_method': True, # Benutzen Sie 'Einkaufs-' oder 'Durchschnittspreis' zur Bestandsbewertung
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Einstellungen Finanzen
|
||||||
self.finance_config = {
|
self.finance_config = {
|
||||||
#'group_multi_currency':True
|
'group_multi_currency': False, # Multiwährungsfunktion aktivieren
|
||||||
|
'default_sale_tax_id': 'XML:l10n_at.1_tax_at_mwst_10', # Standardsteuer Verkauf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Einstellungen Personal
|
||||||
#Einstellungen Personal
|
|
||||||
self.hr_config = {
|
self.hr_config = {
|
||||||
'module_hr_expense': True, # Spesen der Mitarbeiter verwalten
|
'module_hr_expense': True, # Spesen der Mitarbeiter verwalten
|
||||||
'module_hr_timesheet': False, # Verwalten Sie Ihre Studenzettel
|
'module_hr_timesheet': False, # Verwalten Sie Ihre Studenzettel
|
||||||
'group_hr_attendance': True, # Zuweisung der Berechtigung zur Arbeitszeiteingabe für alle Benutzer
|
'group_hr_attendance': True, # Zuweisung der Berechtigung zur Arbeitszeiteingabe für alle Benutzer
|
||||||
}
|
}
|
||||||
|
|
||||||
#Einstellungen Lager
|
# Einstellungen Lager
|
||||||
self.stock_config = {
|
self.stock_config = {
|
||||||
'group_stock_multiple_locations': True, # Verwalten Sie mehrere Lager und Lagerorte
|
'warehouse_and_location_usage_level': 0, # Warehouses and Locations usage level
|
||||||
'group_stock_tracking_lot': False, # Benutze Verpackungen: Paletten, Boxen, ...
|
'group_stock_tracking_lot': 0, # Verpackungsgrößen bei der Verpackung: Paletten, Kisten, Behälter...
|
||||||
'group_stock_production_lot': True, # Verfolgen Sie Los- und Seriennummern.
|
'group_stock_production_lot': 0, # Verfolgen Sie Los- und Seriennummern
|
||||||
'group_stock_packaging': False, # Ermöglicht die Auswahl einer Verpackung
|
'group_stock_packaging': 0, # Manage available packaging options per products
|
||||||
'group_stock_adv_location': True, # Verwalten Sie erweiterte Routen im Lager
|
'group_stock_adv_location': 0, # Advanced routing of products using rules
|
||||||
|
'group_product_variant': 0, # Produkte können mehrere Attribute haben, die Varianten definieren
|
||||||
}
|
}
|
||||||
|
|
||||||
# Einstellungen Fertigung
|
# Einstellungen Fertigung
|
||||||
|
|
@ -253,4 +253,5 @@ class Config():
|
||||||
|
|
||||||
self.system_parameters = {
|
self.system_parameters = {
|
||||||
'ir_attachment.location': 'db', # [db] oder [file]
|
'ir_attachment.location': 'db', # [db] oder [file]
|
||||||
|
'database.expiration_date': '2038-01-19',
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,26 @@ class DatenpolFunctions():
|
||||||
fi.close()
|
fi.close()
|
||||||
return content
|
return content
|
||||||
|
|
||||||
|
def resolve_xml_id(self, value):
|
||||||
|
# In case the value starts with 'XML:' then take the remaining string
|
||||||
|
# as an XML-Id, resolve it and return that. Otherwise return value
|
||||||
|
# unchanged.
|
||||||
|
if type(value) != str or value[:4] != 'XML:':
|
||||||
|
return value
|
||||||
|
|
||||||
|
xml_id = value[4:]
|
||||||
|
res_id = self._execute('ir.model.data', 'xmlid_to_res_id', xml_id)
|
||||||
|
if not res_id:
|
||||||
|
raise Exception('XML-Id "%s" nicht vorhanden!' % xml_id)
|
||||||
|
return res_id
|
||||||
|
|
||||||
|
def resolve_xml_ids(self, data):
|
||||||
|
# Resolve all XML-Ids in the dict data
|
||||||
|
# Note: This happens in-place, the original dict is returned
|
||||||
|
for k, v in data.iteritems():
|
||||||
|
data[k] = self.resolve_xml_id(v)
|
||||||
|
return data
|
||||||
|
|
||||||
def set_company(self):
|
def set_company(self):
|
||||||
"""Setze Unternehmensdaten (Allgemein, RML, Logo)"""
|
"""Setze Unternehmensdaten (Allgemein, RML, Logo)"""
|
||||||
|
|
||||||
|
|
@ -344,15 +364,6 @@ class DatenpolFunctions():
|
||||||
return self._execute('res.users', 'write', [user_id], vals)
|
return self._execute('res.users', 'write', [user_id], vals)
|
||||||
|
|
||||||
def setup_accounting(self):
|
def setup_accounting(self):
|
||||||
"""Konfiguration Buchhaltung"""
|
|
||||||
|
|
||||||
vals = self._execute('account.installer', 'default_get', [])
|
|
||||||
vals['charts'] = self.config.chart_of_accounts
|
|
||||||
wizard_id = self._execute('account.installer', 'create', vals)
|
|
||||||
self._execute('account.installer', 'action_next', [wizard_id])
|
|
||||||
return True
|
|
||||||
|
|
||||||
def setup_accounting2(self):
|
|
||||||
"""Konfiguration Kontenplan"""
|
"""Konfiguration Kontenplan"""
|
||||||
|
|
||||||
c = self.config
|
c = self.config
|
||||||
|
|
@ -397,7 +408,7 @@ class DatenpolFunctions():
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def uninstall_chat(self):
|
def uninstall_chat(self):
|
||||||
"""Chat-Modul deinstallieren """
|
"""Chat-Modul deinstallieren"""
|
||||||
|
|
||||||
modules = ['im_chat', 'im_odoo_support', 'bus']
|
modules = ['im_chat', 'im_odoo_support', 'bus']
|
||||||
modules_to_install = self._execute('ir.module.module', 'search', [('name', 'in', modules)])
|
modules_to_install = self._execute('ir.module.module', 'search', [('name', 'in', modules)])
|
||||||
|
|
@ -690,14 +701,7 @@ class DatenpolFunctions():
|
||||||
"""Defaultwerte für Dokumente setzen"""
|
"""Defaultwerte für Dokumente setzen"""
|
||||||
|
|
||||||
for model, field, value in self.config.default_values:
|
for model, field, value in self.config.default_values:
|
||||||
# Falls XML ID (prefix "XML:") dann die DB ID holen
|
value = self.resolve_xml_id(value)
|
||||||
if value[0:4] == 'XML:':
|
|
||||||
xml_id = value[4:]
|
|
||||||
dummy, dummy2, res_id = self._execute('ir.model.data', 'xmlid_lookup', xml_id)
|
|
||||||
if not res_id:
|
|
||||||
raise Exception('Defaultwerte anlegen: XML ID %s nicht vorhanden!' % (xml_id))
|
|
||||||
value = res_id
|
|
||||||
|
|
||||||
vals = {
|
vals = {
|
||||||
'name': field,
|
'name': field,
|
||||||
'model': model,
|
'model': model,
|
||||||
|
|
@ -800,7 +804,7 @@ class DatenpolFunctions():
|
||||||
|
|
||||||
if hasattr(self.config, 'finance_config'):
|
if hasattr(self.config, 'finance_config'):
|
||||||
vals = self._execute('account.config.settings', 'default_get', [])
|
vals = self._execute('account.config.settings', 'default_get', [])
|
||||||
vals.update(self.config.finance_config)
|
vals.update(self.resolve_xml_ids(self.config.finance_config))
|
||||||
wizard_id = self._execute('account.config.settings', 'create', vals)
|
wizard_id = self._execute('account.config.settings', 'create', vals)
|
||||||
return self._execute('account.config.settings', 'execute', [wizard_id])
|
return self._execute('account.config.settings', 'execute', [wizard_id])
|
||||||
return True
|
return True
|
||||||
|
|
@ -909,6 +913,34 @@ class DatenpolFunctions():
|
||||||
# except:
|
# except:
|
||||||
# print "Fehler Anlage ExtID " + 'cust_account_mapp_' + acc
|
# print "Fehler Anlage ExtID " + 'cust_account_mapp_' + acc
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
def consume_tours(self):
|
||||||
|
"""Odoo-Touren auf konsumiert setzen"""
|
||||||
|
|
||||||
|
tours = [
|
||||||
|
'crm_tour',
|
||||||
|
'mail_tour',
|
||||||
|
'sale_tour',
|
||||||
|
'rte',
|
||||||
|
'rte_inline',
|
||||||
|
]
|
||||||
|
|
||||||
|
for uid in self._execute('res.users', 'search', []):
|
||||||
|
for t in tours:
|
||||||
|
vals = {
|
||||||
|
'name': t,
|
||||||
|
'user_id': uid,
|
||||||
|
}
|
||||||
|
self._execute('web_tour.tour', 'create', vals)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def disable_planners(self):
|
||||||
|
"""Implementierungsplaner deaktivieren"""
|
||||||
|
|
||||||
|
# The dashboard widget itself remains. It can be removed in the
|
||||||
|
# module web_settings_dashboard in dashboard.xml and dashboard.js.
|
||||||
|
|
||||||
|
planner_ids = self._execute('web.planner', 'search', [])
|
||||||
|
return self._execute('web.planner', 'write', planner_ids, {'active': False})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue