Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge from master #3

Merged
merged 5,156 commits into from Aug 9, 2018
Merged

merge from master #3

merged 5,156 commits into from Aug 9, 2018

Conversation

linkeyeasy
Copy link
Owner

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

qsm-odoo and others added 30 commits July 27, 2018 12:36
`table-condensed` -> `table-sm`

Also SCSS variables were renamed.
Also restore list view design.
Before this commit, Odoo used checkboxes in three different ways:

- A simple <input type="checkbox"/>, mainly in the frontend. The style
  is browser dependant.

- Same as above but with the BS3, checkbox structure. The style is still
  the same, but the alignement is supposed to be better (which is not
  always the case).

- The Odoo official structure:
	```
	<div class="o_checkbox">
	    <input type="checkbox"/>
	    <span/>
	</div>
	```
  which allows to have a cross-browser checkbox style and correct
  alignements.

The goal after this commit is to only use the BS4 *custom* checkbox
structure to achieve the same goal as our official structure (and
remove that one):

```
<div class="custom-control custom-checkbox">
  <input type="checkbox" class="custom-control-input" id="customCheck1">
  <label class="custom-control-label" for="customCheck1">...</label>
</div>
```

/!\ Labels are now required (use a zero-width space if necessary)
The '.badge' elements must now also use the 'badge-pill' class to get
the same style as before as '.badge' elements without it are meant to
replace the old 'label' component.
Carousel items must now have the 'carousel-item' class.
Pagination elements' items must now have the 'page-item'/'page-link'
classes.
The '.label' elements have been replaced by '.badge' elements without
the 'badge-pill' class.
Use BS4 *custom* structure for radio buttons to allow customizing
their style and have cross-browser style.
In a previous commit, we removed the use of the 'btn-sm' classes as we
used it everywhere for default-size buttons instead of customizing the
size of those default-size buttons directly.

This commit proves it was even more necessary as the 'btn-xs' class does
not exist anymore in BS4 and we so can use the 'btn-sm' class instead.
* calendar

Bootstrap removed its definition of the text-overflow mixin, so we
now must use our own (which is better anyway).
* project

Colors are now handled by bg-* utility classes.
Only two classes remain to declare a media structure:
'media' and 'media-body'. 'media-left/right' are guessed by their
position using the flex layout.

Also, the 'media-list' class has been dropped but <ul/> element
should use the 'list-unstyled' class instead.

Like all other components, spacing between medias are now to be
handled explicitely thanks the spacing utility classes.
* payment, portal, website, website_sale, website_sale_delivery

The way we used BS3 was not always perfect/conventional and was thus
not BS4 compatible at all.

Also improve the general look of some screens.
* survey, website_slides

Before this commit, the web_editor app created bg and text classes its
own way for theming (alpha, beta, grays, ...). Now the system is far
more automatic by extending BS4 color maps.
* portal, web_tour, website, base

Before this commit, there were 3 different implementations for the same
feature: the "more" button in the community navbar, the "+" button for
the website menu and the "+" button in the enterprise navbar. As those
implementation were now broken with BS4, it was a good time to share the
code of those 3 features.
The big plan is to remove our current editor and its customization and
replace it with an updated summernote. Meanwhile, we have to patch our
current lib directly so that it works with BS4.
* iap

The layout is still not ok and should be improved but this commit at least
make it functional.
* website_sale_comparison, website_sale_wishlist

<a/> elements without any href are now styled differently with BS4...
but we should never use one of those. Replaced those by <button/>
elements.
BS4 do not provide vendor prefixes scss mixins anymore as it is meant
to be used with the 'autoprefixer' library. As we only support the last
version of every major browsers in Odoo, we took the decision to not
use the library as it was also complex to integrate in Odoo. We decided
to do the library's work by hand if it ever become necessary.

This commit was made because we found a case where it is necessary: flex
display and flex property are not understood by PhantomJS, so lots of
our JS tests failed because some elements were considered (in)visible
while they are in fact not (in an updated browser). This commit should
be reverted once we implement a better alternative to PhantomJS.
One small village of indomitable Gauls still holds out against the
invaders. With previous commit, some BS4 tests were solved by patching
our assets bundling system. This commit handles the only remaining test
that fails... by disabling it. Again, only PhantomJS fails to execute
that test, so this test should simply be reenabled by reverting this
commit as soon as we implement a better test system than PhantomJS.
The test which checks if the table column widths do not change when
switching to edit mode and back to readonly mode was not properly
written, which made its debugging difficult.
See sub-commits for details.

task-49280
Closes #25045
To reflect all the unstable changes made in translations
Before this commit, when someone was editing a password, the stored
password may not be the expected one by the user.

Steps to reproduce:

	1. Open "Outgoing Mail Servers" form.
	2. Set a password (e.g. "yop").
	3. Save, then edit.
	4. Add "y" at the end of the password field.

	> Expected value: "yopy"
	> Actual value: "***y"

