Feedback 1817: Textbaustein - FM
							parent
							
								
									069d3c7a80
								
							
						
					
					
						commit
						0dfe2ccbec
					
				|  | @ -3,7 +3,7 @@ | ||||||
| 
 | 
 | ||||||
| # noinspection PyStatementEffect | # noinspection PyStatementEffect | ||||||
| { | { | ||||||
|     'name': 'dp Order line comments', |     'name': 'dp line comments', | ||||||
|     'summary': 'Comments templates on invoice and sale lines', |     'summary': 'Comments templates on invoice and sale lines', | ||||||
|     'version': '11.0.1.0.0', |     'version': '11.0.1.0.0', | ||||||
|     'license': 'OPL-1', |     'license': 'OPL-1', | ||||||
|  |  | ||||||
|  | @ -17,7 +17,12 @@ class AddLineComment(models.TransientModel): | ||||||
|     def _onchange_note_line(self): |     def _onchange_note_line(self): | ||||||
|         comment = self.comment_line_template_id |         comment = self.comment_line_template_id | ||||||
|         if comment: |         if comment: | ||||||
|             self.note_line = comment.get_value(self.env[self.env.context.get('model_name')].browse([self.env.context.get('model_id')]).partner_id.id) |             model_name = self.env.context.get('model_name') | ||||||
|  |             model_id = self.env.context.get('model_id') | ||||||
|  |             if model_name == 'sale.order.line': | ||||||
|  |                 self.note_line = comment.get_value(self.env[model_name].browse([model_id]).order_id.partner_id.id) | ||||||
|  |             if model_name == 'account.invoice.line': | ||||||
|  |                 self.note_line = comment.get_value(self.env[model_name].browse([model_id]).invoice_id.partner_id.id) | ||||||
| 
 | 
 | ||||||
|     def add_line_comment(self): |     def add_line_comment(self): | ||||||
|         self.ensure_one() |         self.ensure_one() | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue