Commit Graph
42 Commits
Author SHA1 Message Date
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
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
qsm-odoo 6e4db7d13a [REF] *: review scss variables handling
Unlike LESS, SCSS variables are not lazy loaded. Our system has thus
to be updated. This commit creates new templates which are t-called
in assets bundles (to replace the old less_helpers template):

- web._assets_utils: regroups the mixins and functions which *can*
  (and so should) be available in every asset bundle

- web._assets_primary_variables: regroups the variables (or mixins
  used as variables) which *can* (and so should) be available in
  every asset bundle

- web._assets_secondary_variables: same as above but provides an
  environnement where all the 'primary' ones are accessible. This is
  for example useful to handle the community/enterprise split:

  // Community primary variables
  $o-pink-color: pink; // enterprise color
  $o-brand-primary: blue;

  // Enterprise primary variables
  $o-brand-primary: $o-pink-color;

  // Community secondary variables
  $o-my-darker-primary: darken($o-brand-primary, 5%);

  => If there was only one variable template, enterprise edition would
     have been able to define its primary color at the end but the
     darker primary would not have been updated. Using the "!default"
     system and putting enterprise definition above would not have
     solved the problem as the $o-pink-color would not have been
     accessible.

- web._assets_backend_helpers: regroups the variables, mixins and
  functions which *can* (and so should) be available in the backend
  asset bundle only. This is especially (only?) useful for bootstrap
  variables overriddes.

- web._assets_frontend_helpers: regroups the variables, mixins and
  functions which *can* (and so should) be available in the frontend
  asset bundle only. This is especially (only?) useful for bootstrap
  variables overriddes.

Note: bootstrap variables are not accessible in any of those anymore.
If you have variables that should depend on bootstrap, you have 3
solutions:

- Find another way: your variable is probably useless, use bootstrap
  variables directly or create a variable that will influence the
  value of bootstrap variables. E.g. instead of declaring:
  `$myvar: $bootstrapvar * 3`
  and using $myvar alone, declare:
  `$myvar: 3` and use `$myvar * $bootstrapvar` where needed.

- Declare a copy of the bootstrap variable and use that one. In that
  case, you should also force-set the real bootstrap one to be sure
  they match (this should be done in appropriate templates mentioned
  above). E.g.
  ```
  $o-boostrapvar: 5;
  ...
  $boostrapvar: $o-bootstrapvar;
  ```

- Set your variable to null and set it to your bootstrap expression
  in the file you will need it (where bootstrap variables are accessible)
  without forgetting to add the !default flag to allow overriddes.
  ```
  $myvar: null;
  ...
  $myvar: $bootstrapvar * 5 !default;
  ```

This commit also partly changes the variable names to follow the
convention:
$o-<app_id>-<name> where 'app_id' is the current's app name or a
meaningful unique identifier ("theme" for all themes for example, as
no multiple themes can be installed).
2018-04-18 15:59:19 +02:00
qsm-odoo 97aa0a8dec [REF] *: convert less content to scss content
Convert content so that the assets compile on app installation. The
style is still broken after this as the variables/mixins/... are not
defined in the right order (as it did not matter in LESS but does in
SCSS).

This commit basically changes:
- Variables: @​var_hello -> $var-hello
- Mixins: .mixin_world() {} -> @​mixin mixin-world {}
- Classes used as mixin: .my_class() -> @​extend .my_class
    - Here there were no other solution than to convert the use of
      a mixin call by the use of an extend as a first approximation
- LESS functions -> SCSS functions (e.g. fade -> rgba)
- Move first variable definition before the variable is used
    - Still need to make sure last variable definition is at the
      right place
2018-04-18 15:59:16 +02:00
qsm-odoo b04dec4025 [REF] *: rename all LESS files to SCSS
This is a simple renaming without adaptation.
2018-04-18 15:59:15 +02:00
Hiral Bhavsar 9201f92a4f [IMP] mrp: add new bom and cost report
Add a new report in order to display:
- bom structure and cost
- bom structure
- bom cost
The user is allowed to print multiple bom reports at once.
Print the report dynamically depending what have been unfolded.

In html the rendering is lazy, when unfolding the client make a request
to the server in order to get the html that will be append to the DOM.

For the pdf the kwargs unfolded could be used in order to render everything
at once.

With the help of:
Dhaval Suthar <dut@odoo.com>
Jigar Patel <jat@openerp.com>

task-36741
2018-04-06 17:05:14 +02:00
Martin Geubelle a7b521fe44 [MOV] web, mrp: move pdf_viewer widget
This widget is generic enough to be used in other modules than mrp so
we move it in the web module.

Closes #22569
2018-02-12 11:16:21 +01:00
Khoi Nguyen e73922855d [IMP] mrp: Allow page-setting fields for pdf widget
This revision allows the page number of a pdf file to be set via an
integer field. If the pdf widget is attached to the 'field' field, then
the page can be changed via the 'field_page' field.
2017-09-27 17:13:24 +02:00
Khoi Nguyen 8d5f103b58 [REF] mrp: Change demodata
This revision changes the BOM and routing of what was previously a
"computer desk". The aim is to provide a complete example which can be
used to showcase what can be accomplished with the new tablet view.
2017-09-27 17:13:24 +02:00
Martin Geubelle fc82e1e40a [FIX] mrp: correctly replace inputs in pdf_viewer widget
In the extended template `HiddenInputFile` there are actually two inputs
(one for image only and another one).

This widget needs to replace both of them otherwise the file selector will
be opened twice.
2017-05-24 08:25:23 +02:00
Géry Debongnie 33710d540c [FIX] web: small fixes in test framework
We fix in this commit three small issues in the test framework.

1. throw an explicit error when we try to do a fieldviewget in the mock
server with a model that does not exist.  This will make it easier to
figure out what went wrong when copy pasting a test from one file into
another, and forgetting to change the model in the createView parameters

2. wrap the result of special methods in the mock server in a deferred,
so we can simply return a value when using that functionality.  Also, it
is more consistent with the rest of the mock server

3. for iframes, we no longer change the src attribute to #test:url.
This had the problem of actually loading the page.  Instead, we change
it into about:blank and we copy the old url into the data-src attribute for
reference.
2017-05-11 09:53:08 +02:00
qsm-odoo 250e716c3a [REF] web, *: restore views design
Since the new views merge, a lot of design elements were broken. This
was particularly impacting the fields in the editable list view; indeed
the editable list view is not using an inline form view anymore so the
fields in the list were not properly styled as the LESS was still
defined assuming the form view environment (for example the invalid
fields were red for o2m fields in form view but not in editable list
view even though they got the right CSS class).

This commit refactor the LESS following these rules:
- No more division of non-layout and layout rules. Dividing LESS rules
  in x_layout.less and x.less was a mistake. Many rules can be
  considered to be layout and not layout at the same time, developers
  always have to switch from one file part to the other, many CSS
  selectors (and rules!) are duplicated for nothing, ...
- Field style is extracted from x_view.less and put in the new
  fields.less file. As before, the fields_extra.less will contain the
  rules specific to community so that the enterprise repo can override
  those by replacing the whole file.
- Many classes have been renamed so that o_form_x_y becomes o_x_y as
  many classes can now be applied outside of form view. These classes
  should not be used in templates anyway.

The commit also changes the DOM of fields so that it is more minimalist
(no useless parent div, etc).

Input elements are not automatically styled anymore, they have to get
the o_input class explicitely. This allows to fix lots of small style
bugs of previous versions (required monetary field had not the proper
style, readonly m2m tags appeared as editable, ...). This also improves
the LESS code.

The editable list view should also completely stop flickering on chrome
and firefox.

The commit also removes the orange outline on list view dirty cells.

The commit also removes deprecated static xml, LESS and other code.

Notice there are still styles to restore/fix and LESS to improve.
2017-05-04 12:07:30 +02:00
Martin Geubelle 1690f317ba [FIX] mrp: adapt mrp_time_counter fields widget
This widget behaviour hadn't correctly implemented with the new views.
This commit also introduces some tests.
2017-04-27 16:56:48 +02:00
Martin Geubelle 5a78f4bad7 [FIX] mrp: adapt bullet_state field widget
This field widget has been adapted to the new views.
This commit also introduces some tests.
2017-04-27 16:56:47 +02:00
Martin Geubelle 5ec62a0b31 [FIX] mrp: reintroduce pdf_viewer field widget
This field widget has been adapted to the new views.
This commit also introduces some tests.
2017-04-27 16:56:47 +02:00
Aaron Bohy 2e540eb3c1 [FIX] *: apply changes from web_studio
The new views and widgets (at least some of them) first landed
in web_studio (v10), and they we moved later to web, so changes
in web_studio need to be applied in web.
2017-04-11 19:44:38 +02:00
Géry Debongnie 905e01921f [REF] web, *: redesign all JS views
This commit introduce a full redesign of all JS views.  We started
basically from scratch.  The goal was to unify all the various views
under a common framework, to make them testable, to make then usable in
different conditions (in studio, or in the frontend), and to make our
lives easier.

Some important points are:
- we introduced new coding guidelines (camelCase, 80 chars width, ...)
- we have a brand new testing framework (still QUnit based)
- kanban view moved to the web addon
- calendar view (formerly web_calender) moved to web as well
- the tree view was removed
- all new code should be documented

We hope that this code is the start of a new era for the Odoo web
client, we want to have a high quality codebase, well documented, well
tested, well designed.

Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2017-04-11 19:44:38 +02:00
qsm-odoo fb363b572b [FIX] *: adapt odoo interface violet
Change color #a24689 to #875A7B

Commit https://github.com/odoo/enterprise/commit/8ac1c19fac7615fecd51e670f798d13158a4e53c
changed the odoo interface violet by changing the main LESS variable
but forgot there was many direct occurences in XML/HTML/... (for
example for the mobile browser color).

Even if it's community the odoo interface violet is used at many places
(module description, XML demo data, ...).
2016-10-05 10:29:00 +02:00
Ravi Gadhia 89c78e40cb [ADD] MRP: Add pdf viewer widget to view 'pdf' work instruction of workorder. 2016-09-30 16:31:46 +02:00
Haresh Shyara 6d9b4de939 [IMP] mrp: timer duration improvement 2016-09-02 18:17:52 +02:00
Josse Colpaert 2ddc35a530 [REF][NEWPIE] mrp: new MRP
This commit contains the core of the new MRP. It contains a whole refactoring
of the MRP application, with improved and new features, written in new API.
Among other here are the main manufacturing workflow improvements :

 - Picking type not only for pickings but also for manufacturing orders
 - Properties replaced by picking type
 - BoM can only be produced with its routing (no other)
 - Either produce without routing with only production orders, or produce with
   routing
 - By default, there is an order in the work orders (serially), but you can
   override it to be able to work in parallel
 - Time clocking on work orders and block time on work centers with reporting
   on OEE, performance, losses, ...
 - Real-time adaptation of timings on operations
 - Lots/serial numbers can be inputted like in the pickings on manufacturing
   orders.  It is also possible to input them in the work orders.
 - Material availability independent of production order state (possibility to
   start production when only part of it is there)
 - Work sheets on work orders
 - Put messages on work orders to make your workers pay attention to something
 - Full traceability link to see for each produced piece of stock, the
   consumed pieces, ...
 - Separate scrap object (a scrap is not done based on an original move
   anymore)
 - Separate unbuild system (if you want to unbuild into its original
   components)

Thanks to all people that helped during this development, notably but not
limited to Chirag A Dodiya (cod@odoo.com), Gaurav Panchal (gan@odoo.com),
Jignesh Rathod (jir@odoo.com), Mansi Trivedi (mtr@odoo.com), Pariket Trivedi
(ptr@odoo.com).
2016-07-04 16:22:37 +02:00
Yannick Tivisse a7e57d6d1a [IMP] Appswitcher: Better icons for some modules
For Manufacturing and Repairs, replace the gavel by a wrench. A gavel is a small hammer used by a judge; it is not used in manufacturing. Keep it for when we will have a Law app.

For POS, replace the briefcase by a screen:

For timesheet, replace the calendar by a clock:

For calendar, use the calendar:

For event, use a ticket, it's more generic than a martini glass:
2016-05-25 13:12:53 +02:00
Foram Shah f42a154138 updated the description of 'mrp' 2016-05-10 15:24:46 +02:00
Fabien Pinckaers 4c8e908b49 [IMP] Speed up app switcher loading: 645k --> 137k lossless compression for all icons 2016-02-26 11:39:38 +01:00
Fabien Pinckaers 3658a894bc [IMP] modules description, no external link 2015-09-04 11:59:55 +02:00
Fabien Pinckaers 44febcddfb [IMP] removing the concept of 'phantom BoM' --> equals a component being a kit 2015-08-29 17:28:35 +02:00
Simon Lejeune 74d1e43a40 [ADD] many addons: add new icons
This commits adds icons for most applications.  They are
necessary for the home menu in the enterprise edition.
2015-06-18 12:58:18 +02:00
Bhavik Bagdiya fede8a8cfb [IMP] mrp: usability onboarding
Various views and labelling changes
2015-03-09 21:14:28 +01:00
Aaron Bohy 3cae676619 [FIX] Use local copies of png instead of fetching them from websites
Debian does not allow fetching data from external website at runtime.
This fixes the privacy-breach-generic lintian warnings for Debian packaging.
The removed youtube url was a dead link...
2015-01-23 11:23:04 +01:00
Florian Hatat c4f5caa511 [FIX] mrp: Fix spelling error on 'manufacturing'
Changing .po files to avoid to retranslate existing terms.
Fixes #1328
2014-08-05 11:11:49 +02:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00
Anael Closson e3ecf7f4d4 [FIX] en_US typos - opw 606919
bzr revid: acl@openerp.com-20140422085837-9flv9ksh54ymvv7i
2014-04-22 10:58:37 +02:00
Stephane Wirtel bea411bb98 [IMP] Backport one feature from website: this feature allows to specify a file
path on the field tag fetching the right file instead of using the base64
encoded file in the field.

<field name="image" type="base64" file="base/static/img/main_partner-image.png" />

bzr revid: stw@openerp.com-20140109154550-a04qybctzaaqtrlr
2014-01-09 16:45:50 +01:00
Thibault Delavallée 186e878f26 [MERGE] [IMP] mrp: improved reference string + updated screenshots in description
bzr revid: tde@openerp.com-20130821110351-q7i42rmqgknh0yan
2013-08-21 13:03:51 +02:00
Amit Bhavsar (Open ERP) 3812f2d8c7 [imp img] Improve description Images for MRP.
bzr revid: amb@tinyerp.com-20130716101555-5i0l6y1xfbgq7b83
2013-07-16 15:45:55 +05:30
Christophe Simonis df8d972057 [IMP] */static/description/index.html: link to /start include app name
bzr revid: chs@openerp.com-20130715162504-9ntu1dj222rgv9ek
2013-07-15 18:25:04 +02:00
Antony Lesuisse fc70550ca2 [IMP] move html module description and icon
bzr revid: al@openerp.com-20130628100441-swpanf2jwcojygh4
2013-06-28 12:04:41 +02:00
Minh Tran 52ead43457 Changed module icons
bzr revid: mit@openerp.com-20111221173739-pl26y182tgjb1s2j
2011-12-21 18:37:39 +01:00
Minh Tran a64d3dbcbc Added modules icons for main apps
bzr revid: mit@openerp.com-20111214144815-itsfpfo68l2m0jnx
2011-12-14 15:48:15 +01:00
Antony Lesuisse 6525df4971 [MERGE] module icons
bzr revid: al@openerp.com-20111209132001-zkb3f7m76txkou4z
2011-12-09 14:20:01 +01:00