Skip to content

Commit

Permalink
Merge branch '17.0' into 17.0-t-34327-mnp
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolascol committed Dec 13, 2023
2 parents e8da280 + 96d64c8 commit 0f69e2c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
4 changes: 2 additions & 2 deletions sale_barcode/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Sale Barcode',
'version': "16.0.1.0.0",
'version': "17.0.1.0.0",
'category': 'Sales',
'sequence': 14,
'summary': '',
Expand All @@ -38,7 +38,7 @@
],
'demo': [
],
'installable': False,
'installable': True,
'auto_install': False,
'application': False,
}
4 changes: 2 additions & 2 deletions sale_require_purchase_order_number/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Sale Require Purchase Order Number',
'version': "16.0.1.0.0",
'version': "17.0.1.0.0",
'category': 'Sales',
'sequence': 14,
'summary': '',
Expand All @@ -39,7 +39,7 @@
],
'demo': [
],
'installable': False,
'installable': True,
'auto_install': False,
'application': False,
}
5 changes: 1 addition & 4 deletions sale_require_purchase_order_number/models/account_move.py
Expand Up @@ -9,10 +9,7 @@
class AccountInvoice(models.Model):
_inherit = "account.move"

purchase_order_number = fields.Char(
readonly=True,
states={'draft': [('readonly', False)]},
)
purchase_order_number = fields.Char()

@api.constrains('state', 'purchase_order_number')
def check_missing_po_number(self):
Expand Down
4 changes: 0 additions & 4 deletions sale_require_purchase_order_number/models/stock_picking.py
Expand Up @@ -15,14 +15,10 @@ class StockPicking(models.Model):
)
manual_purchase_order_number = fields.Char(
'PO Number',
states={'cancel': [('readonly', True)],
'done': [('readonly', True)]},
)
purchase_order_number = fields.Char(
compute='_compute_purchase_order_number',
inverse='_inverse_purchase_order_number',
states={'cancel': [('readonly', True)],
'done': [('readonly', True)]},
)

@api.depends('group_id', 'sale_id')
Expand Down
Expand Up @@ -6,7 +6,7 @@
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='other_info']//field[@name='invoice_origin']" position="after">
<field name="purchase_order_number"/>
<field name="purchase_order_number" readonly="state != 'draft'"/>
</xpath>
</field>
</record>
Expand Down
Expand Up @@ -6,7 +6,7 @@
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<field name="origin" position="after">
<field name="purchase_order_number" attrs="{'invisible': [('picking_type_code','!=','outgoing')]}"/>
<field name="purchase_order_number" invisible="picking_type_code != 'outgoing'" readonly="state in ['cancel', 'done']"/>
</field>
</field>
</record>
Expand Down

0 comments on commit 0f69e2c

Please sign in to comment.