• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OCA / stock-logistics-warehouse / 1662
80%

Build:
DEFAULT BRANCH: 9.0
Ran 29 May 2017 08:53PM UTC
Jobs 2
Files 56
Run time 41s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1662

push

travis-ci

pedrobaeza
[IMP] stock_orderpoint_generator: Add Automatic Reordering Rules (#258)

And improve the wording

* Add an option to automatically generate rules

When a product variant is created with a (or several) rule template(s), it
automatically generates (on the fly) the corresponding rule(s). When a rule template
is modified, it automatically updates the existing rules of the linked
products (it uses the mechanism in place, disable the old and create a
fresh one). The latter update is done by a cron because it might take a
long time to update all the products reordering rules.

* Add documentation

* Copy orderpoint views to orderpoint templates

Unfortunately we cannot rely on the possibility to copy a view with
"inherit_id" + "mode=primary" in Odoo 9.0 in this use case (precisely
with a model that is a "copy by prototype").

The explanation:

We "copy by prototype" the model "stock.warehouse.orderpoint" to a new
"stock.warehouse.orderpoint.template" model (with both _inherit and
different _name). Before this commit, we were reusing the
stock.warehouse.orderpoint's views, just making the changes needed for
the templates. Thing is: when a third (unrelated) addon adds a column on
the model, the ORM doesn't add the column in the
stock.warehouse.orderpoint.template model. So the templates' views
complains about this unexisting field.

Therefore, copy-pasting the view ensure that changes on
'stock.warehouse.orderpoint' does not have any side effect on the
templates.

From Odoo 10.0, the "copy by prototype" reports the changes made on the
"prototype" model to the "copy" so we should be able to revert to the
"inherit_id" + "mode=primary" views.

28 of 28 new or added lines in 2 files covered. (100.0%)

1586 of 1754 relevant lines covered (90.42%)

1.81 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
100.0
stock_orderpoint_generator/models/product.py
7
100.0
stock_orderpoint_generator/models/orderpoint_template.py
Jobs
ID Job ID Ran Files Coverage
3 1662.3 (TESTS=1 ODOO_REPO="odoo/odoo" LINT_CHECK="0") 29 May 2017 08:53PM UTC 0
90.42
Travis Job 1662.3
4 1662.4 (TESTS=1 ODOO_REPO="OCA/OCB" LINT_CHECK="0") 29 May 2017 08:54PM UTC 0
90.42
Travis Job 1662.4
Source Files on build 1662
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1662
  • c92dc140 on github
  • Prev Build on 9.0 (#1647)
  • Next Build on 9.0 (#1668)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc