Skip to content

Commit

Permalink
[MIG] stock_orderpoint_generator to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiocorato committed Nov 6, 2023
1 parent 19d9086 commit e9bc149
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion stock_orderpoint_generator/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "Order point generator",
"summary": "Mass configuration of stock order points",
"version": "13.0.2.0.0",
"version": "14.0.1.0.0",
"author": "Camptocamp, " "Tecnativa, " "Odoo Community Association (OCA)",
"category": "Warehouse",
"license": "AGPL-3",
Expand Down
4 changes: 2 additions & 2 deletions stock_orderpoint_generator/models/orderpoint_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class OrderpointTemplate(models.Model):

auto_min_qty = fields.Boolean(
string="Auto Minimum",
help="Auto compute minimum quantity " "per product for a given a date range",
help="Auto compute minimum quantity per product for a given a date range",
)
auto_min_date_start = fields.Datetime()
auto_min_date_end = fields.Datetime()
Expand All @@ -53,7 +53,7 @@ class OrderpointTemplate(models.Model):
)
auto_max_qty = fields.Boolean(
string="Auto Maximum",
help="Auto compute maximum quantity " "per product for a given a date range",
help="Auto compute maximum quantity per product for a given a date range",
)
auto_max_qty_criteria = fields.Selection(
selection=[
Expand Down
3 changes: 1 addition & 2 deletions stock_orderpoint_generator/models/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def create(self, vals):
def write(self, vals):
result = super().write(vals)
if vals.get("auto_orderpoint_template_ids"):
orderpoint_templates = self.mapped("auto_orderpoint_template_ids")
orderpoint_templates.create_orderpoints(self)
self.auto_orderpoint_template_ids.create_orderpoints(self)
return result

def _get_stock_move_domain(self, domain_move=False, from_date=False, to_date=False):
Expand Down
11 changes: 3 additions & 8 deletions stock_orderpoint_generator/views/orderpoint_template_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
<field name="model">stock.warehouse.orderpoint.template</field>
<field name="mode">primary</field>
<field name="arch" type="xml">
<tree string="Reordering Rule Templates">
<tree>
<field name="name" />
<field name="warehouse_id" groups="stock.group_stock_multi_locations" />
<field name="location_id" groups="stock.group_stock_multi_locations" />
<field
name="product_min_qty"
attrs="{'invisble': [('auto_min_qty', '!=', False)]}"
attrs="{'invisible': [('auto_min_qty', '!=', False)]}"
/>
<field
name="product_max_qty"
attrs="{'invisble': [('auto_min_qty', '!=', False)]}"
attrs="{'invisible': [('auto_min_qty', '!=', False)]}"
/>
<field name="auto_min_qty" />
<field name="auto_max_qty" />
Expand Down Expand Up @@ -104,11 +104,6 @@
<group string="Misc">
<field name="active" />
<field name="auto_generate" />
<label for="lead_days" />
<div class="o_row">
<field name="lead_days" />
<field name="lead_type" />
</div>
</group>
<group
name="auto_minimum"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<field name="arch" type="xml">
<form string="Reordering Rules Generator">
<label
for="orderpoint_template"
for="orderpoint_template_id"
string="This wizard will apply the following orderpoint to selected product(s)"
/>
<group string="Templates" colspan="4">
Expand Down

0 comments on commit e9bc149

Please sign in to comment.