mirror of
https://github.com/bringout/oca-project.git
synced 2026-04-21 00:41:59 +02:00
Move 124 sale modules to oca-sale, create oca-project with 56 project modules from oca-workflow-process
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
9eb7ae5807
commit
6094c218b2
2332 changed files with 125826 additions and 0 deletions
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="edit_project" model="ir.ui.view">
|
||||
<field name="name">project.project.form</field>
|
||||
<field name="model">project.project</field>
|
||||
<field name="inherit_id" ref="project.edit_project" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="///group[@name='extra_settings']" position="before">
|
||||
<group string="Stock" name="stock_misc" groups="stock.group_stock_user">
|
||||
<field name="picking_type_id" />
|
||||
<field
|
||||
name="location_id"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
/>
|
||||
<field
|
||||
name="location_dest_id"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
/>
|
||||
<field name="stock_analytic_date" />
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="task_type_edit" model="ir.ui.view">
|
||||
<field name="name">project.task.type.form</field>
|
||||
<field name="model">project.task.type</field>
|
||||
<field name="inherit_id" ref="project.task_type_edit" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="fold" position="after">
|
||||
<field name="use_stock_moves" />
|
||||
<field
|
||||
name="done_stock_moves"
|
||||
attrs="{'invisible': [('use_stock_moves', '=', False)]}"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_task_form2" model="ir.ui.view">
|
||||
<field name="name">project.task.form</field>
|
||||
<field name="model">project.task</field>
|
||||
<field name="inherit_id" ref="project.view_task_form2" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="///button[@name='action_open_parent_task']" position="after">
|
||||
<button
|
||||
name="%(action_project_task_moves)d"
|
||||
type="action"
|
||||
string="Product Moves"
|
||||
class="oe_stat_button"
|
||||
icon="fa-exchange"
|
||||
attrs="{'invisible': [('done_stock_moves', '=', False)]}"
|
||||
groups="stock.group_stock_user"
|
||||
/>
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
name="action_see_move_scrap"
|
||||
type="object"
|
||||
icon="fa-arrows-v"
|
||||
attrs="{'invisible': [('scrap_count', '=', 0)]}"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<field name="scrap_count" widget="statinfo" string="Scraps" />
|
||||
</button>
|
||||
</xpath>
|
||||
<field name="project_id" position="after">
|
||||
<field
|
||||
name="stock_analytic_account_id"
|
||||
groups="analytic.group_analytic_accounting"
|
||||
attrs="{'required': [('project_id', '=', False)], 'invisible': [('use_stock_moves', '=', False)]}"
|
||||
/>
|
||||
<field
|
||||
name="stock_analytic_distribution"
|
||||
widget="analytic_distribution"
|
||||
groups="analytic.group_analytic_accounting"
|
||||
attrs="{'invisible': [('use_stock_moves', '=', False)]}"
|
||||
/>
|
||||
<field name="stock_analytic_date" />
|
||||
</field>
|
||||
<field name="stage_id" position="before">
|
||||
<button
|
||||
name="action_confirm"
|
||||
string="Confirm materials"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
attrs="{'invisible':[('allow_moves_action_confirm','=',False)]}"
|
||||
groups="stock.group_stock_user"
|
||||
/>
|
||||
<button
|
||||
name="action_assign"
|
||||
string="Check availability materials"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
attrs="{'invisible':[('allow_moves_action_assign','=',False)]}"
|
||||
groups="stock.group_stock_user"
|
||||
/>
|
||||
<button
|
||||
name="button_scrap"
|
||||
type="object"
|
||||
string="Scrap"
|
||||
attrs="{'invisible': ['|','|',('stock_state', '=', 'done'),('done_stock_moves', '=', False),('stock_moves_is_locked','=',False)]}"
|
||||
groups="stock.group_stock_user"
|
||||
/>
|
||||
<button
|
||||
name="button_unreserve"
|
||||
type="object"
|
||||
string="Unreserve"
|
||||
attrs="{'invisible': ['|','|','|', ('stock_state', '=', 'cancel'),('unreserve_visible', '=', False),('done_stock_moves', '=', False),('stock_moves_is_locked','=',False)]}"
|
||||
groups="stock.group_stock_user"
|
||||
/>
|
||||
<button
|
||||
name="action_cancel"
|
||||
type="object"
|
||||
string="Cancel Materials"
|
||||
attrs="{'invisible': ['|','|',('stock_state', 'in', ('draft', 'cancel')),('done_stock_moves', '=', False),('stock_moves_is_locked','=',False)]}"
|
||||
groups="stock.group_stock_user"
|
||||
/>
|
||||
<button
|
||||
name="action_done"
|
||||
type="object"
|
||||
string="Transfer Materials"
|
||||
attrs="{'invisible': ['|','|',('stock_state', '!=', 'assigned'),('done_stock_moves', '=', False),('stock_moves_is_locked', '=', False)]}"
|
||||
class="oe_highlight"
|
||||
groups="stock.group_stock_user"
|
||||
/>
|
||||
<button
|
||||
name="action_toggle_stock_moves_is_locked"
|
||||
attrs="{'invisible': ['|', '|', ('stock_state', 'in', ('draft','cancel')), ('stock_moves_is_locked', '=', False),('done_stock_moves', '=',False)]}"
|
||||
string="Unlock"
|
||||
groups="stock.group_stock_manager"
|
||||
type="object"
|
||||
/>
|
||||
<button
|
||||
name="action_toggle_stock_moves_is_locked"
|
||||
attrs="{'invisible': ['|',('stock_moves_is_locked', '=', True),('done_stock_moves','=',False)]}"
|
||||
string="Lock"
|
||||
class="oe_highlight"
|
||||
groups="stock.group_stock_manager"
|
||||
type="object"
|
||||
/>
|
||||
</field>
|
||||
<xpath expr="///page[@name='extra_info']" position="before">
|
||||
<!-- Field without groups used as domain in stock_analytic_* fields !-->
|
||||
<field name="use_stock_moves" invisible="1" />
|
||||
<page
|
||||
name="stock_info"
|
||||
string="Stock Info"
|
||||
attrs="{'invisible': [('use_stock_moves', '=', False)]}"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<field name="done_stock_moves" invisible="1" />
|
||||
<field name="stock_moves_is_locked" invisible="1" />
|
||||
<field name="stock_state" invisible="1" />
|
||||
<field name="allow_moves_action_confirm" invisible="1" />
|
||||
<field name="allow_moves_action_assign" invisible="1" />
|
||||
<field name="unreserve_visible" invisible="1" />
|
||||
<field
|
||||
name="move_ids"
|
||||
context="{'tree_view_ref': 'project_stock.view_stock_move_raw_tree', 'form_view_ref':'stock.view_move_form', 'default_company_id': company_id, 'default_state': 'draft', 'default_raw_material_task_id': id}"
|
||||
attrs="{'readonly': [('done_stock_moves', '=', True),('stock_moves_is_locked', '=', True)]}"
|
||||
/>
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="///page[@name='extra_info']/group[1]" position="inside">
|
||||
<group
|
||||
string="Stock Info"
|
||||
name="stock_ifno_misc"
|
||||
groups="stock.group_stock_user"
|
||||
attrs="{'invisible': [('use_stock_moves', '=', False)]}"
|
||||
>
|
||||
<field name="picking_type_id" />
|
||||
<field name="location_id" />
|
||||
<field name="location_dest_id" />
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record model="ir.actions.act_window" id="action_project_task_moves">
|
||||
<field name="name">Inventory Moves</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">stock.move.line</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field
|
||||
name="domain"
|
||||
>['|', ('move_id.raw_material_task_id', '=', active_id), ('move_id.task_id', '=', active_id)]</field>
|
||||
</record>
|
||||
<record id="view_stock_move_raw_tree" model="ir.ui.view">
|
||||
<field name="name">stock.move.raw.tree</field>
|
||||
<field name="model">stock.move</field>
|
||||
<field name="priority">1000</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree
|
||||
editable="bottom"
|
||||
default_order="sequence"
|
||||
decoration-muted="state in ('done', 'cancel')"
|
||||
decoration-warning="quantity_done - product_uom_qty > 0.0001"
|
||||
decoration-success="state not in ('done', 'cancel') and quantity_done - product_uom_qty < 0.0001"
|
||||
decoration-danger="state not in ('done', 'cancel') and reserved_availability < product_uom_qty and product_uom_qty - reserved_availability > 0.0001"
|
||||
>
|
||||
<field name="company_id" invisible="1" />
|
||||
<field
|
||||
name="product_id"
|
||||
required="1"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||
/>
|
||||
<field name="sequence" invisible="1" />
|
||||
<field name="location_id" optional="hide" readonly="1" force_save="1" />
|
||||
<field
|
||||
name="location_dest_id"
|
||||
optional="hide"
|
||||
readonly="1"
|
||||
force_save="1"
|
||||
/>
|
||||
<field
|
||||
name="picking_type_id"
|
||||
optional="hide"
|
||||
readonly="1"
|
||||
force_save="1"
|
||||
/>
|
||||
<field name="name" invisible="1" />
|
||||
<field name="state" invisible="1" />
|
||||
<field
|
||||
name="product_uom"
|
||||
groups="uom.group_uom"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||
/>
|
||||
<field
|
||||
name="product_uom_qty"
|
||||
string="To Consume"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||
/>
|
||||
<button
|
||||
name="action_task_product_forecast_report"
|
||||
type="object"
|
||||
icon="fa-area-chart"
|
||||
title="Forecasted Report"
|
||||
attrs="{'invisible': ['|', ('product_id', '=', False),('state', 'in', ['done', 'cancel'])]}"
|
||||
/>
|
||||
<field name="product_uom_category_id" invisible="1" />
|
||||
<field
|
||||
name="reserved_availability"
|
||||
attrs="{'invisible': [('state', 'in', ('done', 'cancel'))]}"
|
||||
string="Reserved"
|
||||
/>
|
||||
<field name="quantity_done" string="Consumed" readonly="1" />
|
||||
<field name="group_id" invisible="1" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue