Skip to content

Commit

Permalink
fixup! fixup! Merge branch '10.0-add-sale_order_type_trigger' of gith…
Browse files Browse the repository at this point in the history
…ub.com:SimoRubi/sale-workflow into 10.0-add-sale_order_type_trigger
  • Loading branch information
SimoRubi committed Dec 3, 2018
1 parent 9ea9032 commit bc79830
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions sale_order_type/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Usage

* Go to **Sales > Sales Orders** and create a new sale order. Select the new type you have created before and all settings will be propagated.
* You can also define a type for a particular partner if you go to *Sales & Purchases* and set a sale order type.
* You can also find the matching order type by clicking on the button *Find by rule* placed near the *Type* field

Bug Tracker
===========
Expand Down
8 changes: 6 additions & 2 deletions sale_order_type/models/sale_order_type_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ class SaleOrderTypeRule(models.Model):
sequence = fields.Integer(default=10)
order_type_id = fields.Many2one(
comodel_name='sale.order.type', ondelete='cascade')
product_ids = fields.Many2many(comodel_name='product.product')
product_category_ids = fields.Many2many(comodel_name='product.category')
product_ids = fields.Many2many(
comodel_name='product.product',
string='Products')
product_category_ids = fields.Many2many(
comodel_name='product.category',
string='Product categories')

@api.multi
def matches_order(self, order):
Expand Down
1 change: 1 addition & 0 deletions sale_order_type/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ <h1><a class="toc-backref" href="#id2">Usage</a></h1>
<ul class="simple">
<li>Go to <strong>Sales &gt; Sales Orders</strong> and create a new sale order. Select the new type you have created before and all settings will be propagated.</li>
<li>You can also define a type for a particular partner if you go to <em>Sales &amp; Purchases</em> and set a sale order type.</li>
<li>You can also find the matching order type by clicking on the button <em>Find by rule</em> placed near the <em>Type</em> field</li>
</ul>
</div>
<div class="section" id="bug-tracker">
Expand Down

0 comments on commit bc79830

Please sign in to comment.