-Test the function _bom_find to check that it searches the bom corresponding
to the properties passed or takes the bom with the smallest sequence.
For this commit: d357667df4279070b51af58cad55ef314688d69f
- Test the function _bom_explode to check that it only takes the lines with the
right properties.
For this commit: 6b6e71a3e0c86aa8a9b8c4f20eaa61b17c64ce7b
Now it's possible to put a property on a bom line.
For example, the bom for an apple pie and for an apricot pie can be made
in a single bom.
Three lines are necessary in the bom of the product "pie":
- First line with product " dough" without property
- Second line, with product "apple" with property "apple" if you want an apple pie
- Third line, with product "apricot" with property "apricot" if you want an apricot pie
The type of this bom pie must be "set" to allow the customer to assemblate
his favorite pie by himself.
Now to sell an apple pie, you must create a SO with the product "pie" and
the property "apple".
In that way, the delivery order consists of two lines:
- dough
- apple
The bom related to the product in a sale line order must be
filtered by the function _bom_find. If two boms can be applied
on a product, the bom with the smallest sequence is applied.
opw:632558
This fix gives the domain to the "See selection" view opened from a
FieldCharDomain.
In Odoo 8.0, this widget is available at two places:
- mass_mailing: Marketing > Mass Mailing | Mass Mailing > (any
newsletter) > "See selection".
- gamification: Settings > Gamification Tools > Challenge > (any
challenge) > "See selection".
With this fix the "Selected records" view display selected records.
closes#6463
opw-633201
The product margin computed on each line of a sale order must be
rounded according to the currency of the order pricelist.
Inspired from the field 'price_subtotal' in addons/sale/sale.py
Previously, we could unpublish an employee from the website, but there
was no simple way to publish it again after we leave the page.
This fix show the unpublished employees on the about us page for the
users who can modify these employees records.
closes#6416
opw-633462
The `tax_amount` of move lines is by default set to `0.0`.
Nevertheless, this default value is set by Odoo,
not by postgresql.
This is therefore likely that the `tax_amount` is set as
null instead of 0.0, in database.
Therefore, when getting this value directly with a SQL
request, this is possible that `null` will be returned.
Therefore, in this specific case, `res.get(record.id, 0.0`
could return `False`, if the sum of `tax_amount` is `null`,
and try to multiply a boolean with an integer is not possible:
`_rec_get(rec) * rec.sign`
opw-633903
The CSS on the linei with the "New" button of an bank statement
reconciliation wizard was only applied when there was only a multiple of
two "block" before.
Hence it worked when there was a multiple of 2 cases before, but if not
(for example when account_analytic_plans is installed) on:
- google chrome: the button is on the right (instead of on a line by its
own).
- firefox: idem, but also a difference in float display positioning
caused the parent container to not take floating elements into account
to calculate it's height.
This fix apply the CSS independently if the last block is even or odd.
Before this fix in firefox:
https://cloud.githubusercontent.com/assets/9977887/7315195/70ca5eca-ea6b-11e4-8892-1272f7ee0cb4.png
After this fix in firefox:
https://cloud.githubusercontent.com/assets/9977887/7315194/6e2b05ca-ea6b-11e4-9400-69c9cd587756.pngcloses#6459
opw-633703
Sales Order lines have a cancelled state, but this state is not
always considered when looping over lines. This check is
done in some places already and this patch's aim is to do it in the
remaining places.
- Cancel the procurement of a sale line in sale.order.line
instead of sale.order, so a line canceled individually with
sale_order_line.button_cancel will properly cancel it
procurement.
- Sale report: uses the state of lines instead of Sales order,
so canceled lines of not-canceled orders are correctly represented
in the analysis.
- test: do not create invoices lines for canceled sale lines
- test: creation of moves with canceled lines
- test: check if lines are still canceled when sale order is done
Closes#6036
When selectiong a dropshipped product in a sale.order, the user should not be
warned that the product is not available in stock (as it never goes to the stock
anyway but directly from the supplier to the customer).
Factorise verification in _check_routing method.
This issue is related to the wkhtmltopdf issue
https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2083
It seems there is a race condition in the Javascript file
loading in wkhtmltopdf 0.12.x.
The subst.js file put in the header/footer of reports
was not always loaded when the page was being rendered,
leading to the crash of the onload="subst()" attr in
the body node, leading to the non-rendering
of the header/footer.
Replacing the script file by its content solves
the issue.
Increasing the --javascript-delay of the wkhtmltopdf
executable (e.g. 1000 ms instead of 200 ms,
the default value) seems to solve the problem
as well, but will lead to obvious performance issues.
We therefore choose to put the javascript code inline,
as a workaround,
the time the issue is solved in wkhtmltopdf, at least.
closes #3047,#5548,#6207
opw-633161
The ir.ui.view.graph_get() method depended on the natural
semi-random order of Python dict keys in the _columns dict.
When the number and/or names of the _columns happened to
yield the o2m field of the "incoming transitions" *before*
the "outgoing transitions" of the "Node model"
(e.g. workflow activity), it would swap the incoming and
outgoing transitions fields around, causing a crash later
in the `tools.graph.process` method (currently an infinite
loop in the `tree_order()` method of tools.graph.py).
Closes#3614
Fixes https://bugs.launchpad.net/openobject-server/+bug/1316948
opw-633765
The company logo can't be customized because it's a t-field from the db.
This fix don't have to be forward ported because the problem is
already fixed in saas-6.
opw:632702
In the search input, the result of filtered search with an arrow was
placed under the currently selected arrow.
Hence if we get to another arrow filter before the result is received,
the result is added under the wrong arrow.
This fix adds the result under the right arrow.
closes#6442
opw-632519
Make sure the purchase order is marked as invoiced only when fully invoiced.
If the invoices are generated on delivery order (invoice_method picking), make
sure all products are delivered before setting it as invoiced.
opw 614256
When the user is not logged, there is no branding for the options.
This is why, the product_id of the option must be written in the
template "optional product".
opw:633093
The onchange handler is doing a weak comparison between the values received from
the onchange() method and the current field value, which leads to a falsy value
such as "0000" being treated as equal to False.
This patches changes the operator to enforce non-coercive equality.
Fixes#6405
Ensure correct sequence of bank statement action views.
As the views are sorted based on the sequence, make sure the tree is selected
before the form view.
Fixes#6413
The previous filters didn't take timezones into account, and
returned stringified naive datetime values in local browser
time. Those would then be interpreted by the server-side as
UTC date, and depending on the current timezone offset vs UTC,
yield partially incorrect results.
By returning directly a datetime.datetime object instead of
a stringified version (see previous commit 76881fb),
we can get the expected result regarless of the timezone.
Fixes#2972Closes#6229
opw-621282
This fix adds the toJSON() method to datetime.datetime,
so domain expressions can use datetime values directly,
without having to compute the stringified version
with convoluted strftime() and timezone calculations.
The datetime results are sent down to the JSON-RPC
level where the JSON.stringify() serialization will
convert them to UTC string, to be deserialized
properly as UTC datetime values on the server side.
Thanks to this we can use the browser's local midnight
timestamp in a filter expression, for example like this:
`datetime.datetime.combine(context_today(), datetime.time(0,0,0))`
and get the expected result regardless of the user/browser's
timezone.
related to issue #2972 and pull request #2914 and #6229
(Next commit will fix them)
opw-621282
Correctly creates menu and add implied groups.
Since the conversion from res.portal to res.group, we lost the field
parent_menu_id so a search is needed to find parent menu.
To add the access of existing users to the new groups, implied id rules are
needed. opw 612594
When automatically generating invoices, contract should browse the fiscal position by calling
the function get_fiscal_position of the account.fiscal.position class instead of checking the
property field on the partner
Previously, there was an exception when exporting unordinary table (e.g:
reports) coming from the export of the xml_id.
With this change, if the table is not ordinary, the xml_id is not
present in the exported file.
closes#6428
issue #6336
opw-633066
Fix stock warehouse column on purchase report,
we need to join stock_picking_type and stock_warehouse
in order to have the warehouse itself
Closes#6409
Double list comprehension is a nice try but does not work in python.
prod_ids was a list containing only the first variant, so getting the
product-specific pricelists only for the first variant of the first template.
Fixes#2900
When opening the list of meetings from an opportunity, show only the meetings
linked to the current opportunity.
Use search_default_ to be able to remove the filter if not needed.
Remove context on meeting button as it's ignored in action_makeMeeting (and
there is no field attendee_id linked to a crm.lead anyway)
opw 614039
The defaults of ir.values depends on the user company, but there is no
cache invalidation when the company of a user change.
This fix adds the clearing of the default's cache in this case.
Closes#6339
opw-629979
When canceling a bank.statement.line of a bank.statement
ready to be closed
(all lines reconciled,
reconcile button hidden and close button visible)
The form wasn't reloaded, and the reconcile button
was not displayed after having cancel the statement line
opw-632063
When a many2one field of a searchview was selected
by default, through a default_*_id within the context,
the many2one value name wasn't translated.
e.g. with Spanish loaded (and l10n_multilang installed),
translate a project.project name in Spanish.
Then, while being in Spanish, in the project.project kanban,
click on the Tasks link of a project (tareas),
then, notice the value of the project name in the
search bar.
opw-632818