Merge branch 'develop' of ssh://gitlab.datenpol.at:122/odoo/tz-austria into develop
						commit
						a014a63ba5
					
				|  | @ -28,6 +28,8 @@ class MaterialType(models.Model): | |||
| 
 | ||||
|     name = fields.Char(string='Bezeichnung', required=True) | ||||
|     print_default_code = fields.Boolean(string='Drucke Artikelnummer', required=True, help='Definiert, ob die Artikelnummer gedruckt wird') | ||||
|     print_sales_pic = fields.Boolean(string='Drucke Artikelbild', default=True, required=False, help='Definiert, ob ein Artikelbild gedruckt wird (Angebot/Auftrag)') | ||||
|     print_production_pic = fields.Boolean(string='Drucke Produktionsbild', default=False, required=False, help='Definiert, ob ein Produktionsbild gedruckt wird (Produktionsauftrag)') | ||||
| 
 | ||||
|     _sql_constraints = [ | ||||
|         ('name_uniq', 'unique(name)', 'Die Bezeichnung muss eindeutig sein') | ||||
|  |  | |||
|  | @ -60,6 +60,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): | ||||
|         """ | ||||
|  |  | |||
|  | @ -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"> | ||||
|  |  | |||
|  | @ -9,6 +9,8 @@ | |||
|                 <group> | ||||
|                     <field name="name"/> | ||||
|                     <field name="print_default_code"/> | ||||
|                     <field name="print_sales_pic"/> | ||||
|                     <field name="print_production_pic"/> | ||||
|                 </group> | ||||
|             </form> | ||||
|         </field> | ||||
|  | @ -21,6 +23,8 @@ | |||
|             <tree> | ||||
|                 <field name="name"/> | ||||
|                 <field name="print_default_code"/> | ||||
|                 <field name="print_sales_pic"/> | ||||
|                 <field name="print_production_pic"/> | ||||
|             </tree> | ||||
|         </field> | ||||
|     </record> | ||||
|  |  | |||
|  | @ -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"/> | ||||
|  | @ -156,6 +158,7 @@ | |||
|         <field name="arch" type="xml"> | ||||
|             <field name="partner_id" position="after"> | ||||
|                 <field name="partner_invoice_id"/> | ||||
|                 <field name="partner_shipping_id" invisible="1"/> | ||||
|             </field> | ||||
|             <field name="name" position="after"> | ||||
|                 <field name="order_type"/> | ||||
|  | @ -171,6 +174,7 @@ | |||
|         <field name="arch" type="xml"> | ||||
|             <field name="partner_id" position="after"> | ||||
|                 <field name="partner_invoice_id"/> | ||||
|                 <field name="partner_shipping_id" invisible="1"/> | ||||
|             </field> | ||||
|             <field name="name" position="after"> | ||||
|                 <field name="order_type"/> | ||||
|  | @ -190,9 +194,19 @@ | |||
|             <field name="name" position="after"> | ||||
|                 <field name="client_order_ref"/> | ||||
|                 <field name="origin"/> | ||||
|                 <field name="assembly_state" string="PG Status"/> | ||||
|                 <field name="confirmation_nr"/> | ||||
|                 <field name="assembly_state"/> | ||||
|                 <field name="order_type"/> | ||||
|             </field> | ||||
| <!-- | ||||
|             <field name="partner_id" position="after"> | ||||
|                 <field name="partner_shipping_id"/> | ||||
|                 <field name="partner_invoice_id"/> | ||||
|             </field> | ||||
| --> | ||||
|             <field name="partner_id" position="replace"> | ||||
|                 <field name="partner_id"  string="Kunde" filter_domain="['|','|',('partner_id','ilike',self),('partner_shipping_id','ilike',self),('partner_invoice_id','ilike',self)]"/> | ||||
|             </field> | ||||
|             <filter name="customer" position="after"> | ||||
|                 <filter string="PG Status" domain="[]" context="{'group_by':'assembly_state'}"/> | ||||
|                 <filter string="Rechnungsadresse" domain="[]" context="{'group_by':'partner_invoice_id'}"/> | ||||
|  |  | |||
|  | @ -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"> | ||||
|  |  | |||
|  | @ -91,11 +91,20 @@ | |||
|                 </div> | ||||
|                 <div class="row"> | ||||
|                     <div class="col-xs-3" style="padding-right: 4px"> | ||||
|                         <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']"> | ||||
|                         <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> | ||||
|  |  | |||
|  | @ -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> | ||||
|  | @ -172,9 +172,9 @@ | |||
|                             </tr> | ||||
|                             <tr> | ||||
|                                 <td colspan="2" style="border: 0;text-align: center;"> | ||||
|                                     <img t-if="order_line.lot_id.image_medium" | ||||
|                                     <img t-if="order_line.lot_id.image_medium and order_line.product_id.material_type_id.print_production_pic" | ||||
|                                          t-att-src="'data:image/png;base64,%s' % order_line.lot_id.image_medium.decode()" style="max-width: 128px;"/> | ||||
|                                     <img t-if="not order_line.lot_id.image_medium and order_line.product_id.image_medium" | ||||
|                                     <img t-if="not order_line.lot_id.image_medium and order_line.product_id.image_medium and order_line.product_id.material_type_id.print_production_pic" | ||||
|                                          t-att-src="'data:image/png;base64,%s' % order_line.product_id.image_medium.decode()" style="max-width: 128px;"/> | ||||
|                                 </td> | ||||
|                             </tr> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue