validity_date for offer

develop
Andreas Osim 2018-11-09 12:53:44 +01:00
parent 3d485bd1fb
commit c20ca14122
6 changed files with 41 additions and 15 deletions

View File

@ -59,6 +59,13 @@ class ProductTemplate(models.Model):
manufacturing_number = fields.Char(string='Herstellnummer')
product_color = fields.Char(string='Farbe')
@api.onchange('length', 'width', 'thickness')
def _onchange_measures(self):
if self.length>0 and self.width>0 and self.thickness>0:
self.volume = self.length*self.width*self.thickness/(1000*1000*1000)
elif self.length>0 and self.width>0 and self.height>0:
self.volume = self.length*self.width*self.height/(1000*1000*1000)
@api.model
def create_product(self, vals):
"""

View File

@ -7,7 +7,7 @@
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='invoice_line_ids']/tree//field[@name='name']" position="after">
<field name="intrastat_id"/>
<field name="intrastat_id" options="{'no_quick_create':True}"/>
</xpath>
<xpath expr="//field[@name='invoice_line_ids']/tree//field[@name='product_id']" position="after">

View File

@ -51,9 +51,11 @@
<field name="assembly_notes"/>
</group>
</field>
<!--
<xpath expr="//field[@name='order_line']/form//field[@name='name']" position="after">
<field name="intrastat_id"/>
<field name="intrastat_id" options="{'no_create': True}"/>
</xpath>
-->
<!--
<xpath expr="//field[@name='order_line']/form//field[@name='product_id']" position="replace">
<field name="product_id" options="{'no_create': True}"/>
@ -71,7 +73,7 @@
<field name="from_designbox"/>
</xpath>
<xpath expr="//field[@name='order_line']/tree//field[@name='name']" position="after">
<field name="intrastat_id"/>
<field name="intrastat_id" options="{'no_quick_create':True}"/>
</xpath>
<xpath expr="//field[@name='order_line']/tree//field[@name='product_id']" position="after">
<field name="item_notes" invisible="1"/>

View File

@ -9,7 +9,7 @@
<field name="ref" position="after">
<field name="assembled" string="Zusammengebaut"/>
<field name="weight"/>
<field name="intrastat_id"/>
<field name="intrastat_id" options="{'no_quick_create':True}"/>
<field name="notes"/>
</field>
<div class="oe_title" position="before">

View File

@ -91,11 +91,20 @@
</div>
<div class="row">
<div class="col-xs-3" style="padding-right: 4px">
<strong>
<span class="col-xs-8" style="padding: 0px;width: 58%;">Lieferdatum:</span>
</strong>
<span class="col-xs-4" style="padding: 0px;width: 42%;" t-field="o.earliest_scheduled_date"
t-options='{"widget": "date"}'/>
<t t-if="o.state not in ['draft','sent']">
<strong>
<span class="col-xs-8" style="padding: 0px;width: 58%;">Lieferdatum:</span>
</strong>
<span class="col-xs-4" style="padding: 0px;width: 42%;" t-field="o.earliest_scheduled_date"
t-options='{"widget": "date"}'/>
</t>
<t t-if="o.state in ['draft','sent'] and o.validity_date">
<strong>
<span class="col-xs-8" style="padding: 0px;width: 58%;">Gültig bis:</span>
</strong>
<span class="col-xs-4" style="padding: 0px;width: 42%;" t-field="o.validity_date"
t-options='{"widget": "date"}'/>
</t>
</div>
<strong>
<span class="col-xs-2">Telefon:</span>
@ -268,9 +277,17 @@
Austausch.
</p>
<t t-if="o.state in ['draft','sent']">
<p class="col-xs-12">
Gültigkeit: 14 Tage ab Ausstellungsdatum
</p>
<t t-if="o.validity_date">
<p class="col-xs-12">
Angebot gültig bis:
<span t-field="o.validity_date"/>
</p>
</t>
<t t-if="not o.validity_date">
<p class="col-xs-12">
Gültigkeit: 14 Tage ab Ausstellungsdatum
</p>
</t>
<p class="col-xs-12">
Auftrag erteilt am: ____________________
</p>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Sale Order Body -->
<!-- Production Order Body -->
<template id="report_production_document">
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})"/>
@ -44,9 +44,9 @@
<div class="row height-20">
<div class="col-xs-3" style="padding-right: 4px">
<strong>
<span class="col-xs-8" style="padding: 0px;width: 58%;">Angebotsdatum:</span>
<span class="col-xs-8" style="padding: 0px;width: 58%;">Auftragsdatum:</span>
</strong>
<span class="col-xs-4" style="padding: 0px;width: 42%;" t-field="o.date_order"
<span class="col-xs-4" style="padding: 0px;width: 42%;" t-field="o.confirmation_date"
t-options='{"widget": "date"}'/>
</div>
<strong>