Skip to content

Commit

Permalink
[13.0] [IMP] sale_order_validity: Set the validity date be editable b…
Browse files Browse the repository at this point in the history
…y the sales manager.
  • Loading branch information
nicomacr authored and jjscarafia committed Nov 17, 2020
1 parent fb649b0 commit 9063d7a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sale_order_validity/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Sale Order Validity',
'version': '13.0.1.0.0',
'version': '13.0.1.1.0',
'category': 'Sales & Purchases',
'sequence': 14,
'author': 'ADHOC SA',
Expand Down
2 changes: 1 addition & 1 deletion sale_order_validity/models/sale_order.py
Expand Up @@ -15,8 +15,8 @@ class SaleOrder(models.Model):

validity_date = fields.Date(
help="Date until when quotation is valid",
readonly=True,
track_visibility='onchange',
states={},
)

date_order = fields.Datetime(
Expand Down
4 changes: 4 additions & 0 deletions sale_order_validity/views/sale_order_view.xml
Expand Up @@ -29,6 +29,10 @@
<field name="date_order" position="attributes">
<attribute name="readonly">False</attribute>
</field>
<field name="validity_date" position="attributes">
<attribute name="readonly">False</attribute>
<attribute name="attrs">{'invisible': [('state', 'in', ['sale', 'done'])], 'readonly': [('state', 'not in', ['draft','sent'])]}</attribute>
</field>
</field>
</record>

Expand Down

0 comments on commit 9063d7a

Please sign in to comment.