This is due to the use of the char field formatter, which displays passwords
by replacing the characters with '*'. It is not necessary to do this in edit
mode, because it uses an input field of type 'password'. The browser
automatically hides the value of such inputs.

Any changes on a input field in edit mode uses the value of the input, so the
value of an password input should contain the password, without '*'.

This commit fixes the issue by using the formatter in edit mode for the input
of type 'password'.

Task-ID 1869565
In af64780 an improvement was done so a numerical fields like '-500'
was not breaked up over two lines after the hyphen.

But it seems in a very particular case of printing PDF in a given
combination of condition:

- printing over wkhtmltopdf which itself uses an old version of webkit
- particular font (issue happen with Arial but not "Segoe UI")
- particular version of windows (windows server 2012, not on windows 10)

the - character at the front of a monetary, float or integer field would
be displayed as | erroneously.

The problem is probably that the font system in the old webkit with
given windows will not find the code point in the given font, and
doesn't fallback correctly.

This commit replace using the "NON-BREAKING HYPHEN (U+2011)" by using
the "ZERO WIDTH NO-BREAK SPACE (U+FEFF)" which is an invisible character
with no width that prevent splitting at its location.

As a note, an alternative to this character is "WORD JOINER (U+2060)"
that may be preferred, but it presents exactly the same issue (with
-|500 instead of -{WORD JOINER}500) in the same environment.

mentioned in https://www.odoo.com/forum/1/question/118653
opw-1867842
fixes #17093
fixes #25840
closes #26019
kirti-c and others added 29 commits August 8, 2018 14:51
A service type product should be counted in hours instead of units
* product_product, product_template :
    - Add `uom_name` field to display stat buttons with UoM's name.

* delivery:
    - Move field 'HS Code' from `General Information` to `Accounting`.

* hr_expense:
    - Make checkbox `Can be Expensed` visible for all products.

* mrp:
    - Stat button update, we now count the uom quantity of product we have in our MOs
      limited to the last 365 days. Before that we were counting all the MOs.

    To achive this,
        - Add a stored compute field `product_uom_qty` on `mrp.production`.
        - Stat button now uses `action_view_mos`
        - The field was called `mo_count`, renaming it to `mrp_product_qty` as its
          function changed.

* point_of_sale:
    - Add a new tab (`Point of Sale`) and moved the `Point of Sale` section
      previously located in `Sales` to this newly created tab.

* product_email_template:
    - Renamed header 'Email' to 'Automatic Email at Invoice'.

* purchase:
    - Improved tooltip of field 'property_account_creditor_price_difference'.
    - Set `product_uom` to `uom.product_uom_hour` instead of
      `uom.product_uom_unit` in demo data.
    - Add a stored compute field `product_uom_qty` on `purchase.order.line`.

* report_intrastat:
    - Move field `Intrastat` from `General Information` to `Accounting`.
    - For product template's form view, inherit from
      `product.product_template_form_view` instead of 'stock.view_template_property_form'.

* sale:
    - Move `expense_policy` from `Purchase` to `Sales`.

* stock:
    - Add a new section in `Inventory` called `Logistics`, and put fields
    - `Weight`, `Volume` and `Responsible` in it.
    - `incoming_qty` is now only visible in debug mode.

* website_sale:
    - Add a new tab 'eCommerce' and move 'eCommerce' section from 'Sales' tab to this newly created tab.
    - Rename 'eCommerce Categories' to 'Categories'.

Task: #51125
Closes: #23868
Purpose: better display duration. Label for hours / days is not very user
friendly when displayed left compared to the value. In this commit we
move the unit display right of the value and correctly display choices
related to the leave request date options.

Part of the spec: https://drive.google.com/file/d/1XQtw5ZiAebycXbeHmfbDYYwrFTRmkBNU/view

This commit is linked to task ID 1871812 and PR #26180.
Purpose: new menu organization

 * Dashboard (only for officer and manager like currently)
 * New Request (= leave requetss in calendar view)
 * My Leaves
 * Leaves Summary
 * Leaves Requests (in list view)
 * Allocation Requests
 * Managers (current menu is ok)
 * Reporting (current menu is ok)
 * Configuration (ok)

This commit is linked to task ID 1871812 and PR #26180.
Purpose: an employee shouldn't see the leave type menu in configuration
(access right)

This commit is linked to task ID 1871812 and PR #26180.
Purpose: according to tasks's specifications

 * place elements in order it is not changing according what you select
 * https://drive.google.com/a/odoo.com/file/d/18gat1lw8mo9NTqU3mDuXqvuZXlMRzASX/view?usp=drivesdk
 * https://drive.google.com/a/odoo.com/file/d/1fLKpnW6RcaQetYJ0Ep7vZ7YHr_pW8-x_/view?usp=drivesdk

