Fall 1278: Feedback vom Workshop - 09.01.2018, US01 umgesetzt.
							parent
							
								
									7efa7c4fba
								
							
						
					
					
						commit
						c4b7f76025
					
				|  | @ -18,6 +18,7 @@ | |||
| #    along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||
| # | ||||
| ############################################################################## | ||||
| import re | ||||
| from datetime import datetime | ||||
| 
 | ||||
| from odoo import api, fields, models, _ | ||||
|  | @ -297,6 +298,14 @@ class SaleOrder(models.Model): | |||
|                                            subtype_id=self.env.ref('mail.mt_note').id) | ||||
|         return [inv.id for inv in invoices.values()] | ||||
| 
 | ||||
|     @api.multi | ||||
|     def action_confirm(self): | ||||
|         # change name on order confirmation | ||||
|         if self.state == 'draft' and self.name.startswith('ATOF'): | ||||
|             new_name = re.sub(r"^ATOF", "ATOC", self.name) | ||||
|             self.name = new_name | ||||
|         return super(SaleOrder, self).action_confirm() | ||||
| 
 | ||||
| 
 | ||||
| class SaleOrderLine(models.Model): | ||||
|     _inherit = 'sale.order.line' | ||||
|  |  | |||
|  | @ -35,7 +35,7 @@ class ConfigGlaser(Config): | |||
|         self.sequences = { | ||||
|             'sale.order': { | ||||
|                 # 'number_next_actual': 1, | ||||
|                 'prefix': 'ATOC%(range_y)s-', | ||||
|                 'prefix': 'ATOF%(range_y)s-', | ||||
|                 'padding': 6, | ||||
|                 'use_date_range': True, | ||||
|                 'monthly_date_range': False | ||||
|  |  | |||
|  | @ -36,7 +36,7 @@ class ConfigTZA(Config): | |||
|         self.sequences = { | ||||
|             'sale.order': { | ||||
|                 # 'number_next_actual': 1, | ||||
|                 'prefix': 'ATOC%(range_y)s-', | ||||
|                 'prefix': 'ATOF%(range_y)s-', | ||||
|                 'padding': 6, | ||||
|                 'use_date_range': True, | ||||
|                 'monthly_date_range': False | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue