Skip to content

Commit

Permalink
fix: mark imported fields as read only, use Currency fieldtype
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra committed Aug 26, 2024
1 parent 491a368 commit 9dfa0f3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,14 @@
"fieldname": "currency",
"fieldtype": "Link",
"label": "Currency",
"options": "Currency"
"options": "Currency",
"read_only": 1
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2024-08-26 14:45:42.598268",
"modified": "2024-08-26 14:52:01.324281",
"modified_by": "Administrator",
"module": "European e-Invoice",
"name": "E Invoice Import",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@
"fieldname": "product_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Product Name"
"label": "Product Name",
"read_only": 1
},
{
"fieldname": "product_description",
"fieldtype": "Small Text",
"label": "Product Description"
"label": "Product Description",
"read_only": 1
},
{
"fieldname": "column_break_grml",
Expand All @@ -60,12 +62,14 @@
"fieldname": "billed_quantity",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Billed Quantity"
"label": "Billed Quantity",
"read_only": 1
},
{
"fieldname": "unit_code",
"fieldtype": "Data",
"label": "Unit Code"
"label": "Unit Code",
"read_only": 1
},
{
"fieldname": "column_break_pmsf",
Expand All @@ -84,9 +88,11 @@
},
{
"fieldname": "net_rate",
"fieldtype": "Float",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Net Rate"
"label": "Net Rate",
"options": "currency",
"read_only": 1
},
{
"fieldname": "settlement_section",
Expand All @@ -96,18 +102,22 @@
{
"fieldname": "tax_rate",
"fieldtype": "Percent",
"label": "Tax Rate"
"label": "Tax Rate",
"read_only": 1
},
{
"fieldname": "total_amount",
"fieldtype": "Float",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Total Amount"
"label": "Total Amount",
"options": "currency",
"read_only": 1
},
{
"fieldname": "seller_product_id",
"fieldtype": "Data",
"label": "Seller Product ID"
"label": "Seller Product ID",
"read_only": 1
},
{
"default": "0",
Expand All @@ -121,7 +131,7 @@
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-08-26 14:10:15.375742",
"modified": "2024-08-26 14:50:15.775645",
"modified_by": "Administrator",
"module": "European e-Invoice",
"name": "E Invoice Item",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ class EInvoiceItem(Document):

billed_quantity: DF.Float
item: DF.Link | None
net_rate: DF.Float
net_rate: DF.Currency
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
product_description: DF.SmallText | None
product_name: DF.Data | None
seller_product_id: DF.Data | None
tax_rate: DF.Percent
total_amount: DF.Float
total_amount: DF.Currency
unit_code: DF.Data | None
uom: DF.Link | None
# end: auto-generated types

0 comments on commit 9dfa0f3

Please sign in to comment.