This commit is linked to task ID 1871812 and PR #26180.
Purpose: better display duration. Label for hours / days is not very user
friendly when displayed left compared to the value. In this commit we
move the unit display right of the value and correctly display choices
related to the leave request date options.

This commit is linked to task ID 1871812 and PR #26180.
According to tasks purpose: clean leave view

See sub commits for more details.

This commit is linked to task ID 1871812 and closes PR #26180.
Purpose
=======

As a server action could add followers on a record, here the goal
is to be able to add a next activity on a record.

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

Based on the configured trigger, we can add a next activity on a record
by specifying :
- The activity type
- A summary
- A note
- A due date in x days/weeks/months
- A responsible
Purpose
=======

When you update a record on a server action, you can modify a field
value (like the partner id). It's boring to be forced to specify
the id on the server action line. It would be easier to search on the
record name.

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

A a server action line type 'Reference'. It allows to select the partner
name (Agrolait) instead of being forced to specify its id (3493).
Purpose
=======

If the model on a reference fields is not modified from the interface
by the user but by the server, the selection is not correctly
recomputed on the interface.

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

By calling super first on the '_reset' method, the new model
is taken into account when resetting the selection.
We don't want to use the name of the rule that created a move anymore,
so we propagate the origin of previous move if it has any and, use the
picking name of the previous move if doesn't hav any origin.

This behaviour make more sense as it will alway keep the origin of the
document that trigger the creation of a move.

TASK-1838639
- Receive products in 2 steps
- The product has a reordering rule
- On the PO generated, the source document should be the name of the reordering rule

Task-1838639
If the service bus are called and destroyed the rpc can be returned after, to
avoid a useless call to the database and unexpected behavior, we abort the
connection.
This change is usefull to convert the bus.bus into a sweet bus and cross tab bus service.
Actually, if we use the _rpc mixins in the bus, the long polling can't be abort, and
raise an exception.
We use the registry keys as name for the services.
Must move the service construction to intercept the request with the
test parameters
The purpose of this change is to make the code clearer and testable.

In this change, the 'tab_manager' static object was merged with the bus
cross tab.

Cleaning was done to clearly define private and public functions as well
as handlers. The methods are documented and the constants are now defined
on the class. The bus use the service behavior with 'trigger_up'.

'bus.CrossTab' who extend 'bus.Longpolling' are instantiated by the
bus service.

The class is always instantiated with a parent, or root in the case of the website
(im_livechat), to use the ajax and localstorage services. So the behavior, perhaps
logger or redefined by the parents.
- Change "Force Accounting Date" label in "Accounting Date" on
  inventory adjustments.
- 'accounting_date' only visible in debug mode
- Improvement tooltip of accounting_date,date

TASK-1819891
- Change label Pickings to  Transfers to be consistent with the stock
  module
- Improve landed cost error message when they cannot be applied

TASK-1819891
When the quantity of a purchase line id is changed, the unit price is
set to 0.0 if the PO partner has a seller line on the product and the
quantity choosen on the line cannot get a seller.

TASK-34233
- If ordered quantity is less than what supplier/vendor supplies then the price unit should be set to 0
- If vendor does not supply the ordered product then the unit price should still the same

TASK-34233
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.
Each line that contains a manufacturable product displays its
BoM (clickable with an html report). _get_bom_reference function
is used in order to add information about BoM in report (e.g plm
module add its version).

Task id: 1857701
Take care of the report type set on the html report.

Task id: 1857701.
Purpose
=======

Clean menus structure in website frontend and backend, for an easier navigation.

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

Website
-------

- Restructure menu
- Enterprise: Keep google analytics view in a dedicated menu item when ecommerce is
  installed:
    - Sales Dashboard(ecommerce dashboard)
    - Analytics (google analytics)
- Community: Keep both sales orders and google analytic dashboard on the same
  dashboard view
- Restore google analytics api option in website settings when ecommerce
  is installed

E-Commerce
----------

- Website > orders > orders: add default filter "from website" and remove it in
  the action. That way if you create an order manually there is still a way
  to find it from the menu (the salesteam is different)
- Default filter for abandoned cart menu
- Improve setting text and tooltip. It's not obvious that recovery emails must
  be sent manually. Replace with:
    - Title: Abandoned Carts
    - Subtitle: Send a recovery email when a cart is abandoned
    - Tooltip: Abandoned carts are all carts for which no transaction has
               been confirmed while the customer has filled in their address.
               You can find them in *Website > Orders > Abandoned Carts*.
               From there you can send a recovery email to stimulate the
               customers to resume their order.
    - Tooltip email template: This email template is suggested by default
                              when you send a recovery email.
    - Tooltip hours: Carts are flagged as abandoned after this delay.
    - Hour label: Cart is abandoned after .... hour(s).

Task ID: 1859170
@linkeyeasy linkeyeasy merged commit 99ae75d into linkeyeasy:master Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet