validity_date for offer
							parent
							
								
									3d485bd1fb
								
							
						
					
					
						commit
						c20ca14122
					
				|  | @ -59,6 +59,13 @@ class ProductTemplate(models.Model): | ||||||
|     manufacturing_number = fields.Char(string='Herstellnummer') |     manufacturing_number = fields.Char(string='Herstellnummer') | ||||||
|     product_color = fields.Char(string='Farbe') |     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 |     @api.model | ||||||
|     def create_product(self, vals): |     def create_product(self, vals): | ||||||
|         """ |         """ | ||||||
|  |  | ||||||
|  | @ -7,7 +7,7 @@ | ||||||
|         <field name="inherit_id" ref="account.invoice_form"/> |         <field name="inherit_id" ref="account.invoice_form"/> | ||||||
|         <field name="arch" type="xml"> |         <field name="arch" type="xml"> | ||||||
|             <xpath expr="//field[@name='invoice_line_ids']/tree//field[@name='name']" position="after"> |             <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> | ||||||
| 
 | 
 | ||||||
|             <xpath expr="//field[@name='invoice_line_ids']/tree//field[@name='product_id']" position="after"> |             <xpath expr="//field[@name='invoice_line_ids']/tree//field[@name='product_id']" position="after"> | ||||||
|  |  | ||||||
|  | @ -51,9 +51,11 @@ | ||||||
|                     <field name="assembly_notes"/> |                     <field name="assembly_notes"/> | ||||||
|                 </group> |                 </group> | ||||||
|             </field> |             </field> | ||||||
|  | <!-- | ||||||
|             <xpath expr="//field[@name='order_line']/form//field[@name='name']" position="after"> |             <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> | ||||||
|  | --> | ||||||
| <!-- | <!-- | ||||||
|             <xpath expr="//field[@name='order_line']/form//field[@name='product_id']" position="replace"> |             <xpath expr="//field[@name='order_line']/form//field[@name='product_id']" position="replace"> | ||||||
|                 <field name="product_id" options="{'no_create': True}"/> |                 <field name="product_id" options="{'no_create': True}"/> | ||||||
|  | @ -71,7 +73,7 @@ | ||||||
|                 <field name="from_designbox"/> |                 <field name="from_designbox"/> | ||||||
|             </xpath> |             </xpath> | ||||||
|             <xpath expr="//field[@name='order_line']/tree//field[@name='name']" position="after"> |             <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> | ||||||
|             <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="item_notes" invisible="1"/> |                 <field name="item_notes" invisible="1"/> | ||||||
|  |  | ||||||
|  | @ -9,7 +9,7 @@ | ||||||
|             <field name="ref" position="after"> |             <field name="ref" position="after"> | ||||||
|                 <field name="assembled" string="Zusammengebaut"/> |                 <field name="assembled" string="Zusammengebaut"/> | ||||||
|                 <field name="weight"/> |                 <field name="weight"/> | ||||||
|                 <field name="intrastat_id"/> |                 <field name="intrastat_id" options="{'no_quick_create':True}"/> | ||||||
|                 <field name="notes"/> |                 <field name="notes"/> | ||||||
|             </field> |             </field> | ||||||
|             <div class="oe_title" position="before"> |             <div class="oe_title" position="before"> | ||||||
|  |  | ||||||
|  | @ -91,11 +91,20 @@ | ||||||
|                 </div> |                 </div> | ||||||
|                 <div class="row"> |                 <div class="row"> | ||||||
|                     <div class="col-xs-3" style="padding-right: 4px"> |                     <div class="col-xs-3" style="padding-right: 4px"> | ||||||
|                         <strong> |                         <t t-if="o.state not in ['draft','sent']"> | ||||||
|                             <span class="col-xs-8" style="padding: 0px;width: 58%;">Lieferdatum:</span> |                             <strong> | ||||||
|                         </strong> |                                 <span class="col-xs-8" style="padding: 0px;width: 58%;">Lieferdatum:</span> | ||||||
|                         <span class="col-xs-4" style="padding: 0px;width: 42%;" t-field="o.earliest_scheduled_date" |                             </strong> | ||||||
|                               t-options='{"widget": "date"}'/> |                             <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> |                     </div> | ||||||
|                     <strong> |                     <strong> | ||||||
|                         <span class="col-xs-2">Telefon:</span> |                         <span class="col-xs-2">Telefon:</span> | ||||||
|  | @ -268,9 +277,17 @@ | ||||||
|                         Austausch. |                         Austausch. | ||||||
|                     </p> |                     </p> | ||||||
|                     <t t-if="o.state in ['draft','sent']"> |                     <t t-if="o.state in ['draft','sent']"> | ||||||
|                         <p class="col-xs-12"> |                         <t t-if="o.validity_date"> | ||||||
|                             Gültigkeit: 14 Tage ab Ausstellungsdatum |                             <p class="col-xs-12"> | ||||||
|                         </p> |                                 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"> |                         <p class="col-xs-12"> | ||||||
|                             Auftrag erteilt am: ____________________ |                             Auftrag erteilt am: ____________________ | ||||||
|                         </p> |                         </p> | ||||||
|  |  | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| 
 | 
 | ||||||
| <odoo> | <odoo> | ||||||
|     <!-- Sale Order Body --> |     <!-- Production Order Body --> | ||||||
|     <template id="report_production_document"> |     <template id="report_production_document"> | ||||||
|         <t t-call="web.external_layout"> |         <t t-call="web.external_layout"> | ||||||
|             <t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})"/> |             <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="row height-20"> | ||||||
|                     <div class="col-xs-3" style="padding-right: 4px"> |                     <div class="col-xs-3" style="padding-right: 4px"> | ||||||
|                         <strong> |                         <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> |                         </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"}'/> |                               t-options='{"widget": "date"}'/> | ||||||
|                     </div> |                     </div> | ||||||
|                     <strong> |                     <strong> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue