Skip to content

Commit

Permalink
pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rvalyi committed May 20, 2021
1 parent 7862e66 commit f0e4b62
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions l10n_br_delivery/models/fiscal_document_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# @author Magno Costa <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models, _
from odoo import fields, models


class FiscalDocumentMixin(models.AbstractModel):
Expand All @@ -15,9 +15,9 @@ def _get_default_incoterm(self):
incoterm_id = fields.Many2one(
comodel_name='account.incoterms',
string='Incoterm',
help=_('International Commercial Terms are a series of'
help='International Commercial Terms are a series of'
' predefined commercial terms used in international'
' transactions.')
' transactions.'
)

carrier_id = fields.Many2one(
Expand Down
14 changes: 7 additions & 7 deletions l10n_br_delivery/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2020 KMEE INFORMATICA LTDA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import _, api, fields, models
from odoo import _, fields, models
from odoo.exceptions import UserError


Expand All @@ -12,12 +12,12 @@ class SaleOrder(models.Model):
# ao Peso Liquido a parametrização do Peso Bruto parece ser feita
# através do cadastro de embalagens
amount_weight = fields.Float(
string=_('Amount Weight'),
string='Amount Weight',
compute='_compute_amount_weight'
)

amount_volume = fields.Float(
string=_('Amount Volume'),
string='Amount Volume',
compute='_compute_amount_volume'
)

Expand Down Expand Up @@ -55,14 +55,14 @@ def _compute_amount_weight(self):

for record in self:
amount_weight = 0.0
for l in record.order_line:
amount_weight += l.product_qty * l.product_id.weight
for line in record.order_line:
amount_weight += line.product_qty * line.product_id.weight
record.amount_weight = amount_weight

def _compute_amount_volume(self):

for record in self:
amount_volume = 0.0
for l in record.order_line:
amount_volume += l.product_qty * l.product_id.volume
for line in record.order_line:
amount_volume += line.product_qty * line.product_id.volume
record.amount_volume = amount_volume
2 changes: 1 addition & 1 deletion l10n_br_delivery/security/ir.model.access.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
"access_l10n_br_delivery_shipment_sale_manager","l10n_br_delivery_shipment","model_l10n_br_delivery_shipment","sales_team.group_sale_manager",1,0,0,0
"access_l10n_br_delivery_shipment_partner_manager","l10n_br_delivery_shipment","model_l10n_br_delivery_shipment","base.group_partner_manager",1,0,0,0
"access_l10n_br_delivery_shipment_stock_user","l10n_br_delivery_shipment","model_l10n_br_delivery_shipment","stock.group_stock_user",1,0,0,0
"access_l10n_br_delivery_shipment_stock_manager","l10n_br_delivery_shipment","model_l10n_br_delivery_shipment","stock.group_stock_manager",1,1,1,1
"access_l10n_br_delivery_shipment_stock_manager","l10n_br_delivery_shipment","model_l10n_br_delivery_shipment","stock.group_stock_manager",1,1,1,1

0 comments on commit f0e4b62

Please sign in to comment.