fix of bank account displayed in report_template; new wizard 'confirm null invoice'
							parent
							
								
									dcb7e5dbdb
								
							
						
					
					
						commit
						7e4140ce0c
					
				|  | @ -42,6 +42,7 @@ | ||||||
|     ], |     ], | ||||||
|     'data': [ |     'data': [ | ||||||
|         'views/commission_account.xml', |         'views/commission_account.xml', | ||||||
|  |         'wizards/wizard_confirm_null_invoice.xml', | ||||||
|         'wizards/wizard_confirm_production.xml', |         'wizards/wizard_confirm_production.xml', | ||||||
|         'wizards/wizard_import_tzbox.xml', |         'wizards/wizard_import_tzbox.xml', | ||||||
|         'wizards/wizard_reset_order.xml', |         'wizards/wizard_reset_order.xml', | ||||||
|  |  | ||||||
|  | @ -80,6 +80,17 @@ class AccountInvoice(models.Model): | ||||||
|     num_items = fields.Integer(string='Anzahl der Artikel', compute='_compute_num_items') |     num_items = fields.Integer(string='Anzahl der Artikel', compute='_compute_num_items') | ||||||
|     weight_total = fields.Float(string='Gesamtgewicht', compute='_compute_weight_total') |     weight_total = fields.Float(string='Gesamtgewicht', compute='_compute_weight_total') | ||||||
| 
 | 
 | ||||||
|  |     @api.multi | ||||||
|  |     def action_invoice_open(self): | ||||||
|  |         to_open_invoices = self.filtered(lambda inv: inv.state != 'open') | ||||||
|  |         if to_open_invoices.filtered(lambda inv: inv.amount_total != 0) or self.env.context.get('confirmed', False): | ||||||
|  |             res = super(AccountInvoice, self).action_invoice_open() | ||||||
|  |             return res | ||||||
|  | 
 | ||||||
|  |         action = self.env.ref('dp_custom.action_wizard_confirm_null_invoice').read()[0] | ||||||
|  |         action['context'] = str({"invoice_ids": self.env.context.get("active_ids")}) | ||||||
|  |         return action | ||||||
|  | 
 | ||||||
|     @api.multi |     @api.multi | ||||||
|     def _compute_weight_total(self): |     def _compute_weight_total(self): | ||||||
|         for record in self: |         for record in self: | ||||||
|  |  | ||||||
|  | @ -6,6 +6,14 @@ | ||||||
|         <field name="model">account.invoice</field> |         <field name="model">account.invoice</field> | ||||||
|         <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 position="attributes" expr="//button[@name='action_invoice_open']"> | ||||||
|  |                 <attribute name="invisible">True</attribute> | ||||||
|  |             </xpath> | ||||||
|  |             <xpath position="before" expr="//button[@name='action_invoice_open']"> | ||||||
|  |                 <button name="%(action_wizard_confirm_null_invoice)d" type="action" string="Validate" states="draft" class="oe_highlight o_invoice_validate" groups="account.group_account_invoice"/> | ||||||
|  |             </xpath> | ||||||
|  | --> | ||||||
|             <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" options="{'no_quick_create':True}"/> |                 <field name="intrastat_id" options="{'no_quick_create':True}"/> | ||||||
|             </xpath> |             </xpath> | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| from . import wizard_confirm_production | from . import wizard_confirm_production | ||||||
| from . import wizard_import_tzbox | from . import wizard_import_tzbox | ||||||
|  | from . import wizard_confirm_null_invoice | ||||||
| from . import wizard_confirm_print_invoice | from . import wizard_confirm_print_invoice | ||||||
| from . import portal_assign_company | from . import portal_assign_company | ||||||
| from . import wizard_reset_order | from . import wizard_reset_order | ||||||
|  |  | ||||||
|  | @ -102,12 +102,12 @@ | ||||||
|                         <!-- <span>Raiffeisenbank Spannberg</span> --> |                         <!-- <span>Raiffeisenbank Spannberg</span> --> | ||||||
|                     <strong> |                     <strong> | ||||||
|                         IBAN: |                         IBAN: | ||||||
|                         <span t-if="company.bank_ids" t-esc="company.bank_ids[0].acc_number"/> |                         <span t-if="company.partner_id.bank_ids" t-esc="company.partner_id.bank_ids[0].acc_number"/> | ||||||
|                         · |                         · | ||||||
|                         BIC: |                         BIC: | ||||||
|                         <span t-if="company.bank_ids" t-esc="company.bank_ids[0].bank_id.bic"/> |                         <span t-if="company.partner_id.bank_ids" t-esc="company.partner_id.bank_ids[0].bank_id.bic"/> | ||||||
|                         · |                         · | ||||||
|                         <span t-if="company.bank_ids" t-esc="company.bank_ids[0].bank_id.name"/> |                         <span t-if="company.partner_id.bank_ids" t-esc="company.partner_id.bank_ids[0].bank_id.name"/> | ||||||
|                     </strong> |                     </strong> | ||||||
|                 </div> |                 </div> | ||||||
|             </div> |             </div> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue