Merge branch 'develop' of https://gitlab.datenpol.at/odoo/tz-austria into develop
commit
dee7324408
|
|
@ -16,11 +16,17 @@ timezone = Europe/Vienna
|
||||||
#dbfilter_test = ['.*',]
|
#dbfilter_test = ['.*',]
|
||||||
show_debug = 1
|
show_debug = 1
|
||||||
|
|
||||||
workers = 0
|
workers = 4
|
||||||
server_wide_modules = web,base_sparse_field,queue_job
|
server_wide_modules = web,base_sparse_field,queue_job
|
||||||
|
|
||||||
portal_url = https://dev-portal.tzaustria.info/
|
portal_url = https://dev-portal.tzaustria.info/
|
||||||
portal_secret = hH43413$74O0
|
portal_secret = hH43413$74O0
|
||||||
|
|
||||||
|
limit_memory_hard = 2684354560
|
||||||
|
limit_memory_soft = 2147483648
|
||||||
|
limit_request = 8192
|
||||||
|
limit_time_cpu = 60
|
||||||
|
limit_time_real = 120
|
||||||
|
|
||||||
[queue_job]
|
[queue_job]
|
||||||
channels = root:4
|
channels = root:4
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ from urllib.parse import urlparse
|
||||||
host = 'localhost'
|
host = 'localhost'
|
||||||
port = 8080
|
port = 8080
|
||||||
db = 'tz-austria_1'
|
db = 'tz-austria_1'
|
||||||
user = 'admin'
|
user = 'tz-admin'
|
||||||
pw = 'x'
|
pw = 'x'
|
||||||
|
|
||||||
odoo = odoorpc.ODOO(host, port=port)
|
odoo = odoorpc.ODOO(host, port=port)
|
||||||
|
|
@ -13,9 +13,10 @@ odoo.login(db, user, pw)
|
||||||
|
|
||||||
values = {
|
values = {
|
||||||
"name": "Company2",
|
"name": "Company2",
|
||||||
"street": "Elterleinplatz 11",
|
"name2": "Unternehmen 2",
|
||||||
|
"street": "Matzleinsdorferplatz 5",
|
||||||
"street2": "Teststrasse 30",
|
"street2": "Teststrasse 30",
|
||||||
"zip": 1170,
|
"zip": 1050,
|
||||||
"city": "Wien",
|
"city": "Wien",
|
||||||
"country_id": "AT",
|
"country_id": "AT",
|
||||||
"fax": "+43 55567051",
|
"fax": "+43 55567051",
|
||||||
|
|
@ -26,17 +27,18 @@ values = {
|
||||||
"email": "company@test.at",
|
"email": "company@test.at",
|
||||||
"opt_out": True,
|
"opt_out": True,
|
||||||
"ref": "A144S4",
|
"ref": "A144S4",
|
||||||
"partner_sector_id": "Test",
|
"partner_sector_id": "ENDKUNDE",
|
||||||
"comment": "comment",
|
"comment": "comment",
|
||||||
"vat": False,
|
"vat": False,
|
||||||
"lang": "de",
|
"lang": "de",
|
||||||
"line_ids": ["12345", "12346"],
|
"line_ids": ["0000"],
|
||||||
"property_payment_term_id": "15 Tage",
|
"property_payment_term_id": "15 Tage",
|
||||||
"property_product_pricelist": "EUR",
|
"property_product_pricelist": "EUR",
|
||||||
"date_vat_check": "2017-08-04",
|
"date_vat_check": "2017-08-04",
|
||||||
"active": True,
|
"active": True,
|
||||||
"retail_partner_id": "A144S3",
|
"retail_partner_id": "004354",
|
||||||
"retailer": False,
|
"retailer": False,
|
||||||
|
"carrier_id": "LKW"
|
||||||
}
|
}
|
||||||
|
|
||||||
res_partner_obj = odoo.env['res.partner']
|
res_partner_obj = odoo.env['res.partner']
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,9 @@
|
||||||
<field name="type">service</field>
|
<field name="type">service</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="product_transport" model="product.template">
|
||||||
|
<field name="name">Transport</field>
|
||||||
|
<field name="type">service</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
|
||||||
|
|
@ -103,3 +103,21 @@ class AccountInvoice(models.Model):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
self.sent = True
|
self.sent = True
|
||||||
return self.env.ref('account.account_invoices_without_payment').report_action(self)
|
return self.env.ref('account.account_invoices_without_payment').report_action(self)
|
||||||
|
|
||||||
|
@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
|
||||||
|
|
|
||||||
|
|
@ -115,8 +115,6 @@ class Partner(models.Model):
|
||||||
"""
|
"""
|
||||||
vals = self.with_context(sst_14=True).remove_not_specified_fields(vals)
|
vals = self.with_context(sst_14=True).remove_not_specified_fields(vals)
|
||||||
vals = self.correct_values(vals)
|
vals = self.correct_values(vals)
|
||||||
if not vals.get('active', False):
|
|
||||||
vals['active'] = False
|
|
||||||
return self.create(vals).id
|
return self.create(vals).id
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
|
|
@ -233,6 +231,15 @@ class Partner(models.Model):
|
||||||
else:
|
else:
|
||||||
raise ValidationError(_("Unternehmen mit Odoo-ID \'%s\' existiert nicht") % vals['company_odoo_id'])
|
raise ValidationError(_("Unternehmen mit Odoo-ID \'%s\' existiert nicht") % vals['company_odoo_id'])
|
||||||
|
|
||||||
|
if vals.get('carrier_id', False):
|
||||||
|
carrier_id = self.env['delivery.carrier'].search([('name', '=', vals['carrier_id'])])
|
||||||
|
if carrier_id:
|
||||||
|
vals['property_delivery_carrier_id'] = carrier_id.id
|
||||||
|
del vals['carrier_id']
|
||||||
|
else:
|
||||||
|
raise ValidationError(
|
||||||
|
_("Die Auslieferungsmethode mit dem Namen \'%s\' existiert nicht") % vals['carrier_id'])
|
||||||
|
|
||||||
return vals
|
return vals
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
|
|
@ -245,7 +252,8 @@ class Partner(models.Model):
|
||||||
elif self.env.context.get('sst_11', False):
|
elif self.env.context.get('sst_11', False):
|
||||||
common_list.extend(['name', 'ref', 'partner_sector_id', 'comment', 'vat', 'property_payment_term_id',
|
common_list.extend(['name', 'ref', 'partner_sector_id', 'comment', 'vat', 'property_payment_term_id',
|
||||||
'property_pricelist_id', 'date_vat_check', 'active', 'property_product_pricelist',
|
'property_pricelist_id', 'date_vat_check', 'active', 'property_product_pricelist',
|
||||||
'retail_partner_id', 'retailer', 'info_uid'])
|
'retail_partner_id', 'retailer', 'info_uid', 'name2', 'carrier_id'])
|
||||||
|
return common_list
|
||||||
elif self.env.context.get('sst_14', False):
|
elif self.env.context.get('sst_14', False):
|
||||||
common_list.extend(['firstname', 'lastname', 'midname', 'company_odoo_id', 'portal_id'])
|
common_list.extend(['firstname', 'lastname', 'midname', 'company_odoo_id', 'portal_id'])
|
||||||
return common_list
|
return common_list
|
||||||
|
|
@ -296,6 +304,41 @@ class Partner(models.Model):
|
||||||
vals[field] = False
|
vals[field] = False
|
||||||
return super(Partner, self).write(vals)
|
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', '<br/>')
|
||||||
|
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):
|
class PartnerSector(models.Model):
|
||||||
_name = 'res.partner.sector'
|
_name = 'res.partner.sector'
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,14 @@ class SaleOrder(models.Model):
|
||||||
positions = fields.Integer(string='Positionen', compute='_compute_positions')
|
positions = fields.Integer(string='Positionen', compute='_compute_positions')
|
||||||
num_items = fields.Integer(string='Anzahl der Artikel', compute='_compute_num_items')
|
num_items = fields.Integer(string='Anzahl der Artikel', compute='_compute_num_items')
|
||||||
weight_total = fields.Float(string='Gesamtgewicht', compute='_compute_weight_total')
|
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')
|
||||||
|
def _onchange_partner_invoice_id(self):
|
||||||
|
for record in self:
|
||||||
|
if record.partner_invoice_id.retailer:
|
||||||
|
record.payment_term_id = record.partner_invoice_id.property_payment_term_id
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def _compute_weight_total(self):
|
def _compute_weight_total(self):
|
||||||
|
|
@ -147,7 +154,8 @@ class SaleOrder(models.Model):
|
||||||
if not partner.parent_id:
|
if not partner.parent_id:
|
||||||
raise ValidationError(
|
raise ValidationError(
|
||||||
_('Zu dem Kontakt mit der portal-ID %s existiert kein Unternehmen') % vals['portal_id'])
|
_('Zu dem Kontakt mit der portal-ID %s existiert kein Unternehmen') % vals['portal_id'])
|
||||||
vals['partner_id'] = partner.parent_id.id
|
partner = partner.parent_id
|
||||||
|
vals['partner_id'] = partner.id
|
||||||
if not partner:
|
if not partner:
|
||||||
raise ValidationError(
|
raise ValidationError(
|
||||||
_("Der Kunde mit der Portal-ID \'%s\' kann nicht zugeordnet werden") % vals['portal_id'])
|
_("Der Kunde mit der Portal-ID \'%s\' kann nicht zugeordnet werden") % vals['portal_id'])
|
||||||
|
|
@ -175,14 +183,17 @@ class SaleOrder(models.Model):
|
||||||
order_line_vals = vals.get('order_lines', False)
|
order_line_vals = vals.get('order_lines', False)
|
||||||
vals = self.remove_not_specified_fields(vals)
|
vals = self.remove_not_specified_fields(vals)
|
||||||
vals = self.correct_values(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({
|
vals.update({
|
||||||
'partner_id': partner.id,
|
'partner_id': partner.id,
|
||||||
'fiscal_position_id': partner.property_account_position_id.id,
|
'fiscal_position_id': partner.property_account_position_id.id,
|
||||||
'user_id': partner.user_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_shipping_id': delivery_partner.id,
|
||||||
'partner_invoice_id': partner.id,
|
'incoterm': partner.sale_incoterm_id.id,
|
||||||
'incoterm': partner.sale_incoterm_id.id
|
'carrier_id': partner.property_delivery_carrier_id.id
|
||||||
})
|
})
|
||||||
order_id = self.create(vals)
|
order_id = self.create(vals)
|
||||||
if attachment_vals:
|
if attachment_vals:
|
||||||
|
|
@ -341,6 +352,24 @@ class SaleOrder(models.Model):
|
||||||
self.name = new_name
|
self.name = new_name
|
||||||
return super(SaleOrder, self).action_confirm()
|
return super(SaleOrder, self).action_confirm()
|
||||||
|
|
||||||
|
@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 SaleOrderLine(models.Model):
|
class SaleOrderLine(models.Model):
|
||||||
_inherit = 'sale.order.line'
|
_inherit = 'sale.order.line'
|
||||||
|
|
@ -424,27 +453,30 @@ class SaleOrderLine(models.Model):
|
||||||
'name': 'Händlerrabatt {}%'.format(discount),
|
'name': 'Händlerrabatt {}%'.format(discount),
|
||||||
'intrastat_id': False
|
'intrastat_id': False
|
||||||
})
|
})
|
||||||
|
del vals['discount']
|
||||||
invoice_lines |= self.env['account.invoice.line'].create(vals)
|
invoice_lines |= self.env['account.invoice.line'].create(vals)
|
||||||
return invoice_lines
|
return invoice_lines
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def calc_discount(self):
|
def calc_discount(self):
|
||||||
discount = 0.0
|
discount = 0.0
|
||||||
context_partner = dict(self.env.context, partner_id=self.order_id.partner_id.id, date=self.order_id.date_order)
|
context_partner = dict(self.env.context, partner_id=self.order_id.partner_invoice_id.id,
|
||||||
|
date=self.order_id.date_order)
|
||||||
pricelist_context = dict(context_partner, uom=self.product_uom.id)
|
pricelist_context = dict(context_partner, uom=self.product_uom.id)
|
||||||
|
|
||||||
price, rule_id = self.order_id.pricelist_id.with_context(pricelist_context).get_product_price_rule(
|
pricelist_id = self.order_id.partner_invoice_id.property_product_pricelist
|
||||||
self.product_id, self.product_uom_qty or 1.0, self.order_id.partner_id)
|
price, rule_id = pricelist_id.with_context(pricelist_context).get_product_price_rule(
|
||||||
|
self.product_id, self.product_uom_qty or 1.0, self.order_id.partner_invoice_id)
|
||||||
new_list_price, currency_id = self.with_context(context_partner)._get_real_price_currency(self.product_id,
|
new_list_price, currency_id = self.with_context(context_partner)._get_real_price_currency(self.product_id,
|
||||||
rule_id,
|
rule_id,
|
||||||
self.product_uom_qty,
|
self.product_uom_qty,
|
||||||
self.product_uom,
|
self.product_uom,
|
||||||
self.order_id.pricelist_id.id)
|
pricelist_id.id)
|
||||||
|
|
||||||
if new_list_price != 0:
|
if new_list_price != 0:
|
||||||
if self.order_id.pricelist_id.currency_id.id != currency_id:
|
if pricelist_id.currency_id.id != currency_id:
|
||||||
# we need new_list_price in the same currency as price, which is in the SO's pricelist's currency
|
# we need new_list_price in the same currency as price, which is in the SO's pricelist's currency
|
||||||
new_list_price = self.env['res.currency'].browse(currency_id).with_context(context_partner).compute(
|
new_list_price = self.env['res.currency'].browse(currency_id).with_context(context_partner).compute(
|
||||||
new_list_price, self.order_id.pricelist_id.currency_id)
|
new_list_price, pricelist_id.currency_id)
|
||||||
discount = (new_list_price - price) / new_list_price * 100
|
discount = (new_list_price - price) / new_list_price * 100
|
||||||
return discount
|
return discount
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 13 KiB |
|
|
@ -12,9 +12,9 @@
|
||||||
class="btn-danger" attrs="{'invisible':[('portal_pending','=',False)]}"/>
|
class="btn-danger" attrs="{'invisible':[('portal_pending','=',False)]}"/>
|
||||||
</header>
|
</header>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//h1" position="after">
|
<xpath expr="//field[@name='parent_id']/.." position="before">
|
||||||
<h3>
|
<h3>
|
||||||
<field name="name2" attrs="{'invisible': [('is_company', '=', False)]}"/>
|
<field name="name2" placeholder="Unternehmen 2"/>
|
||||||
</h3>
|
</h3>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,12 @@
|
||||||
<field name="model">sale.order</field>
|
<field name="model">sale.order</field>
|
||||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
|
<field name="client_order_ref" position="replace"/>
|
||||||
|
<field name="origin" position="replace"/>
|
||||||
<field name="payment_term_id" position="after">
|
<field name="payment_term_id" position="after">
|
||||||
<field name="assembled"/>
|
<field name="client_order_ref"/>
|
||||||
<field name="line_id"/>
|
<field name="origin"/>
|
||||||
|
<field name="confirmation_nr"/>
|
||||||
<field name="assembly_state"/>
|
<field name="assembly_state"/>
|
||||||
</field>
|
</field>
|
||||||
<field name="note" position="after">
|
<field name="note" position="after">
|
||||||
|
|
@ -27,20 +30,56 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='order_line']/tree//field[@name='product_id']" position="after">
|
<xpath expr="//field[@name='order_line']/tree//field[@name='product_id']" position="after">
|
||||||
<field name="lot_id" options="{'no_open': True}"/>
|
<field name="lot_id" options="{'no_open': True}"/>
|
||||||
<button name="action_show_lot" string="Lot" type="object" icon="fa-list" attrs="{'invisible': [('lot_id', '=', False)]}" options='{"warn": true}'/>
|
<button name="action_show_lot" string="Lot" type="object" icon="fa-list"
|
||||||
|
attrs="{'invisible': [('lot_id', '=', False)]}" options='{"warn": true}'/>
|
||||||
<field name="from_designbox"/>
|
<field name="from_designbox"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='order_line']/kanban//field[@name='product_id']" position="after">
|
<xpath expr="//field[@name='order_line']/kanban//field[@name='product_id']" position="after">
|
||||||
<field name="lot_id"/>
|
<field name="lot_id"/>
|
||||||
<field name="from_designbox"/>
|
<field name="from_designbox"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<group name="technical" position="replace">
|
<group name="technical" position="attributes">
|
||||||
<group string="Berichtswesen" name="technical">
|
<attribute name="groups"/>
|
||||||
<field name="origin"/>
|
<attribute name="string">Berichtswesen</attribute>
|
||||||
</group>
|
</group>
|
||||||
|
<xpath expr="//group[@name='sales_person']/.." position="attributes">
|
||||||
|
<attribute name="col">3</attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//group[@name='sales_person']" position="after">
|
||||||
|
<group name="production" string="Produktion">
|
||||||
|
<field name="assembled"/>
|
||||||
|
<field name="line_id"/>
|
||||||
</group>
|
</group>
|
||||||
<field name="partner_shipping_id" position="after">
|
</xpath>
|
||||||
<field name="confirmation_nr"/>
|
<xpath expr="//label[@for='carrier_id']" position="replace"/>
|
||||||
|
<xpath expr="//div[@name='carrier_selection']" position="replace"/>
|
||||||
|
<field name="picking_policy" position="after">
|
||||||
|
<label for="carrier_id"/>
|
||||||
|
<div name='carrier_selection'>
|
||||||
|
<div>
|
||||||
|
<field name="carrier_id" context="{'order_id': id}" class="oe_inline"
|
||||||
|
options="{'no_create': True, 'no_open': True}"
|
||||||
|
attrs="{'readonly':[('state','not in',('draft','sent'))]}"/>
|
||||||
|
<i class="fa fa-check text-success" aria-hidden="true"
|
||||||
|
attrs="{'invisible':['|','|',('carrier_id','=',False),('state','not in',('draft','sent')),('delivery_rating_success','=',False)]}"/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<field name='delivery_price' widget='monetary' class="oe_inline"
|
||||||
|
options="{'currency_field': 'currency_id'}" nolabel="1"
|
||||||
|
attrs="{'invisible': [('carrier_id','=', False)]}" force_save="1"/>
|
||||||
|
<button name="get_delivery_price" string="Check price" type="object"
|
||||||
|
class="oe_inline fa fa-arrow-right oe_link"
|
||||||
|
attrs="{'invisible':['|',('carrier_id','=',False),('state','not in',('draft','sent'))]}"/>
|
||||||
|
<button name="set_delivery_line" string="Set price" type="object"
|
||||||
|
class="oe_inline fa fa-arrow-right oe_link"
|
||||||
|
attrs="{'invisible':['|','|',('carrier_id','=',False),('state','not in',('draft','sent')),('delivery_rating_success','=',False)]}"/>
|
||||||
|
<field name='delivery_rating_success' invisible="1" force_save="1"/>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-info" role="alert"
|
||||||
|
attrs="{'invisible': ['|',('carrier_id','=', False),('delivery_message','=',False)]}">
|
||||||
|
<field name='delivery_message' force_save="1"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
||||||
|
|
@ -62,10 +62,11 @@ class PortalAssignCompany(models.TransientModel):
|
||||||
partner = self.env['res.partner'].browse(self.env.context.get('active_ids', []))
|
partner = self.env['res.partner'].browse(self.env.context.get('active_ids', []))
|
||||||
if not partner:
|
if not partner:
|
||||||
raise ValidationError(_('Der Partner konnte nicht gefuden werden.'))
|
raise ValidationError(_('Der Partner konnte nicht gefuden werden.'))
|
||||||
if not self.main_partner_id.portal_id:
|
portal_id = partner.portal_id
|
||||||
self.main_partner_id.portal_id = partner.portal_id
|
|
||||||
self.send_to_portal(self.main_partner_id.portal_id, self.main_partner_id.id)
|
|
||||||
partner.unlink()
|
partner.unlink()
|
||||||
|
if not self.main_partner_id.portal_id:
|
||||||
|
self.main_partner_id.portal_id = portal_id
|
||||||
|
self.send_to_portal(self.main_partner_id.portal_id, self.main_partner_id.id)
|
||||||
|
|
||||||
return self.env.ref('base.action_partner_form').read()[0]
|
return self.env.ref('base.action_partner_form').read()[0]
|
||||||
return {'type': 'ir.actions.act_window_close'}
|
return {'type': 'ir.actions.act_window_close'}
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@
|
||||||
'account.payment.term.csv',
|
'account.payment.term.csv',
|
||||||
'account.payment.term.line.csv',
|
'account.payment.term.line.csv',
|
||||||
'res.line.csv',
|
'res.line.csv',
|
||||||
|
'delivery.carrier.csv',
|
||||||
],
|
],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'auto_install': False,
|
'auto_install': False,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
"id","name","delivery_type","product_id/id","fixed_price"
|
||||||
|
"carrier_lkw","LKW","fixed","dp_custom.product_transport","0.0"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
|
||||||
|
|
||||||
<template id="report_assets_common" inherit_id="web.report_assets_common">
|
<template id="report_assets_common" inherit_id="web.report_assets_common">
|
||||||
<xpath expr="." position="inside">
|
<xpath expr="." position="inside">
|
||||||
|
|
@ -33,7 +32,7 @@
|
||||||
<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-10 header-label">
|
<div class="col-xs-8 header-label">
|
||||||
<p t-if="o._name == 'account.invoice'">
|
<p t-if="o._name == 'account.invoice'">
|
||||||
<span t-if="o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')">
|
<span t-if="o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')">
|
||||||
RECHNUNG
|
RECHNUNG
|
||||||
|
|
@ -56,7 +55,7 @@
|
||||||
<span t-field="o.quote_name"/>
|
<span t-field="o.quote_name"/>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-2 header-logo">
|
<div class="col-xs-4 header-logo">
|
||||||
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo.decode()"
|
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo.decode()"
|
||||||
style="max-height: 85px;"/>
|
style="max-height: 85px;"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -138,29 +137,52 @@
|
||||||
<span t-esc="company.partner_id.name"/>
|
<span t-esc="company.partner_id.name"/>
|
||||||
</strong>
|
</strong>
|
||||||
<div class="company-data">
|
<div class="company-data">
|
||||||
<span t-esc="company.partner_id.street"/><br/>
|
<span t-esc="company.partner_id.street"/>
|
||||||
<span t-esc="company.partner_id.zip"/><span t-esc="company.partner_id.city"/><br/>
|
<br/>
|
||||||
<span t-esc="company.partner_id.country_id.name"/><br/><br/>
|
<span t-esc="company.partner_id.zip"/>
|
||||||
Phone: <span t-esc="company.partner_id.phone"/><br/>
|
<span t-esc="company.partner_id.city"/>
|
||||||
Fax: +43 2538/8628 - 400<br/>
|
<br/>
|
||||||
E-Mail: <span t-esc="company.partner_id.email"/><br/>
|
<span t-esc="company.partner_id.country_id.name"/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
Phone:
|
||||||
|
<span t-esc="company.partner_id.phone"/>
|
||||||
|
<br/>
|
||||||
|
Fax: +43 2538/8628 - 400
|
||||||
|
<br/>
|
||||||
|
E-Mail:
|
||||||
|
<span t-esc="company.partner_id.email"/>
|
||||||
|
<br/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<strong><span t-esc="company.partner_id.website"/></strong>
|
<strong>
|
||||||
|
<span t-esc="company.partner_id.website"/>
|
||||||
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="partner_data">
|
<template id="partner_data">
|
||||||
<strong>
|
<strong>
|
||||||
Kundendaten
|
Kundendaten
|
||||||
</strong>
|
</strong>
|
||||||
<div class="partner-data">
|
<div class="partner-data">
|
||||||
<span t-esc="o.partner_id.name"/><br/>
|
<span t-esc="o.partner_id.name"/>
|
||||||
<span t-esc="o.partner_id.street"/><br/>
|
<br/>
|
||||||
<span t-esc="o.partner_id.zip"/> <span t-esc="o.partner_id.city"/><br/>
|
<t t-if="o.partner_id.name2">
|
||||||
<span t-esc="o.partner_id.country_id.name"/><br/>
|
<span t-esc="o.partner_id.name2"/>
|
||||||
<span t-esc="o.partner_id.email"/><br/>
|
<br/>
|
||||||
|
</t>
|
||||||
|
<span t-esc="o.partner_id.street"/>
|
||||||
|
<br/>
|
||||||
|
<span t-esc="o.partner_id.zip"/>
|
||||||
|
<span t-esc="o.partner_id.city"/>
|
||||||
|
<br/>
|
||||||
|
<span t-esc="o.partner_id.country_id.name"/>
|
||||||
|
<br/>
|
||||||
|
<span t-esc="o.partner_id.email"/>
|
||||||
|
<br/>
|
||||||
<span t-esc="o.partner_id.phone"/>
|
<span t-esc="o.partner_id.phone"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</data>
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
|
||||||
|
|
@ -88,9 +88,9 @@
|
||||||
<thead class="table-header">
|
<thead class="table-header">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-center">Pos.</th>
|
<th class="text-center">Pos.</th>
|
||||||
<th class="text-center">Anzahl</th>
|
<th class="text-tight">Anzahl</th>
|
||||||
<th class="text-right">Gewicht</th>
|
<th class="text-right">Gewicht</th>
|
||||||
<th class="text-right"></th>
|
<th class="text-right"/>
|
||||||
<th class="text-left">Artikel</th>
|
<th class="text-left">Artikel</th>
|
||||||
<th class="text-right">EP</th>
|
<th class="text-right">EP</th>
|
||||||
<th class="text-right" t-if="discount_is_set">Rabatt</th>
|
<th class="text-right" t-if="discount_is_set">Rabatt</th>
|
||||||
|
|
@ -104,7 +104,12 @@
|
||||||
<tr t-if="layout_category['name'] != 'Uncategorized'">
|
<tr t-if="layout_category['name'] != 'Uncategorized'">
|
||||||
<td colspan="6">
|
<td colspan="6">
|
||||||
<strong>
|
<strong>
|
||||||
<t t-esc="layout_category['name']"/> - <t t-esc="o.partner_id.ref"/><t t-if="layout_category['confirmation_nr']"> - <t t-esc="layout_category['confirmation_nr']"/></t>
|
<t t-esc="layout_category['name']"/>
|
||||||
|
-
|
||||||
|
<t t-esc="o.partner_id.name"/>
|
||||||
|
<t t-if="layout_category['confirmation_nr']">-
|
||||||
|
<t t-esc="layout_category['confirmation_nr']"/>
|
||||||
|
</t>
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right" t-if="discount_is_set"/>
|
<td class="text-right" t-if="discount_is_set"/>
|
||||||
|
|
@ -122,15 +127,14 @@
|
||||||
<span t-esc="pos_nr"/>
|
<span t-esc="pos_nr"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<span t-field="invoice_line.quantity"/>
|
<span t-esc="o._formatLang(invoice_line.quantity, False).strip('0').strip(',')"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<span t-field="invoice_line.weight"/>
|
<span t-field="invoice_line.weight"/>
|
||||||
kg
|
kg
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right"/>
|
||||||
</td>
|
<td class="text-left">
|
||||||
<td rowspan="2" class="text-left">
|
|
||||||
<t t-if="invoice_line.product_id.default_code">
|
<t t-if="invoice_line.product_id.default_code">
|
||||||
<strong>
|
<strong>
|
||||||
<span t-field="invoice_line.product_id.default_code"/>
|
<span t-field="invoice_line.product_id.default_code"/>
|
||||||
|
|
@ -144,25 +148,16 @@
|
||||||
</span>
|
</span>
|
||||||
<span t-field="invoice_line.name"/>
|
<span t-field="invoice_line.name"/>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="2" class="text-right">
|
<td class="text-right">
|
||||||
<span t-field="invoice_line.price_unit"/>
|
<span t-field="invoice_line.price_unit"/>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="2" class="text-right" t-if="discount_is_set">
|
<td class="text-right" t-if="discount_is_set">
|
||||||
<span t-field="invoice_line.discount"/>
|
<span t-field="invoice_line.discount"/>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="2" class="text-right">
|
<td class="text-right">
|
||||||
<span t-field="invoice_line.price_subtotal"/>
|
<span t-field="invoice_line.price_subtotal"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td colspan="4" style="border: 0;text-align: center;">
|
|
||||||
<!-- Fall 5078, Rechnung - keine Bilder mehr
|
|
||||||
<img t-if="invoice_line.product_id.image_medium"
|
|
||||||
t-att-src="'data:image/png;base64,%s' % invoice_line.product_id.image_medium.decode()"/>
|
|
||||||
-->
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
||||||
|
|
@ -78,9 +78,9 @@
|
||||||
<thead class="table-header">
|
<thead class="table-header">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-center">Pos.</th>
|
<th class="text-center">Pos.</th>
|
||||||
<th class="text-center">Anzahl</th>
|
<th class="text-right">Anzahl</th>
|
||||||
<th class="text-right">Gewicht</th>
|
<th class="text-right">Gewicht</th>
|
||||||
<th class="text-right"></th>
|
<th class="text-right"/>
|
||||||
<th class="text-left">Artikel</th>
|
<th class="text-left">Artikel</th>
|
||||||
<th class="text-right">EP</th>
|
<th class="text-right">EP</th>
|
||||||
<th class="text-right" t-if="discount_is_set">Rabatt</th>
|
<th class="text-right" t-if="discount_is_set">Rabatt</th>
|
||||||
|
|
@ -95,8 +95,8 @@
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<span t-esc="pos_nr"/>
|
<span t-esc="pos_nr"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-left">
|
<td class="text-right">
|
||||||
<span t-field="order_line.product_uom_qty"/>
|
<span t-esc="o._formatLang(order_line.product_uom_qty, False).strip('0').strip(',')"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<span t-field="order_line.weight"/> kg
|
<span t-field="order_line.weight"/> kg
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2018-Today datenpol gmbh(<http://www.datenpol.at>)
|
||||||
|
# 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,
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
|
|
@ -0,0 +1,85 @@
|
||||||
|
@odoo-brand-primary: #a72523;
|
||||||
|
@odoo-brand-optional: #a72523;
|
||||||
|
@navbar-default-color: #a72523;
|
||||||
|
@brand-primary: #a72523;
|
||||||
|
|
||||||
|
@navbar-default-bg: #ffffff;
|
||||||
|
@odoo-control-panel-background-color: #ffffff;
|
||||||
|
@odoo-control-panel-border-color: #a72523;
|
||||||
|
|
||||||
|
@table-bg-accent: #eee;
|
||||||
|
|
||||||
|
.navbar-default {
|
||||||
|
.navbar-collapse {
|
||||||
|
.fa {
|
||||||
|
color: @navbar-default-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_web_client {
|
||||||
|
>.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_form_view {
|
||||||
|
.oe_button_box {
|
||||||
|
.oe_stat_button {
|
||||||
|
.o_button_icon {
|
||||||
|
color: @brand-primary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_field_widget {
|
||||||
|
&.o_field_many2one .o_external_button {
|
||||||
|
color: @brand-primary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
.o_required_modifier {
|
||||||
|
&.o_input, .o_input {
|
||||||
|
background-color: lighten(@brand-primary, 50%) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<template id="assets_backend" name="dp_style assets" inherit_id="web.assets_backend">
|
||||||
|
<xpath expr="." position="inside">
|
||||||
|
<link rel="stylesheet" type="text/less" href="/dp_style/static/src/less/variables.less"/>
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
|
|
@ -67,8 +67,8 @@ odoo_config_geoip_database: /usr/share/GeoIP/GeoLiteCity.dat
|
||||||
odoo_config_http_enable: True # >= 11.0
|
odoo_config_http_enable: True # >= 11.0
|
||||||
odoo_config_http_interface: '' # >= 11.0
|
odoo_config_http_interface: '' # >= 11.0
|
||||||
odoo_config_http_port: 8069 # >= 11.0
|
odoo_config_http_port: 8069 # >= 11.0
|
||||||
odoo_config_limit_memory_hard: 805306368
|
odoo_config_limit_memory_hard: 2684354560
|
||||||
odoo_config_limit_memory_soft: 671088640
|
odoo_config_limit_memory_soft: 2147483648
|
||||||
odoo_config_limit_time_cpu: 60
|
odoo_config_limit_time_cpu: 60
|
||||||
odoo_config_limit_time_real: 120
|
odoo_config_limit_time_real: 120
|
||||||
odoo_config_limit_time_real_cron: -1 # >= 10.0
|
odoo_config_limit_time_real_cron: -1 # >= 10.0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue