Skip to content

Commit

Permalink
[FIX] pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
murtuzasaleh committed Feb 14, 2024
1 parent 4ea1b93 commit 25851c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion base_phone_cdr/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
{
"name": "Base Phone CDR",
"category": "web",
"version": "12.0.1.0.0",
"version": "17.0.1.0.0",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/connector-telephony",
"depends": ["base_phone_popup"],
"data": [
"view/phone_cdr_view.xml",
Expand Down
4 changes: 2 additions & 2 deletions base_phone_cdr/models/phone_cdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ def _compute_odoo_user(self):

@api.model
def create(self, vals):
res = super(PhoneCDR, self).create(vals)
res = super().create(vals)
if res.inbound_flag:
res.partner_id = self.env["res.partner"].search(
[("phone", "=", res.called_id), ("phone", "!=", False)], limit=1
)
return res

def write(self, vals):
res = super(PhoneCDR, self).write(vals)
res = super().write(vals)
if vals.get("inbound_flag") or vals.get("called_id"):
for rec in self:
rec.partner_id = self.env["res.partner"].search(
Expand Down
3 changes: 3 additions & 0 deletions base_phone_cdr/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"

0 comments on commit 25851c5

Please sign in to comment.