Pylint Anpassungen
							parent
							
								
									86b7ce81a9
								
							
						
					
					
						commit
						15eb172fee
					
				|  | @ -49,10 +49,10 @@ class AccountInvoice(models.Model): | ||||||
|     @api.multi |     @api.multi | ||||||
|     def _compute_weight_total(self): |     def _compute_weight_total(self): | ||||||
|         for record in self: |         for record in self: | ||||||
|             sum = 0 |             _sum = 0 | ||||||
|             for line in record.invoice_line_ids: |             for line in record.invoice_line_ids: | ||||||
|                 sum += line.product_id.weight * line.quantity |                 _sum += line.product_id.weight * line.quantity | ||||||
|             record.weight_total = sum |             record.weight_total = _sum | ||||||
| 
 | 
 | ||||||
|     @api.multi |     @api.multi | ||||||
|     def _compute_positions(self): |     def _compute_positions(self): | ||||||
|  |  | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| # Copyright 2018-Today datenpol gmbh (<http://www.datenpol.at>) | # Copyright 2018-Today datenpol gmbh (<http://www.datenpol.at>) | ||||||
| # License OPL-1 or later (https://www.odoo.com/documentation/user/11.0/legal/licenses/licenses.html#licenses). | # License OPL-1 or later (https://www.odoo.com/documentation/user/11.0/legal/licenses/licenses.html#licenses). | ||||||
| 
 | 
 | ||||||
| from odoo import api, fields, models, _ | from odoo import fields, models | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class CommissionAccount(models.Model): | class CommissionAccount(models.Model): | ||||||
|  |  | ||||||
|  | @ -42,7 +42,7 @@ class IrUiMenu(models.Model): | ||||||
|     def _filter_visible_menus(self): |     def _filter_visible_menus(self): | ||||||
|         if self.env.uid != 1: |         if self.env.uid != 1: | ||||||
|             disabled_ids = self.get_disabled_menu_ids() |             disabled_ids = self.get_disabled_menu_ids() | ||||||
|             ids = [id for id in self.ids if id not in disabled_ids] |             ids = [_id for _id in self.ids if _id not in disabled_ids] | ||||||
|             self = self.browse(ids) |             self = self.browse(ids) | ||||||
| 
 | 
 | ||||||
|         ids = super(IrUiMenu, self)._filter_visible_menus() |         ids = super(IrUiMenu, self)._filter_visible_menus() | ||||||
|  |  | ||||||
|  | @ -18,8 +18,8 @@ | ||||||
| #    along with this program.  If not, see <http://www.gnu.org/licenses/>. | #    along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||||
| # | # | ||||||
| ############################################################################## | ############################################################################## | ||||||
| import requests |  | ||||||
| import json | import json | ||||||
|  | import requests | ||||||
| 
 | 
 | ||||||
| from odoo import tools, api, fields, models, _ | from odoo import tools, api, fields, models, _ | ||||||
| from odoo.exceptions import ValidationError | from odoo.exceptions import ValidationError | ||||||
|  |  | ||||||
|  | @ -54,10 +54,10 @@ class SaleOrder(models.Model): | ||||||
|     @api.multi |     @api.multi | ||||||
|     def _compute_weight_total(self): |     def _compute_weight_total(self): | ||||||
|         for record in self: |         for record in self: | ||||||
|             sum = 0 |             _sum = 0 | ||||||
|             for line in record.order_line: |             for line in record.order_line: | ||||||
|                 sum += (line.lot_id.weight or line.product_id.weight) * line.product_uom_qty |                 _sum += (line.lot_id.weight or line.product_id.weight) * line.product_uom_qty | ||||||
|             record.weight_total = sum |             record.weight_total = _sum | ||||||
| 
 | 
 | ||||||
|     @api.multi |     @api.multi | ||||||
|     def _compute_positions(self): |     def _compute_positions(self): | ||||||
|  |  | ||||||
|  | @ -21,7 +21,7 @@ class WizardConfirmProduction(models.TransientModel): | ||||||
|                     if so.assembly_state == 'created' and so.state == 'sale': |                     if so.assembly_state == 'created' and so.state == 'sale': | ||||||
|                         so.assembly_state = 'approved' |                         so.assembly_state = 'approved' | ||||||
|                     else: |                     else: | ||||||
|                         raise ValidationError(u'Auftrag %s: Bitte prüfen Sie den PG-Status und/oder Auftragsstatus.' % so.name) |                         raise ValidationError(_('Auftrag %s: Bitte prüfen Sie den PG-Status und/oder Auftragsstatus.' % so.name)) | ||||||
|             action = self.env.ref('sale.action_orders').read()[0] |             action = self.env.ref('sale.action_orders').read()[0] | ||||||
|             action['domain'] = [('id', 'in', active_ids)] |             action['domain'] = [('id', 'in', active_ids)] | ||||||
|             return action |             return action | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue