mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[quality_control_issue][IMP] add activities to QC issues and problems
This commit is contained in:
@@ -10,7 +10,7 @@ import odoo.addons.decimal_precision as dp
|
|||||||
class QualityControlIssue(models.Model):
|
class QualityControlIssue(models.Model):
|
||||||
_name = "qc.issue"
|
_name = "qc.issue"
|
||||||
_description = "Quality Control Issue"
|
_description = "Quality Control Issue"
|
||||||
_inherit = "mail.thread"
|
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def _compute_stock_scrap_qty(self):
|
def _compute_stock_scrap_qty(self):
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ AVAILABLE_PRIORITIES = [
|
|||||||
class QcProblem(models.Model):
|
class QcProblem(models.Model):
|
||||||
_name = "qc.problem"
|
_name = "qc.problem"
|
||||||
_description = "Quality Control Problem Tracking"
|
_description = "Quality Control Problem Tracking"
|
||||||
_inherit = "mail.thread"
|
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||||
|
|
||||||
def _get_default_stage_id(self):
|
def _get_default_stage_id(self):
|
||||||
""" Gives default stage_id """
|
""" Gives default stage_id """
|
||||||
|
|||||||
@@ -87,6 +87,7 @@
|
|||||||
</sheet>
|
</sheet>
|
||||||
<div class="oe_chatter">
|
<div class="oe_chatter">
|
||||||
<field name="message_follower_ids" widget="mail_followers" />
|
<field name="message_follower_ids" widget="mail_followers" />
|
||||||
|
<field name="activity_ids" widget="mail_activity"/>
|
||||||
<field name="message_ids" widget="mail_thread" />
|
<field name="message_ids" widget="mail_thread" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -154,6 +155,18 @@
|
|||||||
<field name="location_id"/>
|
<field name="location_id"/>
|
||||||
<filter string="My inspections"
|
<filter string="My inspections"
|
||||||
domain="[('inspector_id', '=', uid)]"/>
|
domain="[('inspector_id', '=', uid)]"/>
|
||||||
|
<separator/>
|
||||||
|
<filter string="My Activities" name="activities_my"
|
||||||
|
domain="[('activity_ids.user_id', '=', uid)]"/>
|
||||||
|
<separator/>
|
||||||
|
<filter string="Late Activities" name="activities_overdue"
|
||||||
|
domain="[('activity_ids.date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"
|
||||||
|
help="Show all records which has next action date is before today"/>
|
||||||
|
<filter string="Today Activities" name="activities_today"
|
||||||
|
domain="[('activity_ids.date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
|
||||||
|
<filter string="Future Activities" name="activities_upcoming_all"
|
||||||
|
domain="[('activity_ids.date_deadline', '>', context_today().strftime('%Y-%m-%d'))
|
||||||
|
]"/>
|
||||||
<group expand="0" string="Group By...">
|
<group expand="0" string="Group By...">
|
||||||
<filter string="Stage" domain="[]"
|
<filter string="Stage" domain="[]"
|
||||||
context="{'group_by':'stage_id'}"/>
|
context="{'group_by':'stage_id'}"/>
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
</sheet>
|
</sheet>
|
||||||
<div class="oe_chatter">
|
<div class="oe_chatter">
|
||||||
<field name="message_follower_ids" widget="mail_followers" />
|
<field name="message_follower_ids" widget="mail_followers" />
|
||||||
|
<field name="activity_ids" widget="mail_activity"/>
|
||||||
<field name="message_ids" widget="mail_thread" />
|
<field name="message_ids" widget="mail_thread" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -107,6 +108,18 @@
|
|||||||
<field name="qc_team_id"/>
|
<field name="qc_team_id"/>
|
||||||
<field name="stage_id"/>
|
<field name="stage_id"/>
|
||||||
<field name="problem_group_id"/>
|
<field name="problem_group_id"/>
|
||||||
|
<separator/>
|
||||||
|
<filter string="My Activities" name="activities_my"
|
||||||
|
domain="[('activity_ids.user_id', '=', uid)]"/>
|
||||||
|
<separator/>
|
||||||
|
<filter string="Late Activities" name="activities_overdue"
|
||||||
|
domain="[('activity_ids.date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"
|
||||||
|
help="Show all records which has next action date is before today"/>
|
||||||
|
<filter string="Today Activities" name="activities_today"
|
||||||
|
domain="[('activity_ids.date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
|
||||||
|
<filter string="Future Activities" name="activities_upcoming_all"
|
||||||
|
domain="[('activity_ids.date_deadline', '>', context_today().strftime('%Y-%m-%d'))
|
||||||
|
]"/>
|
||||||
<group expand="0" string="Group By...">
|
<group expand="0" string="Group By...">
|
||||||
<filter string="Stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
<filter string="Stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||||
<filter string="Problem Group" domain="[]" context="{'group_by': 'problem_group_id'}"/>
|
<filter string="Problem Group" domain="[]" context="{'group_by': 'problem_group_id'}"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user