Feedback 1210: Weiterverrechnung - IC Rechnung
							parent
							
								
									9faa307346
								
							
						
					
					
						commit
						c5eacc1157
					
				|  | @ -68,7 +68,7 @@ class AccountInvoice(models.Model): | ||||||
|         for record in self: |         for record in self: | ||||||
|             if not record.charge_further: |             if not record.charge_further: | ||||||
|                 raise ValidationError(_('Sie müssen mindestens eine Position mit WV markieren.')) |                 raise ValidationError(_('Sie müssen mindestens eine Position mit WV markieren.')) | ||||||
|             if record.charge_further: |             if record.charge_further and not record.reimburse_invoice_id: | ||||||
|                 intercompany_admin_id = record.company_id.admin_user_id |                 intercompany_admin_id = record.company_id.admin_user_id | ||||||
|                 in_invoice_vals = record._prepare_er_invoice_data() |                 in_invoice_vals = record._prepare_er_invoice_data() | ||||||
|                 invoice_id = self.env['account.invoice'].sudo(intercompany_admin_id).create( |                 invoice_id = self.env['account.invoice'].sudo(intercompany_admin_id).create( | ||||||
|  |  | ||||||
|  | @ -42,4 +42,13 @@ | ||||||
|         </field> |         </field> | ||||||
|     </record> |     </record> | ||||||
| 
 | 
 | ||||||
|  |     <record id="action_reimburse_invoice" model="ir.actions.server"> | ||||||
|  |         <field name="name">Intern Weiterverrechnen</field> | ||||||
|  |         <field name="model_id" ref="account.model_account_invoice"/> | ||||||
|  |         <field name="binding_model_id" ref="account.model_account_invoice"/> | ||||||
|  |         <field name="binding_type">action</field> | ||||||
|  |         <field name="state">code</field> | ||||||
|  |         <field name="code">records.reimburse_invoice()</field> | ||||||
|  |     </record> | ||||||
|  | 
 | ||||||
| </odoo> | </odoo> | ||||||
|  |  | ||||||
|  | @ -14,13 +14,4 @@ | ||||||
|         </field> |         </field> | ||||||
|     </record> |     </record> | ||||||
| 
 | 
 | ||||||
|     <record id="action_reimburse_invoice" model="ir.actions.server"> |  | ||||||
|         <field name="name">Intern Weiterverrechnen</field> |  | ||||||
|         <field name="model_id" ref="account.model_account_invoice"/> |  | ||||||
|         <field name="binding_model_id" ref="account.model_account_invoice"/> |  | ||||||
|         <field name="binding_type">action</field> |  | ||||||
|         <field name="state">code</field> |  | ||||||
|         <field name="code">records.reimburse_invoice()</field> |  | ||||||
|     </record> |  | ||||||
| 
 |  | ||||||
| </odoo> | </odoo> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue