Feedback 1624

develop
Ahmed Aly 2018-04-19 12:28:49 +02:00
parent c9619be2df
commit c1320165cc
5 changed files with 40 additions and 4 deletions

View File

@ -105,9 +105,11 @@
<td colspan="6">
<strong>
<t t-esc="layout_category['name']"/>
-
<t t-esc="o.partner_id.ref"/>
<t t-if="layout_category.get('order_id')">
<t t-if="layout_category['order_id'].partner_id.ref">
-
<t t-esc="layout_category['order_id'].partner_id.ref"/>
</t>
<t t-if="layout_category['order_id'].origin">
-
<t t-esc="layout_category['order_id'].origin"/>

View File

@ -32,6 +32,10 @@ class ConfigGlaser(Config):
self.warehouse_name = 'Glaser'
self.warehouse_code = 'Glaser'
self.tax_settings = {
'default_sale_tax_id': self.default_sales_tax
}
self.sequences = {
'sale.order': {
# 'number_next_actual': 1,

View File

@ -33,6 +33,10 @@ class ConfigTZA(Config):
self.warehouse_name = 'TZA'
self.warehouse_code = 'TZA'
self.tax_settings = {
'default_sale_tax_id': self.default_sales_tax
}
self.sequences = {
'sale.order': {
# 'number_next_actual': 1,

View File

@ -41,8 +41,9 @@ ENVIRONMENTS = {
'br-glaser' : Environment('http://localhost', '8080', 'tz-austria_1', 'glaser-admin', 'x', 'admin', config = ConfigGlaser()),
'aa' : Environment('http://localhost', '8080', 'tz-austria_1', 'admin', 'x', 'admin', config = ConfigTZA()),
'aa-tz' : Environment('http://localhost', '8080', 'tz-austria_1', 'tz-admin', 'x', 'admin', config = ConfigTZA()),
'aa-glaser' : Environment('http://localhost', '8080', 'tz-austria_1', 'glaser-admin', 'x', 'admin', config = ConfigGlaser()),
'aa2' : Environment('http://localhost', '8080', 'tz-austria_2', 'admin', 'x', 'admin', config = ConfigTZA()),
'aa-tz' : Environment('http://localhost', '8080', 'tz-austria_2', 'tz-admin', 'x', 'admin', config = ConfigTZA()),
'aa-glaser' : Environment('http://localhost', '8080', 'tz-austria_2', 'glaser-admin', 'x', 'admin', config = ConfigGlaser()),
'rw' : Environment('http://localhost', '8080', 'tz-austria_1', 'admin', 'x', 'admin', config = ConfigTZA()),
'rw-tz' : Environment('http://localhost', '8080', 'tz-austria_1', 'tz-admin', 'x', 'admin', config = ConfigTZA()),

View File

@ -94,6 +94,31 @@ class DatenpolFunctions(object):
wizard_id = res_settings.create(vals)
return res_settings.execute(wizard_id)
def set_default_tax_settings(self):
"""Systemeinstellungen konfigurieren"""
res_settings = self.odoo.env['res.config.settings']
vals = res_settings.default_get([])
if self.config.tax_settings.get('default_sale_tax_id', False):
sales_tax_ids = self.odoo.env['account.tax'].search(
[('name', '=', self.config.tax_settings.get('default_sale_tax_id'))])
self.config.tax_settings.update({
"default_sale_tax_id": sales_tax_ids,
})
if self.config.tax_settings.get('default_purchase_tax_id', False):
purchase_tax_ids = self.odoo.env['account.tax'].search(
[('name', '=', self.config.tax_settings.get('default_purchase_tax_id'))])
self.config.tax_settings.update({
"default_purchase_tax_id": purchase_tax_ids,
})
vals.update(self.config.tax_settings)
wizard_id = res_settings.create(vals)
return res_settings.execute(wizard_id)
def _readAndReturnFile(self, filename, encode=''):
fi = open(filename, 'rb')
content = ''