Repository
OCA/project · module folder · Try on Runboat
Module version
Category
Project Management
Folder size
0.19 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/project
Last tracking update
2026-08-10 17:15:25
Authors
Odoo Community Association (OCA), Tecnativa
Maintainers
Odoo Community Association (OCA), Tecnativa
Committers
Víctor Martínez, pilarvargas-tecnativa, Weblate, OCA-git-bot, oca-ci, eduezerouali-tecnativa
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
project_task_stock_product_set
Description
This module allows to consume products directly from a project task.

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
edit_project project.project.form project.project form Inherits project.edit_project
stock_scrap_form_view stock.scrap.form stock.scrap form Inherits stock.stock_scrap_form_view
task_type_edit project.task.type.form project.task.type form Inherits project.task_type_edit
view_stock_move_raw_list stock.move.raw.list stock.move list New
view_task_form2 project.task.form project.task form Inherits project.view_task_form2
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (7)

New fields (2)
  • stock_move_id Many2one → stock.move
    comodel_name='stock.move' copy=False ondelete='cascade' string='Stock Move'
  • stock_task_id Many2one → project.task
    comodel_name='project.task' ondelete='cascade' string='Project Task'
Public methods (0)

No public methods.

New fields (4)
  • location_dest_id Many2one → stock.location
    check_company=True comodel_name='stock.location' help='Default location to which materials are consumed.' index=True readonly=False string='Destination Location'
  • location_id Many2one → stock.location
    check_company=True comodel_name='stock.location' help='Default location from which materials are consumed.' index=True readonly=False string='Source Location'
  • picking_type_id Many2one → stock.picking.type
    comodel_name='stock.picking.type' domain="[('company_id', '=?', company_id)]" index=True readonly=False string='Operation Type'
  • stock_analytic_date Date
Public methods (1)
  • write(self, vals)
    Update location information on pending moves when changed.

New fields (18)
  • allow_moves_action_assign Boolean
    compute='_compute_allow_moves_action_assign'
  • allow_moves_action_confirm Boolean
    compute='_compute_allow_moves_action_confirm'
  • done_stock_moves Boolean
    related='stage_id.done_stock_moves'
  • group_id Many2one → procurement.group
    comodel_name='procurement.group'
  • location_dest_id Many2one → stock.location
    check_company=True comodel_name='stock.location' index=True readonly=False string='Destination Location'
  • location_id Many2one → stock.location
    check_company=True comodel_name='stock.location' index=True readonly=False string='Source Location'
  • move_ids One2many → stock.move
    comodel_name='stock.move' copy=False domain=[('scrapped', '=', False)] inverse_name='raw_material_task_id' string='Stock Moves'
  • picking_type_id Many2one → stock.picking.type
    comodel_name='stock.picking.type' domain="[('company_id', '=?', company_id)]" index=True readonly=False string='Operation Type'
  • scrap_count Integer
    compute='_compute_scrap_move_count' string='Scrap Move'
  • scrap_ids One2many → stock.scrap
    comodel_name='stock.scrap' inverse_name='task_id' string='Scraps'
  • stock_analytic_account_id Many2one → account.analytic.account
    comodel_name='account.analytic.account' help='Move created will be assigned to this analytic account' string='Move Analytic Account'
  • stock_analytic_date Date
  • stock_analytic_distribution Json
    copy=True readonly=False
  • stock_analytic_line_ids One2many → account.analytic.line
    comodel_name='account.analytic.line' inverse_name='stock_task_id' string='Stock Analytic Lines'
  • stock_moves_is_locked Boolean
    default=True
  • stock_state Selection
    compute='_compute_stock_state' selection=[('pending', 'Pending'), ('confirmed', 'Confirmed'), ('assigned', 'Assigned'), ('done', 'Done'), ('cancel', 'Cancel')]
  • unreserve_visible Boolean
    compute='_compute_unreserve_visible' help='Technical field to check when we can unreserve' string='Allowed to Unreserve Inventory'
  • use_stock_moves Boolean
    related='stage_id.use_stock_moves'
Public methods (11)
  • action_assign(self)
  • action_cancel(self)
    Cancel the stock moves and remove the analytic lines created from stock moves when cancelling the task.
  • action_confirm(self)
  • action_done(self)
  • action_see_move_scrap(self)
  • action_toggle_stock_moves_is_locked(self)
  • button_scrap(self)
  • button_unreserve(self)
  • do_unreserve(self)
  • unlink(self)
  • write(self, vals)

New fields (2)
  • done_stock_moves Boolean
    help='If you check this box, when a task is in this state, you will not be able to add more stock moves but they can be viewed.'
  • use_stock_moves Boolean
    help='If you mark this check, when a task goes to this state, it will use stock moves'
Public methods (0)

No public methods.

New fields (4)
  • analytic_line_ids One2many → account.analytic.line
    comodel_name='account.analytic.line' inverse_name='stock_move_id' string='Analytic Lines'
  • raw_material_task_id Many2one → project.task
    check_company=True comodel_name='project.task' string='Task for material'
  • show_cancel_button_in_task Boolean
    compute='_compute_show_cancel_button_in_task'
  • task_id Many2one → project.task
    check_company=True comodel_name='project.task' string='Related Task'
Public methods (3)
  • action_cancel_from_task(self)
  • action_task_product_forecast_report(self)
  • default_get(self, fields_list)
    @api.model

New fields (1)
  • task_id Many2one → project.task
    comodel_name='project.task' compute='_compute_task_id' store=True string='Task'
Public methods (0)

No public methods.

New fields (1)
  • task_id Many2one → project.task
    check_company=True comodel_name='project.task' string='Task'
Public methods (0)

No public methods.

Status
Open migration PR — not merged yet for this version
CI status
green — ready to merge
Open since
221 days ago
Last activity
11 days ago
Repository
OCA/project
Pull request
[19.0][MIG] project_task_stock: Migration to 19.0 (#1653)