Feedback 11,12,13,14 + 10
							parent
							
								
									5dcd7e17be
								
							
						
					
					
						commit
						43da993030
					
				|  | @ -67,3 +67,9 @@ class AccountInvoice(models.Model): | |||
|                 if line.uom_id == self.env.ref('product.product_uom_unit'): # wenn die Mengeneinheit Stk. ist | ||||
|                     num_items += line.quantity | ||||
|             record.num_items = num_items | ||||
| 
 | ||||
|     @api.multi | ||||
|     def invoice_print(self): | ||||
|         self.ensure_one() | ||||
|         self.sent = True | ||||
|         return self.env.ref('account.account_invoices_without_payment').report_action(self) | ||||
|  |  | |||
|  | @ -318,7 +318,7 @@ class SaleOrder(models.Model): | |||
|     @api.multi | ||||
|     def action_confirm(self): | ||||
|         # change name on order confirmation | ||||
|         if self.state == 'draft' and self.name.startswith('ATOF'): | ||||
|         if self.name.startswith('ATOF'): | ||||
|             new_name = re.sub(r"^ATOF", "ATOC", self.name) | ||||
|             self.name = new_name | ||||
|         return super(SaleOrder, self).action_confirm() | ||||
|  |  | |||
|  | @ -74,9 +74,21 @@ | |||
|         <field name="view_mode">tree,form</field> | ||||
|     </record> | ||||
| 
 | ||||
|     <menuitem id="sale_partner_menu" | ||||
|               name="Kunden" | ||||
|               parent="sale.sale_menu_root" | ||||
|               sequence="1"/> | ||||
| 
 | ||||
|     <menuitem id="sale.res_partner_menu" | ||||
|               parent="sale_partner_menu" | ||||
|               action="base.action_partner_form" | ||||
|               sequence="10" | ||||
|               groups="sales_team.group_sale_salesman"/> | ||||
| 
 | ||||
|     <menuitem id="menu_res_partner_portal" | ||||
|               parent="sale.sale_order_menu" | ||||
|               parent="sale_partner_menu" | ||||
|               name="Neue Portalkunden" | ||||
|               sequence="20" | ||||
|               action="res_partner_portal_action"/> | ||||
| 
 | ||||
|     <record id="res_partner_sector_form_view" model="ir.ui.view"> | ||||
|  |  | |||
|  | @ -67,17 +67,17 @@ | |||
|     </record> | ||||
| 
 | ||||
|     <record id="view_sales_order_filter_assembly" model="ir.ui.view"> | ||||
|     <field name="name">view.sales.order.filter.assembly</field> | ||||
|     <field name="model">sale.order</field> | ||||
|     <field name="inherit_id" ref="sale.view_sales_order_filter"/> | ||||
|     <field name="arch" type="xml"> | ||||
|         <field name="name" position="after"> | ||||
|             <field name="assembly_state" string="PG Status" filter_domain="[('assembly_state','ilike',self)]"/> | ||||
|         <field name="name">view.sales.order.filter.assembly</field> | ||||
|         <field name="model">sale.order</field> | ||||
|         <field name="inherit_id" ref="sale.view_sales_order_filter"/> | ||||
|         <field name="arch" type="xml"> | ||||
|             <field name="name" position="after"> | ||||
|                 <field name="assembly_state" string="PG Status" filter_domain="[('assembly_state','ilike',self)]"/> | ||||
|             </field> | ||||
|             <filter name="customer" position="after"> | ||||
|                 <filter string="PG Status" domain="[]" context="{'group_by':'assembly_state'}"/> | ||||
|             </filter> | ||||
|         </field> | ||||
|         <filter name="customer" position="after"> | ||||
|             <filter string="PG Status" domain="[]" context="{'group_by':'assembly_state'}"/> | ||||
|         </filter> | ||||
|     </field> | ||||
| </record> | ||||
|     </record> | ||||
| 
 | ||||
| </odoo> | ||||
|  |  | |||
|  | @ -4,13 +4,15 @@ | |||
| { | ||||
|     'name': 'datepol Report-Anpassungen', | ||||
|     'category': 'Custom', | ||||
|     'version': '1.0', | ||||
|     'version': '11.0.1.0.0', | ||||
|     'summary': """Individuelle Report Anpassungen""", | ||||
|     'description': """Individuelle Report Anpassungen""", | ||||
|     'author': 'datenpol gmbh', | ||||
|     'website': 'http://www.datenpol.at/', | ||||
|     'depends': [ | ||||
|         'account_invoicing' | ||||
|         'account_invoicing', | ||||
|         'report_intrastat', | ||||
|         'dp_reports', | ||||
|     ], | ||||
|     'data': [ | ||||
|         'reports/invoice.xml', | ||||
|  |  | |||
|  | @ -18,4 +18,10 @@ class AccountInvoice(models.Model): | |||
|                     uncategorized = page.pop(idx2) | ||||
|             if uncategorized: | ||||
|                 res[idx1] = [uncategorized] + res[idx1] | ||||
|         for page in res: | ||||
|             for category in page: | ||||
|                 price_subtotal = 0.0 | ||||
|                 for line in category['lines']: | ||||
|                     price_subtotal += line.price_subtotal | ||||
|                 category['price_subtotal'] = price_subtotal | ||||
|         return res | ||||
|  |  | |||
|  | @ -1,34 +1,36 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <odoo> | ||||
|     <data> | ||||
|         <!-- Invoice Body --> | ||||
|         <template id="report_invoice_document"> | ||||
|             <t t-call="web.external_layout"> | ||||
|                 <t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})"/> | ||||
|                 <div class="page"> | ||||
|     <!-- Invoice Body --> | ||||
|     <template id="report_invoice_document"> | ||||
|         <t t-call="web.external_layout"> | ||||
|             <t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})"/> | ||||
|             <div class="page"> | ||||
|                 <div class="row"> | ||||
|                     <div class="col-xs-3"> | ||||
|                         <t t-call="dp_reports.partner_data"/> | ||||
|                     </div> | ||||
|                     <div class="col-xs-3"> | ||||
|                         <strong>Lieferadresse</strong> | ||||
|                         <div class="partner-data"> | ||||
|                             <span t-esc="o.partner_shipping_id.name"/> | ||||
|                             <span t-esc="o.partner_shipping_id.street"/><br/> | ||||
|                             <span t-esc="o.partner_shipping_id.zip"/> <span t-esc="o.partner_shipping_id.city"/><br/> | ||||
|                             <span t-esc="o.partner_shipping_id.country_id.name"/> | ||||
|                         </div> | ||||
|                     </div> | ||||
|                     <div class="col-xs-3"> | ||||
|                     <div class="col-xs-9"> | ||||
|                         <strong>Rechnungsadresse</strong> | ||||
|                         <div class="partner-data"> | ||||
|                             <span t-esc="o.partner_id.name"/><br/> | ||||
|                             <span t-esc="o.partner_id.street"/><br/> | ||||
|                             <span t-esc="o.partner_id.zip"/> <span t-esc="o.partner_id.city"/><br/> | ||||
|                             <t t-if="o.partner_id.country_id"><span t-esc="o.partner_id.country_id.name"/><br/></t> | ||||
|                             <t t-if="o.partner_id.email"><span t-esc="o.partner_id.email"/><br/></t> | ||||
|                             <t t-if="o.partner_id.phone"><span t-esc="o.partner_id.phone"/><br/></t> | ||||
|                             <t t-if="o.partner_id.vat">UID-Nr.: <span t-esc="o.partner_id.vat"/></t> | ||||
|                             <span t-esc="o.partner_id.name"/> | ||||
|                             <br/> | ||||
|                             <span t-esc="o.partner_id.street"/> | ||||
|                             <br/> | ||||
|                             <span t-esc="o.partner_id.zip"/> | ||||
|                             <span t-esc="o.partner_id.city"/> | ||||
|                             <br/> | ||||
|                             <t t-if="o.partner_id.country_id"> | ||||
|                                 <span t-esc="o.partner_id.country_id.name"/> | ||||
|                                 <br/> | ||||
|                             </t> | ||||
|                             <t t-if="o.partner_id.email"> | ||||
|                                 <span t-esc="o.partner_id.email"/> | ||||
|                                 <br/> | ||||
|                             </t> | ||||
|                             <t t-if="o.partner_id.phone"> | ||||
|                                 <span t-esc="o.partner_id.phone"/> | ||||
|                                 <br/> | ||||
|                             </t> | ||||
|                             <t t-if="o.partner_id.vat">UID-Nr.: | ||||
|                                 <span t-esc="o.partner_id.vat"/> | ||||
|                             </t> | ||||
|                         </div> | ||||
|                     </div> | ||||
|                     <div class="col-xs-3"> | ||||
|  | @ -38,32 +40,45 @@ | |||
|                 <div class="row mt32"/> | ||||
|                 <div class="row height-20"> | ||||
|                     <div class="col-xs-3"> | ||||
|                         <strong><span class="col-xs-8" style="padding: 0px">Kundennr.:</span></strong> | ||||
|                         <strong> | ||||
|                             <span class="col-xs-8" style="padding: 0px">Kundennr.:</span> | ||||
|                         </strong> | ||||
|                         <span class="col-xs-4" style="padding: 0px" t-field="o.partner_id.ref"/> | ||||
|                     </div> | ||||
|                     <strong><span class="col-xs-2">Ansprechpartner:</span></strong> | ||||
|                     <strong> | ||||
|                         <span class="col-xs-2">Ansprechpartner:</span> | ||||
|                     </strong> | ||||
|                     <span class="col-xs-3" t-field="o.user_id"/> | ||||
|                     <strong><span class="col-xs-2">Positionen:</span></strong> | ||||
|                     <strong> | ||||
|                         <span class="col-xs-2">Positionen:</span> | ||||
|                     </strong> | ||||
|                     <span class="col-xs-2" t-field="o.positions"/> | ||||
|                 </div> | ||||
|                 <div class="row height-20"> | ||||
|                     <div class="col-xs-3"> | ||||
|                         <strong><span class="col-xs-8" style="padding: 0px">Rechnungsdatum:</span></strong> | ||||
|                         <strong> | ||||
|                             <span class="col-xs-8" style="padding: 0px">Rechnungsdatum:</span> | ||||
|                         </strong> | ||||
|                         <span class="col-xs-4" style="padding: 0px" t-field="o.date_invoice"/> | ||||
|                     </div> | ||||
|                     <strong><span class="col-xs-2">Email:</span></strong> | ||||
|                     <strong> | ||||
|                         <span class="col-xs-2">Email:</span> | ||||
|                     </strong> | ||||
|                     <span class="col-xs-3" t-field="o.user_id.email"/> | ||||
|                     <strong><span class="col-xs-2">Artikel:</span></strong> | ||||
|                     <strong> | ||||
|                         <span class="col-xs-2">Artikel:</span> | ||||
|                     </strong> | ||||
|                     <span class="col-xs-2" t-field="o.num_items"/> | ||||
|                 </div> | ||||
|                 <div class="row"> | ||||
|                     <div class="col-xs-3"> | ||||
|                         <strong><span class="col-xs-8" style="padding: 0px">Lieferdatum:</span></strong> | ||||
|                         <span class="col-xs-4" style="padding: 0px">?????????</span> | ||||
|                     </div> | ||||
|                     <strong><span class="col-xs-2">Telefon:</span></strong> | ||||
|                     <div class="col-xs-3"/> | ||||
|                     <strong> | ||||
|                         <span class="col-xs-2">Telefon:</span> | ||||
|                     </strong> | ||||
|                     <span class="col-xs-3" t-field="o.user_id.phone"/> | ||||
|                     <strong><span class="col-xs-2">Bezeichnung:</span></strong> | ||||
|                     <strong> | ||||
|                         <span class="col-xs-2">Bezeichnung:</span> | ||||
|                     </strong> | ||||
|                     <span class="col-xs-2" t-field="o.name"/> | ||||
|                 </div> | ||||
|                 <div class="row mt32"/> | ||||
|  | @ -87,12 +102,20 @@ | |||
|                             <t t-set="pos_nr" t-value="0"/> | ||||
|                             <t t-foreach="page" t-as="layout_category"> | ||||
|                                 <tr t-if="layout_category['name'] != 'Uncategorized'"> | ||||
|                                     <td colspan="7"> | ||||
|                                         <strong><t t-esc="layout_category['name']"/></strong> | ||||
|                                     <td colspan="6"> | ||||
|                                         <strong> | ||||
|                                             <t t-esc="layout_category['name']"/> | ||||
|                                         </strong> | ||||
|                                     </td> | ||||
|                                     <td class="text-right" t-if="discount_is_set"/> | ||||
|                                     <td class="text-right" id="subtotal"> | ||||
|                                         <strong> | ||||
|                                             <span t-esc="layout_category['price_subtotal']" | ||||
|                                                   t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> | ||||
|                                         </strong> | ||||
|                                     </td> | ||||
|                                 </tr> | ||||
|                                 <t t-foreach="layout_category['lines']" t-as="invoice_line"> | ||||
|                                 <!-- <t t-foreach="o.invoice_line_ids" t-as="invoice_line"> --> | ||||
|                                     <tr> | ||||
|                                         <t t-set="pos_nr" t-value="pos_nr+1"/> | ||||
|                                         <td class="text-center"> | ||||
|  | @ -102,7 +125,8 @@ | |||
|                                             <span t-field="invoice_line.quantity"/> | ||||
|                                         </td> | ||||
|                                         <td class="text-right"> | ||||
|                                             <span t-field="invoice_line.product_id.weight"/> kg | ||||
|                                             <span t-field="invoice_line.product_id.weight"/> | ||||
|                                             kg | ||||
|                                         </td> | ||||
|                                         <td class="text-right"> | ||||
|                                         </td> | ||||
|  | @ -187,7 +211,8 @@ | |||
|                     </p> | ||||
|                     <p class="col-xs-12"> | ||||
|                         Gesamtgewicht: | ||||
|                         <span t-esc="round(o.weight_total, 2)"/> kg | ||||
|                         <span t-esc="round(o.weight_total, 2)"/> | ||||
|                         kg | ||||
|                         <br/> | ||||
|                     </p> | ||||
|                     <p class="col-xs-12" t-if="o.incoterms_id.name"> | ||||
|  | @ -200,31 +225,31 @@ | |||
|                         <span t-esc="o.payment_term_id.name"/> | ||||
|                         <br/> | ||||
|                     </p> | ||||
|                     <p class="col-xs-12"> | ||||
|                         EORI-Nr.: | ||||
|                         <span t-esc="o.user_id.company_id.eori_nr"/> | ||||
|                         <br/> | ||||
|                     </p> | ||||
|                 </div> | ||||
|                 </div> | ||||
|             </t> | ||||
|         </template> | ||||
|             </div> | ||||
|         </t> | ||||
|     </template> | ||||
| 
 | ||||
|         <template id="account.report_invoice"> | ||||
|             <t t-call="web.html_container"> | ||||
|                 <t t-foreach="docs" t-as="o"> | ||||
|                     <t t-call="dp_reports_account.report_invoice_document" t-lang="o.partner_id.lang"/> | ||||
|                 </t> | ||||
|     <template id="account.report_invoice"> | ||||
|         <t t-call="web.html_container"> | ||||
|             <t t-foreach="docs" t-as="o"> | ||||
|                 <t t-call="dp_reports_account.report_invoice_document" t-lang="o.partner_id.lang"/> | ||||
|             </t> | ||||
|         </template> | ||||
| 
 | ||||
|     </data> | ||||
|         </t> | ||||
|     </template> | ||||
| 
 | ||||
|     <record id="account.account_invoices" model="ir.actions.report"> | ||||
|         <field name="paperformat_id" ref="dp_reports.paperformat_a4_european"/> | ||||
|         <field name="binding_model_id" eval="False"/> | ||||
|     </record> | ||||
| 
 | ||||
|     <record id="report_intrastat.account_intrastatinvoices" model="ir.actions.report"> | ||||
|         <field name="paperformat_id" ref="dp_reports.paperformat_a4_european"/> | ||||
|         <field name="binding_model_id" eval="False"/> | ||||
|     </record> | ||||
| 
 | ||||
|     <record id="account.account_invoices_without_payment" model="ir.actions.report"> | ||||
|         <field name="name">Rechnungen</field> | ||||
|         <field name="paperformat_id" ref="dp_reports.paperformat_a4_european"/> | ||||
|     </record> | ||||
| </odoo> | ||||
|  |  | |||
|  | @ -12,7 +12,8 @@ class SaleOrder(models.Model): | |||
|     @api.multi | ||||
|     def _compute_delivery_date(self): | ||||
|         for order in self: | ||||
|             lines = order.order_line.sorted(key=lambda d: d.delivery_date) | ||||
|             lines = order.order_line.filtered(lambda d: d.delivery_date) | ||||
|             lines = lines.sorted(key=lambda d: fields.Date.from_string(d.delivery_date)) | ||||
|             if lines: | ||||
|                 order.delivery_date = lines[0].delivery_date | ||||
| 
 | ||||
|  |  | |||
|  | @ -23,7 +23,7 @@ class ConfigTZA(Config): | |||
|             'vat': 'ATU 54619104', | ||||
|             'vat_check_vies': True, | ||||
|             'logo': '../ext/custom-addons/dp_custom/static/src/img/logo.png', | ||||
|             'eori_nr': 'ATEOSI 0000 11273', | ||||
|             'eori_nr': 'ATEOS 100011273', | ||||
|             #'favicon_backend': '../ext/custom-addons/dp_custom/static/src/img/favicon.ico', | ||||
|             #'favicon_backend_mimetype': 'image/x-icon' | ||||
|         } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue