!11214 Merge branch 'master' into dev_zhou
Merge pull request !11214 from 李鹏宇/dev_zhou
This commit is contained in:
@@ -94,6 +94,12 @@ class YuthonWillTask(models.Model):
|
||||
is_company = fields.Boolean(string="本公司", default=True, compute='_compute_is_company',
|
||||
search='_search_part_of_company')
|
||||
|
||||
def update_task_state(self):
|
||||
will_ids = self.env["yuthon.will.task"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for will in will_ids:
|
||||
will.state = 'done'
|
||||
|
||||
def _compute_is_company(self):
|
||||
active_company_ids = self.env.companies
|
||||
for employee in self:
|
||||
|
||||
@@ -402,4 +402,12 @@
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.one_time()</field>
|
||||
</record>
|
||||
<record id="all_update_task_state" model="ir.actions.server">
|
||||
<field name="name">状态改为已办</field>
|
||||
<field name="model_id" ref="yuthon_will_task.model_yuthon_will_task"/>
|
||||
<field name="binding_model_id" ref="yuthon_will_task.model_yuthon_will_task"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.update_task_state()</field>
|
||||
<field name="groups" eval="[(4, ref('base.group_system'))]"/>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user