Commit Graph
91 Commits
Author SHA1 Message Date
Tiffany Chang (tic) 0b60c863ef [IMP] mrp: don't require consumed widget when multi-location
Before this commit, it was required to always use the widget to edit the
consumed quantity of a component when multi-location or packages setting
is active. This was not user friendly so this commit relaxes the
requirement to only tracked products and gives users the option to still
edit the consumed move lines directly if desired. We also distinguish
between when using the widget is required or not with the widget button
color. Note that if quantity consumed is greater than amount reserved in
different locations, the difference will default to the move's source
location (this is consistent with what happens when the `qty_producing`
is changed in the MO and the consumed quantities are scaled to match.)

Task: 2518523
Upgrade PR: odoo/upgrade#2655

closes odoo/odoo#73939

Related: odoo/enterprise#19732
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-07-26 12:04:30 +00:00
Sébastien Theys c6716847aa [IMP] web, *: clean up notification API
task-2476867

closes odoo/odoo#67009

Related: odoo/enterprise#16760
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-05-27 13:47:23 +00:00
William Henrotin dfb8c1b9e7 [FIX] mrp: print bom structure per variants
Commit 044c5c2c81 removed the context key
`variant` of the bom structure report. This implies to always print
every variant in case a BoM has no product_id.
This commit fix this issue to print only the variant selected in the
report. It also adds a new button to print the report with all variants
in case for some customers this behavior was "not a bug but a feature".

Task : 2504524

closes odoo/odoo#70444

X-original-commit: 8da349e785b5b461ea19874df9686f8cd26af8ad
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-05-06 07:57:05 +00:00
Nicolas Lempereur 8418f15104 [FIX] mrp: use float_time for mrp_time_counter aggregate
To display an aggregate in a list view, the field format method is used.

But since mrp_time_counter that extend float_time has no format method,
you would see eg. 2.07 as aggregate and 2:04 on the line which is a
little confusing.

opw-2514634

closes odoo/odoo#69795

X-original-commit: 020958f55d384e546eb61c98763d45b5db1ed206
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-04-23 17:53:10 +00:00
Qiuyu (QHO) bd67479316 [REF] mail, mail_bot, im_livechat, *: convert JS files to ES6 modules
task id: 2487514

closes odoo/odoo#69376

Related: odoo/enterprise#17749
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-04-19 13:33:35 +00:00
JF Aubert 0b3bdcf14c [IMP] mrp: change bom operation
Ease bill of material - operation configuration.

- allow to change the BoM of an operation,
- allow to update a BoM by duplicating existing operations(& quality points),
- by extension, changing the operation of a quality point update the products.

closes odoo/odoo#65628

Task: 2413246
Related: odoo/enterprise#16159
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-04-15 09:39:45 +00:00
Tiffany Chang (tic) 9effef7087 [FIX] mrp: use bom quantity in bom report
This commit makes it so when the bom structure report (Structure & Cost
smartbutton) is opened the product quantity defaults to the BoM's
`product_qty` amount rather than 1.

Steps to reproduce:
- Create/open a BoM
- Set `product_qty` to any value greater than 1
- Click on "Structure & Cost" button.

Expected result: product quantities scaled to the `product_qty`
Actual result: product quantities scaled to Quantity = 1

closes odoo/odoo#65747

Task: 2429885
X-original-commit: 30c05ad99bcf5884e071ebfa41adc6b44f23ba1e
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-02-08 16:33:36 +00:00
yhu-odoo 2c5ce41c42 [IMP] uom: change default rounding to two
Change the default rouning digits of all UoMs to be two, also change the
decimal.precision of UoM to be two. Adapt all the tests.
Also to avoid hardcoded digits in `should_consume_qty` widget.

PR #56000

X-original-commit: 460ec0402a2352a5b179d81935f7230f6bc97cb7
2020-09-09 09:21:12 +00:00
Anousone Phaysomphot a2d3cc7d07 [IMP] mrp: add new digest tips
PURPOSE

Review the tips and digest layout design to make sure they have a WOW effect
and increase trial conversion/retention.

SPECIFICATIONS

“Use tablets in shop to control manufacturing”

See code for specifications.

LINKS

Task ID-2274264
COM PR: odoo/odoo#53580
ENT PR: odoo/enterprise#1139

X-original-commit: 40100145e5bc8b2588b04b849a2c2cc306e126d3
2020-08-12 12:23:00 +00:00
William Henrotin 572e4ecf95 [FIX] mrp: fix should consume widget
The `should consume` widget was not editable if the focus was on
'qty_done' field.

Task : 2278147

closes odoo/odoo#55727

X-original-commit: 994b3bbc44766274b50948855e80d928318aee88
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-08-11 09:03:35 +00:00
Arnold Moyaux 3355371f34 [IMP] mrp: editable timer 2020-07-27 15:03:05 +00:00
William Henrotin 878a92b528 [FIX] mrp: 'To consume' field disappear
The custom 'to consume' widget wrap the classic float widget into a
<span> tag to add a non editable part to display. The issue this commit
fix is the following: the float widget element is this.$el in
_renderEdit. Appending it to a new element make it loose its link to the
DOM. The custom widget is totally blank.
This commit clone this.$el before surrounding it by the new span

Task : 2278147

closes odoo/odoo#54042

X-original-commit: 01bb1fce77cce3d54cd969e643b7c720673f2b22
Related: odoo/upgrade#1451
Related: odoo/enterprise#11645
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-07-03 11:22:16 +00:00
Arnold Moyaux 182f1b8e26 [REF] mrp: workorder onchange
Create the workorders at the onchange when setting the bom and not a
"plan" anymore.

task-2241471
2020-06-15 16:59:41 +02:00
William Henrotin 0e2765f5fd [REF] mrp: no more produce wizard
Use a view similar as the pickings one.

task-2241471
2020-06-15 16:59:41 +02:00
Julien MougenotandMathieu Duckerts-Antoine e68d3bb09d [REF] *: Adapt all modules to new control panel
Adaptation of the code throughout all modules to properly instantiate the newly
refactored control panel and update it accordingly.

Part of task 2196029

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-03-13 14:08:33 +00:00
Ankita Raval 65513ef3f9 [IMP] mrp: mrp_document
Purpose:
Modernizes and facilitates files upload in manufacturing app.

In this Commit:
  - Show the image in Kanban.
  - Allow to access a preview of the file when clicking on it in the
    Kanban view.
  - Add a 'Edit', 'Delete' and 'Download' in kanban card dropdown menu.
  - Add Upload button in control panel to upload document which will
    create new record of `mrp.document` and also add a testcase for it.

task-1960733

closes odoo/odoo#42168

Related: odoo/enterprise#8977
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-04 10:12:46 +00:00
Hemali Bhimani f168703247 [IMP] *: updated import templates to match data model
purpose of this commit is to make import template compatible with v13

task-2146510
closes-#42279

closes odoo/odoo#44375

X-original-commit: 37aadf1227531838ada7dc3810cf463379736e96
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-01-31 12:04:45 +00:00
ryv-odoo c7b9602165 [IMP] mrp: add extra information about scheduling
Add scheduling information (icon) with popover to show info/warning/error
about the scheduling of workorder. Four extra pieces of information
is given (level change the color of the icon):
- Info level; If previous WO and pending state, show sheduling info of the previous WO
- Warning level; info if the WO is late
- Error level; if conflit with other WO (same workcenter in same time)
- Error level; if previous WO is planned after the current one

Also, add a button (in the popover) to replan correctly all WO of the MO of
the current WO (only if it is not in ready/progress and error(s) is detected).

It is done via a JSON data compute field ('json_popover') in the workorder and
the popover_widget of stock. It is allowing use to make computation in batch
and avoid to add lot of fields.

task-2082261

closes odoo/odoo#41950

Related: odoo/enterprise#7296
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-12-30 11:05:40 +00:00
Goffin Simon 8f04405dfa [FIX] mrp: Updating cost from Bom Structure & Cost
Steps to reproduce the bug:

- Let's consider two storable products P1 and P2
- Update the cost of P2 to 10€
- Create a BOM for P1 with P2 as component
- Click on Bom Structure & Cost
- Click on P2
- Try to update the cost

Bug:

A traceback was raised saying that "Record does not exist or has been deleted" or the cost of an other
product was displayed because the active_id was still the id of the bom.

opw:2093199

closes odoo/odoo#39710

X-original-commit: e984d8f94534373fde894e9e6ad0c932585deb46
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-11-04 08:56:05 +00:00
svs-odoo ededc5138d [IMP] mrp: bigger folding arrow on BoM cost view
...Only on mobile device.

closes odoo/odoo#38469

X-original-commit: 484e7bdc5ac11f33f9aa8a0f697a5f23d8f20c4a
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-11 09:14:49 +00:00
svs-odoo 848195d1bb [FIX] mrp: buttons on BoM structure
Same size, smaller, better placed buttons.

X-original-commit: 280bd7c4dcd831904f33206a7c2bb084f97dc069
2019-10-11 09:14:49 +00:00
Ankita Raval 92b647611e [IMP] mrp: label should be in one line.
In this commit alignment in bom structure & cost report
display in proper manner.

task-id : 2059697

closes odoo/odoo#36225

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-08-29 09:57:12 +00:00
Jigar Patel 90df41f0da [IMP] mrp: improve the usability of workorder Gantt view
- display WO in red which has a late planned start date.
- hide the WO which are in done or cancel state.
- show progress of WO.

task-1939533
2019-08-28 08:30:42 +00:00
Kaushalya MandaliyaandMohammed Shekha e8e3ba96dc [FIX] mrp: work order overlap issue when applying group by status
workcenter overview kanban view card width is not same for all cards,
also kanban card overlap in grouped view, to fix this apply width on
o_kanban_record class instead of inline css, also apply width in
o_kanban_group to have same width for all cards in grouped view

task-2052465

closes odoo/odoo#35803

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>


Co-authored-by: Mohammed Shekha <msh@odoo.com>
2019-08-21 12:53:49 +00:00
Hetashree Chauhan cdc8bf4bb1 [IMP] mrp, maintenance: back to basics
Modify tree view for MRP Production
Modify form view and tree view for Unbuild orders
Add group by for Bill of Materials
By default show line shart when opening MRP Production report
Modify view for Work Orders
Modify view for Work Centers
Modify view for Routings
Modify view for Maintenance Request
Modify view for Bill of Materials

task-2042304
closes - https://github.com/odoo/odoo/pull/35482
2019-08-14 12:13:27 +00:00
jpr-odooandpga-odoo 8bf1486da5 [IMP] mrp: added support embedded google slide on work center
This commit adds new `embed_viewer` widget which will be used display URLs
via embedded iframes.  You can add any valid URL to display page via iframe,
although widget automatically converts raw google slide URL into embedded URL.

Task ID: 1909010

closes odoo/odoo#29404

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>


Co-authored-by: pga-odoo <pga@odoo.com>
2019-08-01 13:34:58 +00:00
Nans Lefebvre b65d5efd02 [FIX] mrp: show the real duration for all users
The duration field ('real duration') only showed the duration spent
for the currently logged user; this was confusing to user.
We remove the domain on the user to show the same duration to all users.

opw 2029830

closes odoo/odoo#34649

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-07-08 11:00:10 +00:00
Arnold Moyaux 36b976ccee [FIX] mrp: display all information for pdf
mrp_plm in OE uses the child_bom and prod_id from lines obtains
by _get_pdf_line in the case of a pdf report. It was already pass
by _get_bom_lines with the html report. It implies that the pdf and
html report could be different.

Task : 1939278
Closes #32340
2019-06-11 12:44:14 +00:00
Ankita Raval 5a34d64a44 [FIX] mrp: bom structure report
The "BoM Structure report" should not include the cost of the products
as it is often shared with third parties. We now only display the cost
on the "BoM Structure and Cost report" and remove the "BoM Cost report"
as it is redundant with the former.

Task Id: 1969709

closes odoo/odoo#33323

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-06-11 12:39:15 +00:00
Varun Raval 4d7de56300 [IMP] mrp: improve labels for print buttons on bom structure report
Task ID: 1998237

closes odoo/odoo#33411

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-16 05:50:32 +00:00
edae92c880 [REF] mrp: adapt code after jQuery update
Part of task 1896658

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
Co-authored-by: svs-odoo <svs@odoo.com>
Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-03-06 20:07:17 +01:00
Christophe Simonis 3cbc9dd6c0 [MERGE] forward port branch 12.0 up to 6a0675d36d 2019-01-14 10:34:50 +01:00
Nicolas Martinelli d0d8b7b4de [FIX] mrp: BoM Structure report
Send the context for proper translation of the report.

opw-1908220

closes odoo/odoo#30038
2019-01-08 14:37:02 +00:00
b1ef0001f6 [REF] *: adapt all client actions
to ControlPanel/Search view refactoring.

The ControlPanel being now inside the DOM of client actions, those
existing widgets needed to be adapted (in the way they define if
and how they want a ControlPanel, and in the way the manipulate
their DOM as it slightly changed). Tests needed to be adapted as
well.

Part of task 1893568

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
2018-12-07 13:16:07 +00:00
Géry Debongnie abf32b8b21 [REF] *: update js test suite to use helpers
This rev. introduces robust helpers to use in the JS tests suite to
interact with DOM and components, and starts using them (almost)
everywhere.

All the helpers are exposed though testUtils.js.

There are 2 kinds of helpers:

1. Assertions
-------------
 * assert.containsNone, containsN, containsOnce check that the DOM
   (or a specific part of the DOM) contains a `selector`. It
   generates a correct error message automatically.
    ex: assert.strictEqual(form.$('.o_form_editable'), 1, "msg");
        -> assert.containsOnce(form, '.o_form_editable');
 * assert.isVisible, isNotVisible check that the DOM has an element
   visible or not. They also check that the element is actually in
   the DOM (before most tests didn't verify this).
 * assert.hasClass, doesNotHaveClass, hasAttrVAlue, check specific
   properties of a DOM element, and also validate that it is
   applied on a single existing DOM element (before most tests
   didn't verify this).
    ex: assert.notOk(form.$('button').hasClass('btn-primary'));
       -> assert.doesNotHaveClass(form.$('button'), 'btn-primary');

2. Utilities
------------
The goal of the utilities is to centralize the definition of many
standard components and interactions, ensuring that when we
refactor the JS framework, we do not need to change all the tests.

Existing mock utilities (addMockEnvironment, intercept, path,
patchDate, unpatch and fieldsViewGet) are moved to
'testUtils.mock.*'.
Existing DOM utilities are moved to 'testUtils.dom.*'.
New dom utilities are created for opendDatePicker, click,
clickFirst and clickLast. Helper `click` verifies that there is
exactly 1 element visible in the DOM you click on, `clickFirst`
and `clickLast` verify that there are more than one element on the
DOM.
 ex: form.$('button').click();
     -> testUtils.dom.click(form.$('button'));

New Form utilities: (testUtils.form.*)
 clickEdit, clickSave, clickCreate, clickDiscard, all clicks on
 the control panel buttons of the form.
 `reload` reloads the form data.

New modal, graph, kanban and pivot utils (testUtils.pivot.*,
testUtils.kanban.*, etc.).

New fields utils: (testUtils.fields.*)
 * editInput, editSelect: allow to change the value of a field,
   using a selector to identify it. They validate that the input
   exists and trigger the change event automatically.
 * editAndTrigger: allow to modify a field and trigger specific
   events after the value change
 * many2one (testUtils.fields.many2one.*)
   clickOpenDropdown, clickHighlightedItem, clickItem,
   searchAndClickItem: use a field name instead of a selector and
   do all the complex mechanism to open, filter and highlight
   many2one fields.

Joint work with aab, dam, ged, mge, svs and vsc.
2018-11-19 11:24:28 +00:00
Swapnesh Shah 87a9780270 [FIX] mrp: print bomstructure report with float quantity
Usecase to reproduce (chrome):
- Create a BoM with float quantity in component
- Print the BoM cost and structure report

When using a type="number" on firefox it is not possible to use a
decimal. However on chrome there is no restriction and a decimal
could be use. It makes senses to be able to work with decimal
(e.g. the UoM is in kg)

It also exists an explicit cast to integer since data are received as
string from the javascript. However since quantity displayed could be
decimal, the cast should be adapted to float.

Closes #27464
Fixes #27437

closes odoo/odoo#27522
2018-10-08 09:33:04 +00:00
Arnold Moyaux ecc8ff8260 [FIX] mrp: fix bom structure report link
complete commit e31048f6a4
scss cursor is not needed since it is already set on btn element that
are activate.
2018-09-13 14:16:22 +02:00
Christophe Simonis a7a30791de [MERGE] forward port branch saas-11.4 up to a5187cef10 2018-08-27 11:16:44 +02:00
Christophe Simonis 9f99eb9cb0 [MERGE] forward port branch saas-11.3 up to 3be46428cc 2018-08-24 22:12:20 +02:00
tanghulu0608 e1d4b48d8e [FIX] web: correctly apply pdf_viewer style
The pdf_viewer widget has been moved from mrp to web in rev. odoo/odoo@a7b521f
but the corresponding style was still in the mrp module. It's now put in the
right place.

Closes #26449
2018-08-22 11:40:40 +02:00
Vandan Shah e31048f6a4 [FIX] mrp: BS4, restore report's links design 2018-08-17 12:46:14 +02:00
Christophe Simonis 0ac7f8fbe6 [MERGE] forward port branch saas-11.4 up to dabe59df9c 2018-08-14 20:16:03 +02:00
Christophe Simonis dabe59df9c [MERGE] forward port branch saas-11.3 up to 27d8daf8a7 2018-08-14 19:43:32 +02:00
Prakash Prajapati c69a6c6509 [FIX] mrp: see full name of 'report' option in BoM 'Structure & Cost' report
Before this commit, when we opened the report "Structure & Cost" of a Bill of
Materials of a product without any variant, the dropdown option selection
'report' had the current selection name cut. For instance, the selection
"BoM Structure & Cost" was displayed as "BoM Structure".

This was due to each option having a width determined by the bootstrap
classname `col-md-4`, independently on the number of options that are
available.

There are either 2 or 3 options at the top of this report, depending on whether
the product of the BoM has variants or not. When there are 3 options, there is
not problem. However, with 2 options (i.e., without variants), each option
available horizontal space is reduced, so that the 'report' option is shrunk,
which cuts the text selection as a result.

This commit fixes this problem when there are 2 options (= "no variant"),
so that the 'report' option uses more horizontal space.

Task-ID 1864490
Closes #25643
2018-08-10 10:15:20 +02:00
stefanorigano 1d9208c4fa [REF] *: improve app icons, add SVG version
- Uniform colors and design
- Replace duplicated icons (eg. sale / sale_management)
- Improve misleading icons (eg. POS)
- Add icons for new apps

Add SVG versions to lossless future editing and print/marketing use.

task-54681
2018-08-09 15:46:06 +02:00
Ankit Joshi de7277c6a9 [FIX] mrp: Print Unfloded print all columns.
Take care of the report type set on the html report.

Task id: 1857701.
2018-08-09 11:13:00 +02:00
Hetashree Chauhan 88bf279c46 [IMP] mrp: show product attachments in bom structure and cost report
Show all the documents related to products in the Bom Structure and costs report.
On click of the icon attachments, open all the documents/attachments related to product
and its template.

Task id : 1857701.
2018-08-09 11:13:00 +02:00
Priyanka KakadiyaandNimesh Jethva c7eae6552e [REM] various: remove index.html for apps.
Several applications have an index.html file that is used to fill the html
description of the module. However those descriptions are generally not
up to date: they contain outdated screenshots, feature descriptions are
not maintained, ...

Instead we just rely on the discover button that redirects on the application
website. It has more chance being up to date. Moreover updating a website
is easier than updating the index.html of a module.

This commit is related to task ID 47179 and 1861544. Related PR are #22689
and #25556. First one is about classic applications while second one is about
website applications.

Co-Authored-By: Nimesh Jethva <nje@odoo.com>
2018-08-03 14:54:42 +02:00
qsm-odoo ee65b44d9e [REF] *: BS4, adapt the label component structure
The '.label' elements have been replaced by '.badge' elements without
the 'badge-pill' class.
2018-07-27 12:36:54 +02:00
qsm-odoo ed1b18f103 [REF] *: BS4, adapt col-related classes
col-lg-* -> col-xl-*
col-md-* -> col-lg-*
col-sm-* -> col-md-*
col-xs-* -> col-*

col-lg-offset-* -> offset-xl-*
col-md-offset-* -> offset-lg-*
col-sm-offset-* -> offset-md-*
col-xs-offset-* -> offset-*

col-lg-pull-* -> order-xl-1
col-md-pull-* -> order-lg-1
col-sm-pull-* -> order-md-1
col-xs-pull-* -> order-1

col-lg-push-* -> order-xl-2
col-md-push-* -> order-lg-2
col-sm-push-* -> order-md-2
col-xs-push-* -> order-2
2018-07-27 12:36:54 +02:00