@@ -7,20 +7,10 @@ class AccountBudget(models.Model):
7
7
_inherit = 'account.budget'
8
8
_order = 'create_date desc'
9
9
10
- # prev_planned_amount = fields.Float(
11
- # string='Planned Amount',
12
- # readonly=True,
13
- # )
14
10
policy_amount = fields .Float (
15
11
string = 'Policy Amount' ,
16
12
readonly = True ,
17
13
)
18
- # ref_breakdown_id = fields.Many2one(
19
- # 'budget.fiscal.policy.breakdown',
20
- # string="Breakdown Reference",
21
- # copy=True,
22
- # readonly=True,
23
- # )
24
14
25
15
@api .multi
26
16
def _get_doc_number (self ):
@@ -92,25 +82,6 @@ def _check_fiscalyear_section_unique(self):
92
82
raise ValidationError (
93
83
_ ('Duplicated budget on the same fiscal year!' ))
94
84
95
- # @api.multi
96
- # def budget_confirm(self):
97
- # for rec in self:
98
- # name = self.env['ir.sequence'].next_by_code('budget.control.unit')
99
- # rec.write({'name': name})
100
- # # rec.ref_budget_id.budget_cancel()
101
- # return super(AccountBudget, self).budget_confirm()
102
-
103
- # # New Revision
104
- # @api.multi
105
- # def new_minor_revision(self):
106
- # result = super(AccountBudget, self).new_minor_revision()
107
- # if result.get('domain', []):
108
- # new_budget_id = result['domain'][0][2]
109
- # new_budget = self.browse(new_budget_id)
110
- # new_budget.ref_budget_id = self.id
111
- # new_budget.name = '/'
112
- # return result
113
-
114
85
@api .multi
115
86
def unlink (self ):
116
87
for policy in self :
@@ -119,35 +90,3 @@ def unlink(self):
119
90
_ ('Cannot delete budget(s)\
120
91
which are not in draft or cancelled.' ))
121
92
return super (AccountBudget , self ).unlink ()
122
-
123
- # @api.multi
124
- # def get_all_version(self):
125
- # self.ensure_one()
126
- # budget_ids = []
127
- # if self.ref_budget_id:
128
- # budget = self.ref_budget_id
129
- # while budget:
130
- # budget_ids.append(budget.id)
131
- # budget = budget.ref_budget_id
132
- # budget = self
133
- # while budget:
134
- # ref_budget =\
135
- # self.search([('ref_budget_id', '=', budget.id)])
136
- # if ref_budget:
137
- # budget_ids.append(ref_budget.id)
138
- # budget = ref_budget
139
- # act = 'account_budget_activity.act_account_budget_view'
140
- # action = self.env.ref(act)
141
- # result = action.read()[0]
142
- # dom = [('id', 'in', budget_ids)]
143
- # result.update({'domain': dom})
144
- # return result
145
-
146
-
147
- class AccountBudgetLine (models .Model ):
148
- _inherit = 'account.budget.line'
149
-
150
- planned_amount = fields .Float (
151
- string = 'Current Amount' , # Existing field, change label only
152
- help = "Current Planned Amount"
153
- )
0 commit comments