Skip to content

Commit

Permalink
[FIX] sale_order_partials: empty parenthesis when order is not upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
mikelarre authored and oihane committed Feb 19, 2019
1 parent c3f8580 commit fe9cd26
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 20 deletions.
11 changes: 1 addition & 10 deletions sale_order_partials/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,10 @@ Partial Sale Orders

Creates related sale orders


Usage
=====

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/188/8.0


Credits
=======

Contributors
------------
* Mikel Arregi <mikelarregi@avanzosc.es>
* Ana Juaristi <anajuaristi@avanzosc.es>
* Ana Juaristi <anajuaristi@avanzosc.es>
9 changes: 5 additions & 4 deletions sale_order_partials/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"depends": [
"sale",
"stock",
"sale_order_type"
"sale_order_type",
],
"author": "OdooMRP team, "
"AvanzOSC, "
Expand All @@ -20,9 +20,10 @@
],
"category": "",
"summary": "",
"data": ["views/sale_order_view.xml",
"views/res_config_view.xml",
"wizard/duplicate_upgradable_sale_view.xml",
"data": [
"views/sale_order_view.xml",
"views/res_config_view.xml",
"wizard/duplicate_upgradable_sale_view.xml",
],
"installable": True,
}
4 changes: 2 additions & 2 deletions sale_order_partials/models/sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def _compute_line_quantities(self):
record.reserved_qty = record.reserved_child_qty() - served_qty
record.not_served_quantity = not_served_qty
record.served_quantity_percentage = (
served_qty / total * 100)
served_qty / total * 100)

@api.constrains("order_line", "upgrade")
def check_sale_upgradable_has_one_line(self):
Expand All @@ -56,7 +56,7 @@ def check_sale_upgradable_has_one_line(self):
@api.onchange("upgrade")
def onchange_upgrade(self):
if self.upgrade:
#TODO make to stock bezela markau
# TODO make to stock bezela markau
pass

@api.multi
Expand Down
2 changes: 1 addition & 1 deletion sale_order_partials/views/res_config_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
</field>
</record>
</data>
</openerp>
</openerp>
4 changes: 1 addition & 3 deletions sale_order_partials/views/sale_order_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@
attrs="{'invisible': [('parent_order_id', '!=', False)]}"/>
<field name="served_quantity" attrs="{'invisible': [('upgrade', '=', False)]}"/>
<label for="not_served_quantity" attrs="{'invisible': [('upgrade', '=', False)]}"/>
<div>
<div attrs="{'invisible': [('upgrade', '=', False)]}">
<field name="not_served_quantity"
attrs="{'invisible': [('upgrade', '=', False)]}"
class="oe_inline"/>
(<field name="reserved_qty"
attrs="{'invisible': [('upgrade', '=', False)]}"
class="oe_inline"
/>)
</div>
Expand Down

0 comments on commit fe9cd26

Please sign in to comment.