Skip to content

Commit

Permalink
[12.0] [FIX] purchase_ux & stock_ux: Remove old code.
Browse files Browse the repository at this point in the history
This code is since v9 now it's not necessary and this cause that field qty returned not visible in the tree view of PO.
  • Loading branch information
juanpgarza authored and jjscarafia committed Aug 31, 2021
1 parent 3784d55 commit 846450f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion purchase_stock_ux/views/purchase_order_views.xml
Expand Up @@ -17,7 +17,7 @@
<xpath expr="//field[@name='order_line']/tree/field[@name='qty_received']" position="after">
<field name="delivery_status" invisible="1"/>
<button name="button_cancel_remaining" type="object" string="Cancel remaining quanitity to be received. This will set line quantity equal to received qty and will cancel remaining moves" icon="fa-ban" confirm="This will set line quantity equal to received qty and will cancel remaining moves. This can not be undone. Are you sure you want to continue?" attrs="{'invisible': [('delivery_status', '!=', 'to receive')]}" groups="purchase.group_purchase_manager"/>
<field name="qty_returned" string="Returned Quantity" attrs="{'invisible': [('qty_returned', '=', 0.0)]}" invisible="not context.get('show_purchase')"/>
<field name="qty_returned" string="Returned Quantity" attrs="{'column_invisible': [('parent.state', 'not in', ['purchase', 'done'])]}" optional="show"/>
</xpath>
</field>
</record>
Expand Down
2 changes: 1 addition & 1 deletion purchase_ux/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Purchase UX',
'version': '12.0.1.2.0',
'version': '12.0.1.4.0',
'category': 'Purchases',
'sequence': 14,
'summary': '',
Expand Down
4 changes: 0 additions & 4 deletions purchase_ux/models/purchase_order_line.py
Expand Up @@ -14,10 +14,6 @@
class PurchaseOrderLine(models.Model):
_inherit = 'purchase.order.line'

# add context so show purchase data by default
order_id = fields.Many2one(
context={'show_purchase': True}
)
invoice_status = fields.Selection([
('no', 'Nothing to Bill'),
('to invoice', 'Waiting Invoices'),
Expand Down

0 comments on commit 846450f

Please sign in to comment.