Pylint Anpassungen
parent
86b7ce81a9
commit
15eb172fee
|
|
@ -49,10 +49,10 @@ class AccountInvoice(models.Model):
|
|||
@api.multi
|
||||
def _compute_weight_total(self):
|
||||
for record in self:
|
||||
sum = 0
|
||||
_sum = 0
|
||||
for line in record.invoice_line_ids:
|
||||
sum += line.product_id.weight * line.quantity
|
||||
record.weight_total = sum
|
||||
_sum += line.product_id.weight * line.quantity
|
||||
record.weight_total = _sum
|
||||
|
||||
@api.multi
|
||||
def _compute_positions(self):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# 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).
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class CommissionAccount(models.Model):
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class IrUiMenu(models.Model):
|
|||
def _filter_visible_menus(self):
|
||||
if self.env.uid != 1:
|
||||
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)
|
||||
|
||||
ids = super(IrUiMenu, self)._filter_visible_menus()
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import requests
|
||||
import json
|
||||
import requests
|
||||
|
||||
from odoo import tools, api, fields, models, _
|
||||
from odoo.exceptions import ValidationError
|
||||
|
|
@ -198,7 +198,7 @@ class Partner(models.Model):
|
|||
elif self.env.context.get('sst_11', False):
|
||||
common_list.extend(['name', 'ref', 'partner_sector_id', 'comment', 'vat', 'property_payment_term_id',
|
||||
'property_pricelist_id', 'date_vat_check', 'active', 'property_product_pricelist',
|
||||
'retail_partner_id', 'retailer','info_uid'])
|
||||
'retail_partner_id', 'retailer', 'info_uid'])
|
||||
return common_list
|
||||
else:
|
||||
return super(Partner, self)._get_specified_fields()
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@ class SaleOrder(models.Model):
|
|||
@api.multi
|
||||
def _compute_weight_total(self):
|
||||
for record in self:
|
||||
sum = 0
|
||||
_sum = 0
|
||||
for line in record.order_line:
|
||||
sum += (line.lot_id.weight or line.product_id.weight) * line.product_uom_qty
|
||||
record.weight_total = sum
|
||||
_sum += (line.lot_id.weight or line.product_id.weight) * line.product_uom_qty
|
||||
record.weight_total = _sum
|
||||
|
||||
@api.multi
|
||||
def _compute_positions(self):
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class WizardConfirmProduction(models.TransientModel):
|
|||
if so.assembly_state == 'created' and so.state == 'sale':
|
||||
so.assembly_state = 'approved'
|
||||
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['domain'] = [('id', 'in', active_ids)]
|
||||
return action
|
||||
|
|
|
|||
Loading…
Reference in New Issue