Skip to content

Commit a0405b1

Browse files
committed
[IMP] rental_deposit: Fix the stylying error
1 parent a6ccf92 commit a0405b1

File tree

8 files changed

+12
-8
lines changed

8 files changed

+12
-8
lines changed

rental_deposit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from . import models
1+
from . import models

rental_deposit/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
'deposit_rental/static/src/website_deposit_amount.js',
1515
}
1616
},
17-
}
17+
}

rental_deposit/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from . import res_config_settings
22
from . import product_template
33
from . import sale_order
4-
from . import sale_order_line
4+
from . import sale_order_line

rental_deposit/models/product_template.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from odoo import api, fields, models
1+
from odoo import fields, models
2+
23

34
class ProductTemplate(models.Model):
45
_inherit = 'product.template'

rental_deposit/models/res_config_settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from odoo import api, fields, models
22

3+
34
class ResConfigSettings(models.TransientModel):
45
_inherit = 'res.config.settings'
56

rental_deposit/models/sale_order.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from odoo import _, api, fields, models
1+
from odoo import _, models
22
from odoo.exceptions import UserError
33

4+
45
class SaleOrder(models.Model):
56
_inherit = 'sale.order'
67

@@ -14,7 +15,7 @@ def _add_deposit_product(self, order_line):
1415
raise UserError(_("The configured deposit product does not exist."))
1516

1617
existing_line = self.order_line.filtered(lambda l: l.linked_line_id.id == order_line.id)
17-
amount = order_line.product_id.deposit_amount * order_line.product_uom_qty
18+
# amount = order_line.product_id.deposit_amount * order_line.product_uom_qty
1819

1920
if existing_line:
2021
existing_line.write({
@@ -31,4 +32,4 @@ def _add_deposit_product(self, order_line):
3132
'price_unit': order_line.product_id.deposit_amount,
3233
'linked_line_id': order_line.id,
3334
'name': f"Deposit for {order_line.product_id.display_name}",
34-
})
35+
})

rental_deposit/models/sale_order_line.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from odoo import api, fields, models
22

3+
34
class SaleOrderLine(models.Model):
45
_inherit = 'sale.order.line'
56

rental_deposit/views/res_config_settings_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
</xpath>
1414
</field>
1515
</record>
16-
</odoo>
16+
</odoo>

0 commit comments

Comments
 (0)