Merge branch 'develop' of ssh://gitlab.datenpol.at:122/odoo/tz-austria into develop
commit
3f644e084e
|
|
@ -13,9 +13,12 @@
|
||||||
<field name="country_id" search="[('code','=','AT')]"/>
|
<field name="country_id" search="[('code','=','AT')]"/>
|
||||||
<field name="vat">ATU17860303</field>
|
<field name="vat">ATU17860303</field>
|
||||||
<field name="vat_check_vies" eval="False"/>
|
<field name="vat_check_vies" eval="False"/>
|
||||||
<field name="supplier" eval="True"/>
|
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<function id="set_company_supplier" model="res.company" name="set_company_supplier">
|
||||||
|
<value eval="[ref('glaser_and_co_company')]"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
<function id="set_company_logo" model="res.company" name="set_company_logo">
|
<function id="set_company_logo" model="res.company" name="set_company_logo">
|
||||||
<value eval="[ref('glaser_and_co_company')]"/>
|
<value eval="[ref('glaser_and_co_company')]"/>
|
||||||
<value>../static/src/img/logo_glaser.png</value>
|
<value>../static/src/img/logo_glaser.png</value>
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,8 @@
|
||||||
(4,ref('queue_job.group_queue_job_manager'))]"/>
|
(4,ref('queue_job.group_queue_job_manager'))]"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<function id="set_company_customer" model="res.company" name="set_company_customer">
|
||||||
|
<value eval="[ref('base.main_company')]"/>
|
||||||
|
</function>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,14 @@ class Company(models.Model):
|
||||||
fi.close()
|
fi.close()
|
||||||
self.browse(company).write({'logo': content})
|
self.browse(company).write({'logo': content})
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def set_company_supplier(self, company):
|
||||||
|
self.browse(company).partner_id.supplier = True
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def set_company_customer(self, company):
|
||||||
|
self.browse(company).partner_id.customer = True
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def set_company_favicon(self, company, logo):
|
def set_company_favicon(self, company, logo):
|
||||||
filename = os.path.join(os.path.dirname(os.path.realpath(__file__)), logo)
|
filename = os.path.join(os.path.dirname(os.path.realpath(__file__)), logo)
|
||||||
|
|
|
||||||
|
|
@ -198,6 +198,14 @@ class SaleOrderLine(models.Model):
|
||||||
from_designbox = fields.Boolean(string='Import von Designbox', readonly=True)
|
from_designbox = fields.Boolean(string='Import von Designbox', readonly=True)
|
||||||
product_id = fields.Many2one(domain=[('sale_ok', '=', True), ('can_be_sold_unconfigured', '=', True)])
|
product_id = fields.Many2one(domain=[('sale_ok', '=', True), ('can_be_sold_unconfigured', '=', True)])
|
||||||
|
|
||||||
|
@api.multi
|
||||||
|
def write(self, vals):
|
||||||
|
for record in self:
|
||||||
|
if record.from_designbox and set(vals.keys()).intersection(
|
||||||
|
['product_uom_qty', 'product_uom', 'price_unit']):
|
||||||
|
raise ValidationError(_("Menge und Preis können von Produkten aus der Designbox nicht geändert werden"))
|
||||||
|
return super(SaleOrderLine, self).write(vals)
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def correct_values(self, vals):
|
def correct_values(self, vals):
|
||||||
if vals.get('product_id', False):
|
if vals.get('product_id', False):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue