Commit Graph
23 Commits
Author SHA1 Message Date
Tiffany Chang (tic) 1e2c03a47d [FIX] mrp: lock MOs by default
Previous specification of making MOs unlocked by default was confusing
for users and made it too easy to accidentally change the qty to consume
rather than the consumed amount. This fix makes it so MOs are now locked
by default and will be unlocked/locked (including existing draft /
confirmed / in progress MOs) automatically when setting is changed.
Previous setting (Lock Quantities To Consume) has been repurposed for
this. When setting is active, no lock/unlock button will be visible to
match the updated setting description (i.e. non-done MOs can
never be locked).

Task: 2518523
ENT PR (only fixes test): odoo/enterprise#19732
Upgrade PR: odoo/upgrade#2655
2021-07-26 11:57:50 +00:00
William Henrotin f4567e4b6b [FIX] mrp: keep operations at uninstallation
The commit 1355c9694e
archive all mrp operations at "Work Order" setting unticking. The good
way would be to hide the operations if the setting is deactivate.

closes odoo/odoo#72985

X-original-commit: 58d42aea296ac9ff548542a3120c6e81bbd61d02
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-06-30 10:25:21 +00:00
Nicolas Pierre 1355c9694e [FIX] mrp: archive operations when deactivating WO
When we deactivate the work orders in the settings, new MOs still
use operations that were assigned to the BoM, it just does not show the
Operations tab. We fix that by archiving the operations when work orders
are deactivated in the settings.

closes odoo/odoo#66108

Related: odoo/upgrade#2344
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-14 07:48:16 +00:00
svs-odoo 186a8b962b mrp,stock: rename quality_control_worksheet
Add option to install Quality Control / QC Worksheets from stock
settings.

task-2281266
2020-12-09 08:30:28 +00:00
yhu-odoo f1933add37 [IMP] mrp: install quality_worksheet in setting
Add a checkbox to install quality_worksheet in mrp setting, it will be
shown when quality_control is installed.

Task 2281266
2020-12-09 08:30:28 +00:00
Tiffany Chang (tic) 48672703aa [REF] mrp: update MO lock/unlock settings
This commit updates 4 features related to a MO being locked/unlocked.

1. Manufacturing orders are by default unlocked. A new configuration
setting has been added so users can set the default to be locked.
This setting only applies to new manufacturing orders after the setting
has been changed.

2. A MO now shows the same button options regardless if it is
locked/unlocked ('scrap', 'cancel', 'unreserve')

3. Workers can always change "Consumed Quantities"/"Produced" when
clicking on a component/finished product line unless state=Done and MO
is_locked. This includes adding new components/finished products.

4. Workers can now change "To Consume" quantity when clicking on a
component line, unlocked, and not in states 'Done' or 'Cancel'.

This is part of specification 6-Lock/Unlock of overall Editing in MO
form and backorders task.

Task: 2241471
2020-06-15 16:59:41 +02:00
Christophe Simonis 886eca0131 [IMP] *: remove usage of oldname attribute
This attribute is misleading as it is insufficient to correctly upgrade
the database. It only renames the column in the database, but other
operations are needed, like updating the corresponding `ir.model.fields`
record (and its xmlid). The default values and the translations are also
lost during the upgrade.

Moreover, this feature was misused. It was:
 - left on fields during multiple versions.
 - used on reports (SQL views). This would be ok if the feature was
   complete, but, as is, it was useless.
 - kept unchanged after a second renaming of the field (which can happen
   versions later the first rename).
 - used, even when the meaning of the field changed. i.e. the field
   `archived` has been renamed to the classic `active`, but the value
   in the database should be switched.
2019-08-05 09:36:41 +00:00
Christophe Simonis a97037c6d4 [MERGE] forward port branch saas-12.2 up to 78b3b650b0 2019-05-06 12:27:51 +02:00
Arnold Moyaux 6f25cf1aa7 [REF] mrp: add groups for byproducts
Since mrp_byproduct is in mrp. We want to keep the byproduct as an
additional feature. So this commit add a group and hide byproducts
fields in views.
2019-04-12 08:46:07 +00:00
Simon Lejeune d91db5bde6 [ADD] mrp_subcontracting
In a few words, it allows to send components to a subcontractor partner
and receive a finished product. The production is managed through classical
manufacturing orders where the raw and finished location is the
subcontracting location. When creating a receipt picking for a
subcontractor partner, the location_id of the moves will be set to the
subcontracting locations by using the property_stock_customer and
property_stock_supplier of the partner. An override of _action_confirm
will create the manufacturing order.

When a subcontracted bom contains tracking, the produce wizard is
available from the picking to record which lots were produced/consumed.

New type on the BoM: subcontract
New type on res.partner: subcontactor
New location per company (we still own the components stored at the
subcontractor so they're still valued)
New routes created to resupply the subcontracting location on order or
not (through a reordering rule).
Override of res.partner to set the property_stock_customer/supplier on
subcontactor partners.

Proper tests were added too.

Joint work with: Arnaud Baes <arb@odoo.com>

task 1831382
2019-04-03 13:52:22 +00:00
Nicolas Martinelli 6c702172ec [FIX] mrp: mrp_workorder uninstall
- Install 'quality_mrp_workorder' without demo data
- Go to the General Settings

A warning is raised regarding the uninstallation of 'mrp_workorder'.

This is due to `_onchange_group_mrp_routings`, which assumes that the
installation of 'mrp_workorder' is only linked to the group
`group_mrp_routings`.

This is incorrect: `group_mrp_routings` might not be activated, but it
might be in the dependencies of another module. Therefore, we change the
logic: if we activate `group_mrp_routings`, we install 'mrp_workorder'.
If we deactivate `group_mrp_routings` we do not uninstall
'mrp_workorder' if it is already installed, since it might be required
by a dependancy.

opw-1970910

closes odoo/odoo#32811

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-19 07:22:16 +00:00
Adrian Torres 3f4f77fd9d [REF] *: adapt code to new related default behaviour
This commit adapts the business code to changes introduced by
the parent commit in order to keep the same behaviour as before.

All readonly=False fields will have to be checked afterwards to confirm
that the business case requires write access to the source field.
2018-09-27 12:10:23 +02:00
Hiral Bhavsar 000ecb046c [REF] mrp: remove settings to (un)install repair and maintenance modules
Purpose is to limit the uninstallation of modules without being clearly
notified of it. In MRP ticking repair / maintenance install and uninstall
modules like stock, sale_management, mrp_workorder, ...

We therefore decided to remove those options from settings to prevent
users from uninstalling it.

This commit is related to task ID 1841221.
2018-05-31 14:58:38 +02:00
Richard Mathot a18bd499ac [REF] various: convert res.config.settings to use ir.config_parameter integration
This commit updates the various res config of Odoo addons to use the
newly-introduced config_parameter field attribute.
2018-01-16 13:34:29 +01:00
Haresh Shyara 5f6b0a7bc5 [IMP] repair: renamed model names xmlid
- Also rename file references with new one.
- model renamed
	mrp.repair to repair.order
	mrp.repair.line -> repair.line
	mrp.repair.fee -> repair.fee
	mrp.repair.cancel -> repair.cancel
	mrp.repair.make_invoice -> repair.order.make_invoice
2018-01-10 15:30:50 +01:00
Fabien Pinckaers b341b5ca73 [IMP] Remove duplicate fields names 2018-01-07 19:28:03 +01:00
Kinjal Mehta e1628532d6 [IMP] mrp: changed duplicate field label in the same model 2018-01-04 17:56:55 +05:30
amoyaux 2c0211f94d [REF] mrp: move step from quality_mrp to workorder 2017-12-06 10:25:55 +01:00
Khoi Nguyen f220ca4c10 [FIX] mrp: Change Work Orders text to make the dependence on quality explicit 2017-09-30 14:25:43 +02:00
Khoi Nguyen 85ed6a31a2 [REF] mrp: Enabling Work Orders installs quality_mrp
This commit applies the following changes to the MRP settings:

- Ticking 'Work Orders' installs quality_mrp;
- quality_mrp is removed if 'Work Orders' are disabled;
- The quality_mrp section has been removed;
2017-09-29 18:01:16 +02:00
Sanjay Jamod 160001ca68 [IMP] mrp: Improve settings labels and installable modules
Purpose
=======

Improve settings of manufacturing app

Specification
=============

https://drive.google.com/a/odoo.com/file/d/0B0ITmdw6h3ZrMndPb2ZWbUY2Tm8/view?usp=drivesdk
2017-09-05 13:29:16 +02:00
Yannick Tivisse c39abeeefe [IMP] settings: Remove redefinition of company_id in settings.
On the other hand, create a new field for the configuration of the inter company rules.
2017-09-04 16:52:30 +02:00
Yannick Tivisse 781a03b2bc [IMP] res_config: Update file names, xmlids, class names according to guidelines
Now that we only have one model (res.config.settings). Uniformize everything according to the guidelines.
2017-09-01 13:03:18 +02:00