-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] fieldservice_account: Migration to 13.0
- Loading branch information
1 parent
e7bf4d5
commit 0ee9d40
Showing
7 changed files
with
20 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# Copyright (C) 2018 - TODAY, Open Source Integrators | ||
# Copyright (C) 2018, Open Source Integrators | ||
# Copyright 2019 Akretion <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class AccountInvoice(models.Model): | ||
_inherit = "account.invoice" | ||
class AccountMove(models.Model): | ||
_inherit = "account.move" | ||
|
||
fsm_order_ids = fields.Many2many( | ||
"fsm.order", | ||
|
@@ -24,7 +24,6 @@ def _compute_fsm_order_count(self): | |
for invoice in self: | ||
invoice.fsm_order_count = len(invoice.fsm_order_ids) | ||
|
||
@api.multi | ||
def action_view_fsm_orders(self): | ||
action = self.env.ref("fieldservice.action_fsm_dash_order").read()[0] | ||
if self.fsm_order_count > 1: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_account_invoice_line_fsm_user,account.invoice.line.fsm.user,model_account_invoice_line,fieldservice.group_fsm_user,1,1,1,1 | ||
access_account_move_line_fsm_user,account.move.line.fsm.user,model_account_move_line,fieldservice.group_fsm_user,1,1,1,1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,8 @@ def setUp(self): | |
super(FSMAccountCase, self).setUp() | ||
self.Wizard = self.env["fsm.wizard"] | ||
self.WorkOrder = self.env["fsm.order"] | ||
self.AccountInvoice = self.env["account.invoice"] | ||
self.AccountInvoiceLine = self.env["account.invoice.line"] | ||
self.AccountInvoice = self.env["account.move"] | ||
self.AccountInvoiceLine = self.env["account.move.line"] | ||
# create a Res Partner | ||
self.test_partner = self.env["res.partner"].create( | ||
{"name": "Test Partner", "phone": "123", "email": "[email protected]"} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters