[IMP] *: add next activities on all modules
*: account, event, mrp, purchase_requisition, stock_landed_cost, stock_picking_batch Add activity on below models: account.payment event.event event.registration mrp.workorder purchase.requisition stock.landed.cost stock.picking.batch Related Task ID : 1867620 closes odoo/odoo#26092
This commit is contained in:
@@ -383,7 +383,7 @@ class account_register_payments(models.TransientModel):
|
||||
|
||||
class account_payment(models.Model):
|
||||
_name = "account.payment"
|
||||
_inherit = ['mail.thread', 'account.abstract.payment']
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin', 'account.abstract.payment']
|
||||
_description = "Payments"
|
||||
_order = "payment_date desc, name desc"
|
||||
|
||||
|
||||
@@ -107,6 +107,14 @@
|
||||
<filter string="State" name="state" domain="[]" context="{'group_by': 'state'}"/>
|
||||
<filter string="Currency" name="currency" domain="[]" context="{'group_by': 'currency_id'}" groups="base.group_multi_currency"/>
|
||||
<filter string="Company" name="company" domain="[]" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/>
|
||||
<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'))]"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
@@ -167,6 +175,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
|
||||
<field name="activity_ids" widget="mail_activity"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -78,7 +78,7 @@ class EventEvent(models.Model):
|
||||
"""Event"""
|
||||
_name = 'event.event'
|
||||
_description = 'Event'
|
||||
_inherit = ['mail.thread']
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
_order = 'date_begin'
|
||||
|
||||
name = fields.Char(
|
||||
@@ -335,7 +335,7 @@ class EventEvent(models.Model):
|
||||
class EventRegistration(models.Model):
|
||||
_name = 'event.registration'
|
||||
_description = 'Event Registration'
|
||||
_inherit = ['mail.thread']
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
_order = 'name, create_date desc'
|
||||
|
||||
origin = fields.Char(
|
||||
|
||||
@@ -272,6 +272,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
|
||||
<field name="activity_ids" widget="mail_activity"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
@@ -390,6 +391,14 @@
|
||||
<field name="user_id"/>
|
||||
<separator/>
|
||||
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
|
||||
<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">
|
||||
<filter string="Responsible" name="responsible" context="{'group_by': 'user_id'}"/>
|
||||
<filter string="Event Category" name="event_type_id" context="{'group_by':'event_type_id'}"/>
|
||||
@@ -487,6 +496,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="activity_ids" widget="mail_activity"/>
|
||||
<field name="message_ids" widget="mail_thread" options="{'post_refresh': 'recipients'}"/>
|
||||
</div>
|
||||
</form>
|
||||
@@ -544,6 +554,14 @@
|
||||
<filter string="Attended Date" name="filter_date_closed" date="date_closed"/>
|
||||
<field name="event_id"/>
|
||||
<field name="partner_id"/>
|
||||
<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">
|
||||
<filter string="Partner" name="partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Event" name="group_event" domain="[]" context="{'group_by':'event_id'}"/>
|
||||
|
||||
@@ -13,7 +13,7 @@ from odoo.addons import decimal_precision as dp
|
||||
class MrpWorkorder(models.Model):
|
||||
_name = 'mrp.workorder'
|
||||
_description = 'Work Order'
|
||||
_inherit = ['mail.thread']
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
|
||||
name = fields.Char(
|
||||
'Work Order', required=True,
|
||||
|
||||
@@ -14,6 +14,13 @@
|
||||
<separator/>
|
||||
<filter string="Start Date" name="date_start_filter" date="date_start"/>
|
||||
<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'))]"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
@@ -235,6 +242,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter" groups="mrp.group_mrp_manager">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="activity_ids" widget="mail_activity"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
@@ -257,6 +265,14 @@
|
||||
<separator/>
|
||||
<filter string="Late" name="late" domain="['&', ('date_planned_start','<', current_date), ('state', '=', 'ready')]"
|
||||
help="Production started late"/>
|
||||
<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'))]"/>
|
||||
<field name="workcenter_id"/>
|
||||
<field name="production_id"/>
|
||||
<group expand="0" string="Group By">
|
||||
|
||||
@@ -40,7 +40,7 @@ class PurchaseRequisitionType(models.Model):
|
||||
class PurchaseRequisition(models.Model):
|
||||
_name = "purchase.requisition"
|
||||
_description = "Purchase Requisition"
|
||||
_inherit = ['mail.thread']
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
_order = "id desc"
|
||||
|
||||
def _get_picking_in(self):
|
||||
|
||||
@@ -187,6 +187,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="activity_ids" widget="mail_activity"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
@@ -258,6 +259,14 @@
|
||||
<separator/>
|
||||
<filter string="Unassigned" name="unassigned" domain="[('user_id','=', False)]" help="Unassigned Requisition"/>
|
||||
<filter string="My Agreements" name="my_agreements" domain="[('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'))]"/>
|
||||
<field name="user_id" />
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Purchase Representative" name="representative" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
|
||||
@@ -18,7 +18,7 @@ class StockMove(models.Model):
|
||||
class LandedCost(models.Model):
|
||||
_name = 'stock.landed.cost'
|
||||
_description = 'Stock Landed Cost'
|
||||
_inherit = 'mail.thread'
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
|
||||
name = fields.Char(
|
||||
'Name', default=lambda self: _('New'),
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="activity_ids" widget="mail_activity"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
@@ -158,6 +159,14 @@
|
||||
<separator/>
|
||||
<filter string="Draft" name="draft" domain="[('state','=','draft')]"/>
|
||||
<filter string="Done" name="done" domain="[('state','=','done')]"/>
|
||||
<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">
|
||||
<filter string="Date" name="group_by_month" context="{'group_by': 'date'}"/>
|
||||
<filter string="Status" name="status" context="{'group_by': 'state'}"/>
|
||||
|
||||
@@ -6,7 +6,7 @@ from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class StockPickingBatch(models.Model):
|
||||
_inherit = ['mail.thread']
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
_name = "stock.picking.batch"
|
||||
_description = "Batch Picking"
|
||||
_order = "name desc"
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
|
||||
<field name="activity_ids" widget="mail_activity"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
@@ -91,6 +92,14 @@
|
||||
<field name="name" string="Batch Picking"/>
|
||||
<filter name="in_progress" string="Running" domain="[('state', '=', 'in_progress')]" help="Batch Pickings not finished"/>
|
||||
<field name="user_id"/>
|
||||
<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">
|
||||
<filter string="Responsible" name="user" domain="[]" context="{'group_by': 'user_id'}"/>
|
||||
<filter string="State" name="state" domain="[]" context="{'group_by':'state'}"/>
|
||||
|
||||
Reference in New Issue
Block a user