If you want to explore the quirks of naming_series, this might help (use with
bench --site yoursitename mariadb
):
select tabDocType.name as DT_name,istable as DT_T,naming_rule as DT_naming_rule,autoname as DT_autoname,fieldname as DF_fieldname,label as DF_label,fieldtype as DF_fieldtype,tabDocField.options as DF_options from tabDocType join tabDocField on tabDocType.name=parent where tabDocType.autoname="naming_series:" and tabDocField.fieldname="naming_series" order by DT_name;
+-----------------------------+------+--------------------------+----------------+---------------+---------------+--------------+---------------------------------------+
| DT_name | DT_T | DT_naming_rule | DT_autoname | DF_fieldname | DF_label | DF_fieldtype | DF_options |
+-----------------------------+------+--------------------------+----------------+---------------+---------------+--------------+---------------------------------------+
| Asset | 0 | By "Naming Series" field | naming_series: | naming_series | Naming Series | Select | ACC-ASS-.YYYY.- |
| Asset Capitalization | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | ACC-ASC-.YYYY.- |
| Asset Depreciation Schedule | 0 | By "Naming Series" field | naming_series: | naming_series | Naming Series | Select | ACC-ADS-.YYYY.- |
| Asset Maintenance Log | 0 | NULL | naming_series: | naming_series | Series | Select | ACC-AML-.YYYY.- |
| Asset Repair | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | ACC-ASR-.YYYY.- |
| Asset Shift Allocation | 0 | By "Naming Series" field | naming_series: | naming_series | Naming Series | Select | ACC-ASA-.YYYY.- |
| Bank Transaction | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | ACC-BTN-.YYYY.- |
| Blanket Order | 0 | NULL | naming_series: | naming_series | Series | Select | MFG-BLR-.YYYY.- |
| Budget | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Data | NULL |
| Campaign | 0 | NULL | naming_series: | naming_series | Naming Series | Select | SAL-CAM-.YYYY.- |
| Cashier Closing | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | POS-CLO- |
| Closing Stock Balance | 0 | By "Naming Series" field | naming_series: | naming_series | Naming Series | Select | CBAL-.##### |
| Customer | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | CUST-.YYYY.- |
| Delivery Note | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | MAT-DN-.YYYY.-
MAT-DN-RET-.YYYY.- |
| Delivery Trip | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | MAT-DT-.YYYY.- |
| Downtime Entry | 0 | NULL | naming_series: | naming_series | Naming Series | Select | DT- |
| Driver | 0 | NULL | naming_series: | naming_series | Series | Select | HR-DRI-.YYYY.- |
| Dunning | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | DUNN-.MM.-.YY.- |
| Employee | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | HR-EMP- |
| Installation Note | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | MAT-INS-.YYYY.- |
| Issue | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | ISS-.YYYY.- |
| Job Card | 0 | By "Naming Series" field | naming_series: | naming_series | Naming Series | Select | PO-JOB.##### |
| Journal Entry | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | ACC-JV-.YYYY.- |
| Landed Cost Voucher | 0 | NULL | naming_series: | naming_series | Series | Select | MAT-LCV-.YYYY.- |
| Lead | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | CRM-LEAD-.YYYY.- |
| Maintenance Schedule | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | MAT-MSH-.YYYY.- |
| Maintenance Visit | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | MAT-MVS-.YYYY.- |
| Material Request | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | MAT-MR-.YYYY.- |
| Opportunity | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | CRM-OPP-.YYYY.- |
| Payment Entry | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | ACC-PAY-.YYYY.- |
| Payment Order | 0 | NULL | naming_series: | naming_series | Series | Select | PMO- |
| Payment Request | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | ACC-PRQ-.YYYY.- |
| Pick List | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | STO-PICK-.YYYY.- |
| POS Invoice | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | ACC-PSINV-.YYYY.- |
| Pricing Rule | 0 | By "Naming Series" field | naming_series: | naming_series | Naming Series | Select | PRLE-.#### |
| Production Plan | 0 | By "Naming Series" field | naming_series: | naming_series | Naming Series | Select | MFG-PP-.YYYY.- |
| Project | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | PROJ-.#### |
| Project Update | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Data | PROJ-UPD-.YYYY.- |
| Purchase Invoice | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | ACC-PINV-.YYYY.-
ACC-PINV-RET-.YYYY.- |
| Purchase Order | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | PUR-ORD-.YYYY.- |
| Purchase Receipt | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | MAT-PRE-.YYYY.-
MAT-PR-RET-.YYYY.- |
| Quality Inspection | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | MAT-QA-.YYYY.- |
| Quotation | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | SAL-QTN-.YYYY.- |
| Request for Quotation | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | PUR-RFQ-.YYYY.- |
| Sales Invoice | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | ACC-SINV-.YYYY.-
ACC-SINV-RET-.YYYY.- |
| Sales Order | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | SAL-ORD-.YYYY.- |
| Serial and Batch Bundle | 0 | By "Naming Series" field | naming_series: | naming_series | Naming Series | Select | SABB-.######## |
| Shareholder | 0 | By "Naming Series" field | naming_series: | naming_series | NULL | Select | ACC-SH-.YYYY.- |
| Stock Entry | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | MAT-STE-.YYYY.- |
| Stock Reconciliation | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | MAT-RECO-.YYYY.- |
| Subcontracting Order | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | SC-ORD-.YYYY.- |
| Subcontracting Receipt | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | MAT-SCR-.YYYY.-
MAT-SCR-RET-.YYYY.- |
| Supplier | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | SUP-.YYYY.- |
| Supplier Quotation | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | PUR-SQTN-.YYYY.- |
| Supplier Scorecard Period | 0 | NULL | naming_series: | naming_series | Naming Series | Select | PU-SSP-.YYYY.- |
| Timesheet | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | TS-.YYYY.- |
| Warranty Claim | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | SER-WRN-.YYYY.- |
| Work Order | 0 | By "Naming Series" field | naming_series: | naming_series | Series | Select | MFG-WO-.YYYY.- |
+-----------------------------+------+--------------------------+----------------+---------------+---------------+--------------+---------------------------------------+
58 rows in set (0,003 sec)
For completeness and because the separate treatment of Customer naming is a quirk in its own right, here are two more queries for the adventurous explorer of the unknown horizons of the frappe universe:
MariaDB [...]> select parent,fieldtype,label,fieldname from tabDocField where parent="Selling Settings" order by idx;
+------------------+---------------+-------------------------------------------------------------------------+--------------------------------------------------+
| parent | fieldtype | label | fieldname |
+------------------+---------------+-------------------------------------------------------------------------+--------------------------------------------------+
| Selling Settings | Section Break | Customer Defaults | customer_defaults_section |
| Selling Settings | Select | Customer Naming By | cust_master_name |
| Selling Settings | Link | Default Customer Group | customer_group |
| Selling Settings | Column Break | NULL | column_break_4 |
| Selling Settings | Link | Default Territory | territory |
| Selling Settings | Section Break | Item Price Settings | item_price_settings_section |
| Selling Settings | Link | Default Price List | selling_price_list |
| Selling Settings | Select | Action if Same Rate is Not Maintained Throughout Sales Cycle | maintain_same_rate_action |
| Selling Settings | Link | Role Allowed to Override Stop Action | role_to_override_stop_action |
| Selling Settings | Column Break | NULL | column_break_15 |
| Selling Settings | Check | Maintain Same Rate Throughout Sales Cycle | maintain_same_sales_rate |
| Selling Settings | Check | Allow User to Edit Price List Rate in Transactions | editable_price_list_rate |
| Selling Settings | Check | Validate Selling Price for Item Against Purchase Rate or Valuation Rate | validate_selling_price |
| Selling Settings | Check | Calculate Product Bundle Price based on Child Items' Rates | editable_bundle_item_rates |
| Selling Settings | Check | Allow Negative rates for Items | allow_negative_rates_for_items |
| Selling Settings | Section Break | Transaction Settings | sales_transactions_settings_section |
| Selling Settings | Select | Is Sales Order Required for Sales Invoice & Delivery Note Creation? | so_required |
| Selling Settings | Select | Is Delivery Note Required for Sales Invoice Creation? | dn_required |
| Selling Settings | Select | Sales Update Frequency in Company and Project | sales_update_frequency |
| Selling Settings | Float | Blanket Order Allowance (%) | blanket_order_allowance |
| Selling Settings | Column Break | NULL | column_break_5 |
| Selling Settings | Check | Allow Item to be Added Multiple Times in a Transaction | allow_multiple_items |
| Selling Settings | Check | Allow Multiple Sales Orders Against a Customer's Purchase Order | allow_against_multiple_purchase_orders |
| Selling Settings | Check | Allow Sales Order Creation For Expired Quotation | allow_sales_order_creation_for_expired_quotation |
| Selling Settings | Check | Don't Reserve Sales Order Qty on Sales Return | dont_reserve_sales_order_qty_on_sales_return |
| Selling Settings | Check | Hide Customer's Tax ID from Sales Transactions | hide_tax_id |
| Selling Settings | Check | Enable Discount Accounting for Selling | enable_discount_accounting |
+------------------+---------------+-------------------------------------------------------------------------+--------------------------------------------------+
27 rows in set (0,001 sec)
to be linked with these settings:
MariaDB [...]> select * from tabSingles where doctype="Selling Settings";
+------------------+--------------------------------------------------+----------------------------+
| doctype | field | value |
+------------------+--------------------------------------------------+----------------------------+
| Selling Settings | allow_against_multiple_purchase_orders | 0 |
| Selling Settings | allow_multiple_items | 1 |
| Selling Settings | allow_negative_rates_for_items | 0 |
| Selling Settings | allow_sales_order_creation_for_expired_quotation | 0 |
| Selling Settings | blanket_order_allowance | 0 |
| Selling Settings | creation | NULL |
| Selling Settings | cust_master_name | Customer Name |
| Selling Settings | customer_group | NULL |
| Selling Settings | dn_required | No |
| Selling Settings | docstatus | 0 |
| Selling Settings | dont_reserve_sales_order_qty_on_sales_return | 0 |
| Selling Settings | editable_bundle_item_rates | 0 |
| Selling Settings | editable_price_list_rate | 0 |
| Selling Settings | enable_discount_accounting | 0 |
| Selling Settings | hide_tax_id | 0 |
| Selling Settings | idx | 0 |
| Selling Settings | maintain_same_rate_action | Stop |
| Selling Settings | maintain_same_sales_rate | 0 |
| Selling Settings | modified | 2024-06-27 11:12:49.828523 |
| Selling Settings | modified_by | Administrator |
| Selling Settings | name | Selling Settings |
| Selling Settings | owner | Administrator |
| Selling Settings | role_to_override_stop_action | NULL |
| Selling Settings | sales_update_frequency | Each Transaction |
| Selling Settings | selling_price_list | Standard Selling |
| Selling Settings | so_required | No |
| Selling Settings | territory | NULL |
| Selling Settings | validate_selling_price | 0 |
+------------------+--------------------------------------------------+----------------------------+
28 rows in set (0,001 sec)
The corresponding Supplier naming settings are left as an exercise to the reader, though.