Skip to content

Commit

Permalink
Merge branch 'develop' into fix-incorrect-fg-item-qty-in-job-po
Browse files Browse the repository at this point in the history
  • Loading branch information
phot0n authored May 6, 2023
2 parents af16fbb + 23e7c14 commit 140cec8
Show file tree
Hide file tree
Showing 21 changed files with 32,094 additions and 32,136 deletions.
36 changes: 36 additions & 0 deletions erpnext/manufacturing/doctype/job_card/test_job_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,42 @@ def test_job_card_excess_material_transfer_block(self):
transfer_entry_2.insert()
self.assertRaises(JobCardOverTransferError, transfer_entry_2.submit)

@change_settings("Manufacturing Settings", {"job_card_excess_transfer": 0})
def test_job_card_excess_material_transfer_with_no_reference(self):

self.transfer_material_against = "Job Card"
self.source_warehouse = "Stores - _TC"

self.generate_required_stock(self.work_order)

job_card_name = frappe.db.get_value("Job Card", {"work_order": self.work_order.name})

# fully transfer both RMs
transfer_entry_1 = make_stock_entry_from_jc(job_card_name)
row = transfer_entry_1.items[0]

# Add new row without reference of the job card item
transfer_entry_1.append(
"items",
{
"item_code": row.item_code,
"item_name": row.item_name,
"item_group": row.item_group,
"qty": row.qty,
"uom": row.uom,
"conversion_factor": row.conversion_factor,
"stock_uom": row.stock_uom,
"basic_rate": row.basic_rate,
"basic_amount": row.basic_amount,
"expense_account": row.expense_account,
"cost_center": row.cost_center,
"s_warehouse": row.s_warehouse,
"t_warehouse": row.t_warehouse,
},
)

self.assertRaises(frappe.ValidationError, transfer_entry_1.insert)

def test_job_card_partial_material_transfer(self):
"Test partial material transfer against Job Card"
self.transfer_material_against = "Job Card"
Expand Down
19 changes: 19 additions & 0 deletions erpnext/stock/doctype/stock_entry/stock_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def validate(self):
self.validate_fg_completed_qty()
self.validate_difference_account()
self.set_job_card_data()
self.validate_job_card_item()
self.set_purpose_for_stock_entry()
self.clean_serial_nos()
self.validate_duplicate_serial_no()
Expand Down Expand Up @@ -211,6 +212,24 @@ def set_job_card_data(self):
self.from_bom = 1
self.bom_no = data.bom_no

def validate_job_card_item(self):
if not self.job_card:
return

if cint(frappe.db.get_single_value("Manufacturing Settings", "job_card_excess_transfer")):
return

for row in self.items:
if row.job_card_item:
continue

msg = f"""Row #{0}: The job card item reference
is missing. Kindly create the stock entry
from the job card. If you have added the row manually
then you won't be able to add job card item reference."""

frappe.throw(_(msg))

def validate_work_order_status(self):
pro_doc = frappe.get_doc("Work Order", self.work_order)
if pro_doc.status == "Completed":
Expand Down
7,472 changes: 3,736 additions & 3,736 deletions erpnext/translations/cz.csv

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions erpnext/translations/da-DK.csv
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
apps/erpnext/erpnext/stock/report/stock_ledger/stock_ledger.py +153,'Opening','Åbning'
DocType: Lead,Lead,Bly
apps/erpnext/erpnext/config/selling.py +153,Default settings for selling transactions.,Standardindstillinger for at sælge transaktioner.
DocType: Timesheet,% Amount Billed,% Beløb Billed
DocType: Purchase Order,% Billed,% Billed
,Lead Id,Bly Id
apps/erpnext/erpnext/accounts/doctype/payment_order/payment_order.py +87,{0} {1} created,{0} {1} creado
apps/erpnext/erpnext/accounts/report/accounts_receivable/accounts_receivable.html +237,'Total','Total'
DocType: Selling Settings,Selling Settings,Salg af indstillinger
apps/erpnext/erpnext/accounts/report/gross_profit/gross_profit.py +69,Selling Amount,Selling Beløb
apps/erpnext/erpnext/crm/doctype/opportunity/opportunity.py +192,Lead must be set if Opportunity is made from Lead,"Bly skal indstilles, hvis Opportunity er lavet af Lead"
DocType: Item Default,Default Selling Cost Center,Standard Selling Cost center
apps/erpnext/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py +64,90-Above,90-Above
DocType: Pricing Rule,Selling,Selling
DocType: Sales Order,% Delivered,% Leveres
DocType: Lead,Lead Owner,Bly Owner
apps/erpnext/erpnext/controllers/stock_controller.py +240,{0} {1}: Cost Center is mandatory for Item {2},{0} {1}: Udgiftområde er obligatorisk for varen {2}
apps/erpnext/erpnext/config/selling.py +169,Tax template for selling transactions.,Skat skabelon til at sælge transaktioner.
apps/erpnext/erpnext/controllers/accounts_controller.py +377, or ,o
DocType: Sales Order,% of materials billed against this Sales Order,% Af materialer faktureret mod denne Sales Order
DocType: SMS Center,All Lead (Open),Alle Bly (Open)
apps/erpnext/erpnext/templates/includes/footer/footer_extension.html +7,Get Updates,Hent opdateringer
apps/erpnext/erpnext/controllers/sales_and_purchase_return.py +46,'Update Stock' can not be checked because items are not delivered via {0},"'Opdater lager' kan ikke markeres, varerne ikke leveres via {0}"
apps/erpnext/erpnext/patches/v4_0/create_price_list_if_missing.py +21,Standard Selling,Standard Selling
,Lead Details,Bly Detaljer
DocType: Selling Settings,Settings for Selling Module,Indstillinger for Selling modul
,Lead Name,Bly navn
DocType: Vehicle Service,Half Yearly,Halvdelen Årlig
DocType: Rename Tool,"Attach .csv file with two columns, one for the old name and one for the new name","Vedhæfte .csv fil med to kolonner, en for det gamle navn og et til det nye navn"
'Opening','Åbning'
Lead,Bly,
Default settings for selling transactions.,Standardindstillinger for at sælge transaktioner.
% Amount Billed,% Beløb Billed,
% Billed,% Billed,
Lead Id,Bly Id,
{0} {1} created,{0} {1} creado,
'Total','Total'
Selling Settings,Salg af indstillinger,
Selling Amount,Selling Beløb,
Lead must be set if Opportunity is made from Lead,"Bly skal indstilles, hvis Opportunity er lavet af Lead"
Default Selling Cost Center,Standard Selling Cost center,
90-Above,90-Above,
Selling,Selling,
% Delivered,% Leveres,
Lead Owner,Bly Owner,
{0} {1}: Cost Center is mandatory for Item {2},{0} {1}: Udgiftområde er obligatorisk for varen {2}
Tax template for selling transactions.,Skat skabelon til at sælge transaktioner.
or ,o,
% of materials billed against this Sales Order,% Af materialer faktureret mod denne Sales Order,
All Lead (Open),Alle Bly (Open)
Get Updates,Hent opdateringer,
'Update Stock' can not be checked because items are not delivered via {0},"'Opdater lager' kan ikke markeres, varerne ikke leveres via {0}"
Standard Selling,Standard Selling,
Lead Details,Bly Detaljer,
Settings for Selling Module,Indstillinger for Selling modul,
Lead Name,Bly navn,
Half Yearly,Halvdelen Årlig,
"Attach .csv file with two columns, one for the old name and one for the new name","Vedhæfte .csv fil med to kolonner, en for det gamle navn og et til det nye navn"
94 changes: 47 additions & 47 deletions erpnext/translations/en-US.csv
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
apps/erpnext/erpnext/accounts/report/accounts_receivable/accounts_receivable.html +93,Cheques Required,Checks Required
apps/erpnext/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py +97,Row #{0}: Clearance date {1} cannot be before Cheque Date {2},Row #{0}: Clearance date {1} cannot be before Check Date {2}
apps/erpnext/erpnext/utilities/user_progress.py +210,People who teach at your organisation,People who teach at your organization
apps/erpnext/erpnext/stock/stock_ledger.py +482,"Valuation rate not found for the Item {0}, which is required to do accounting entries for {1} {2}. If the item is transacting as a zero valuation rate item in the {1}, please mention that in the {1} Item table. Otherwise, please create an incoming stock transaction for the item or mention valuation rate in the Item record, and then try submiting/cancelling this entry","Valuation rate not found for the Item {0}, which is required to do accounting entries for {1} {2}. If the item is transacting as a zero valuation rate item in the {1}, please mention that in the {1} Item table. Otherwise, please create an incoming stock transaction for the item or mention valuation rate in the Item record, and then try submitting/canceling this entry"
apps/erpnext/erpnext/hr/doctype/leave_application/leave_application.py +115,"Leave cannot be applied/cancelled before {0}, as leave balance has already been carry-forwarded in the future leave allocation record {1}","Leave cannot be applied/canceled before {0}, as leave balance has already been carry-forwarded in the future leave allocation record {1}"
apps/erpnext/erpnext/support/doctype/warranty_claim/warranty_claim.py +33,Cancel Material Visit {0} before cancelling this Warranty Claim,Cancel Material Visit {0} before canceling this Warranty Claim
apps/erpnext/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py +100,"Appointment cancelled, Please review and cancel the invoice {0}","Appointment canceled, Please review and cancel the invoice {0}"
apps/erpnext/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +37,Outstanding Cheques and Deposits to clear,Outstanding Checks and Deposits to clear
apps/erpnext/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py +103,Appointment cancelled,Appointment canceled
DocType: Payment Entry,Cheque/Reference Date,Check/Reference Date
DocType: Cheque Print Template,Scanned Cheque,Scanned Check
DocType: Cheque Print Template,Cheque Size,Check Size
apps/erpnext/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py +25,Maintenance Status has to be Cancelled or Completed to Submit,Maintenance Status has to be Canceled or Completed to Submit
apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py +486,'Entries' cannot be empty,'Entries' can not be empty
apps/erpnext/erpnext/setup/doctype/company/company.py +84,"Cannot change company's default currency, because there are existing transactions. Transactions must be cancelled to change the default currency.","Cannot change company's default currency, because there are existing transactions. Transactions must be canceled to change the default currency."
apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py +257,Maintenance Visit {0} must be cancelled before cancelling this Sales Order,Maintenance Visit {0} must be canceled before cancelling this Sales Order
apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py +235,Sales Invoice {0} must be cancelled before cancelling this Sales Order,Sales Invoice {0} must be canceled before cancelling this Sales Order
DocType: Bank Reconciliation Detail,Cheque Date,Check Date
apps/erpnext/erpnext/manufacturing/doctype/work_order/work_order.py +249,"Stopped Work Order cannot be cancelled, Unstop it first to cancel","Stopped Work Order cannot be canceled, Unstop it first to cancel"
apps/erpnext/erpnext/buying/doctype/purchase_order/purchase_order.py +164,Material Request {0} is cancelled or stopped,Material Request {0} is canceled or stopped
apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py +188,Closed order cannot be cancelled. Unclose to cancel.,Closed order cannot be canceled. Unclose to cancel.
apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py +246,Maintenance Schedule {0} must be cancelled before cancelling this Sales Order,Maintenance Schedule {0} must be canceled before cancelling this Sales Order
DocType: Accounts Settings,Unlink Payment on Cancellation of Invoice,Unlink Payment on Cancelation of Invoice
apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py +224,Delivery Notes {0} must be cancelled before cancelling this Sales Order,Delivery Notes {0} must be canceled before cancelling this Sales Order
apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py +268,Work Order {0} must be cancelled before cancelling this Sales Order,Work Order {0} must be canceled before cancelling this Sales Order
apps/erpnext/erpnext/config/accounts.py +240,Setup cheque dimensions for printing,Setup check dimensions for printing
apps/erpnext/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +42,Cheques and Deposits incorrectly cleared,Checks and Deposits incorrectly cleared
apps/erpnext/erpnext/stock/doctype/material_request/material_request.py +130,{0} {1} is cancelled so the action cannot be completed,{0} {1} is canceled so the action cannot be completed
apps/erpnext/erpnext/stock/doctype/delivery_note/delivery_note.py +300,Packing Slip(s) cancelled,Packing Slip(s) canceled
DocType: Payment Entry,Cheque/Reference No,Check/Reference No
apps/erpnext/erpnext/assets/doctype/asset/asset.py +297,"Asset cannot be cancelled, as it is already {0}","Asset cannot be canceled, as it is already {0}"
DocType: Bank Reconciliation,Select account head of the bank where cheque was deposited.,Select account head of the bank where check was deposited.
DocType: Cheque Print Template,Cheque Print Template,Check Print Template
apps/erpnext/erpnext/controllers/buying_controller.py +503,{0} {1} is cancelled or closed,{0} {1} is canceled or closed
apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py +165,Quotation {0} is cancelled,Quotation {0} is canceled
apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +367,Timesheet {0} is already completed or cancelled,Timesheet {0} is already completed or canceled
apps/erpnext/erpnext/erpnext_integrations/doctype/gocardless_settings/gocardless_settings.py +136,Payment Cancelled. Please check your GoCardless Account for more details,Payment Canceled. Please check your GoCardless Account for more details
apps/erpnext/erpnext/stock/doctype/item/item.py +840,Item {0} is cancelled,Item {0} is canceled
DocType: Serial No,Is Cancelled,Is Canceled
apps/erpnext/erpnext/stock/doctype/material_request/material_request.py +227,{0} {1} is cancelled or stopped,{0} {1} is canceled or stopped
apps/erpnext/erpnext/setup/setup_wizard/operations/install_fixtures.py +155,Colour,Color
DocType: Bank Reconciliation Detail,Cheque Number,Check Number
apps/erpnext/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.py +65,Cancel Material Visits {0} before cancelling this Maintenance Visit,Cancel Material Visits {0} before canceling this Maintenance Visit
DocType: Employee,Cheque,Check
DocType: Cheque Print Template,Cheque Height,Check Height
DocType: Cheque Print Template,Cheque Width,Check Width
apps/erpnext/erpnext/setup/setup_wizard/operations/install_fixtures.py +135,Wire Transfer,Wire Transfer
Cheques Required,Checks Required,
Row #{0}: Clearance date {1} cannot be before Cheque Date {2},Row #{0}: Clearance date {1} cannot be before Check Date {2}
People who teach at your organisation,People who teach at your organization,
"Valuation rate not found for the Item {0}, which is required to do accounting entries for {1} {2}. If the item is transacting as a zero valuation rate item in the {1}, please mention that in the {1} Item table. Otherwise, please create an incoming stock transaction for the item or mention valuation rate in the Item record, and then try submiting/cancelling this entry","Valuation rate not found for the Item {0}, which is required to do accounting entries for {1} {2}. If the item is transacting as a zero valuation rate item in the {1}, please mention that in the {1} Item table. Otherwise, please create an incoming stock transaction for the item or mention valuation rate in the Item record, and then try submitting/canceling this entry"
"Leave cannot be applied/cancelled before {0}, as leave balance has already been carry-forwarded in the future leave allocation record {1}","Leave cannot be applied/canceled before {0}, as leave balance has already been carry-forwarded in the future leave allocation record {1}"
Cancel Material Visit {0} before cancelling this Warranty Claim,Cancel Material Visit {0} before canceling this Warranty Claim,
"Appointment cancelled, Please review and cancel the invoice {0}","Appointment canceled, Please review and cancel the invoice {0}"
Outstanding Cheques and Deposits to clear,Outstanding Checks and Deposits to clear,
Appointment cancelled,Appointment canceled,
Cheque/Reference Date,Check/Reference Date,
Scanned Cheque,Scanned Check,
Cheque Size,Check Size,
Maintenance Status has to be Cancelled or Completed to Submit,Maintenance Status has to be Canceled or Completed to Submit,
'Entries' cannot be empty,'Entries' can not be empty,
"Cannot change company's default currency, because there are existing transactions. Transactions must be cancelled to change the default currency.","Cannot change company's default currency, because there are existing transactions. Transactions must be canceled to change the default currency."
Maintenance Visit {0} must be cancelled before cancelling this Sales Order,Maintenance Visit {0} must be canceled before cancelling this Sales Order,
Sales Invoice {0} must be cancelled before cancelling this Sales Order,Sales Invoice {0} must be canceled before cancelling this Sales Order,
Cheque Date,Check Date,
"Stopped Work Order cannot be cancelled, Unstop it first to cancel","Stopped Work Order cannot be canceled, Unstop it first to cancel"
Material Request {0} is cancelled or stopped,Material Request {0} is canceled or stopped,
Closed order cannot be cancelled. Unclose to cancel.,Closed order cannot be canceled. Unclose to cancel.
Maintenance Schedule {0} must be cancelled before cancelling this Sales Order,Maintenance Schedule {0} must be canceled before cancelling this Sales Order,
Unlink Payment on Cancellation of Invoice,Unlink Payment on Cancelation of Invoice,
Delivery Notes {0} must be cancelled before cancelling this Sales Order,Delivery Notes {0} must be canceled before cancelling this Sales Order,
Work Order {0} must be cancelled before cancelling this Sales Order,Work Order {0} must be canceled before cancelling this Sales Order,
Setup cheque dimensions for printing,Setup check dimensions for printing,
Cheques and Deposits incorrectly cleared,Checks and Deposits incorrectly cleared,
{0} {1} is cancelled so the action cannot be completed,{0} {1} is canceled so the action cannot be completed,
Packing Slip(s) cancelled,Packing Slip(s) canceled,
Cheque/Reference No,Check/Reference No,
"Asset cannot be cancelled, as it is already {0}","Asset cannot be canceled, as it is already {0}"
Select account head of the bank where cheque was deposited.,Select account head of the bank where check was deposited.
Cheque Print Template,Check Print Template,
{0} {1} is cancelled or closed,{0} {1} is canceled or closed,
Quotation {0} is cancelled,Quotation {0} is canceled,
Timesheet {0} is already completed or cancelled,Timesheet {0} is already completed or canceled,
Payment Cancelled. Please check your GoCardless Account for more details,Payment Canceled. Please check your GoCardless Account for more details,
Item {0} is cancelled,Item {0} is canceled,
Is Cancelled,Is Canceled,
{0} {1} is cancelled or stopped,{0} {1} is canceled or stopped,
Colour,Color,
Cheque Number,Check Number,
Cancel Material Visits {0} before cancelling this Maintenance Visit,Cancel Material Visits {0} before canceling this Maintenance Visit,
Cheque,Check,
Cheque Height,Check Height,
Cheque Width,Check Width,
Wire Transfer,Wire Transfer,
12 changes: 6 additions & 6 deletions erpnext/translations/es-AR.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DocType: Fee Structure,Components,Componentes
apps/erpnext/erpnext/hr/doctype/attendance/attendance.py +31,Employee {0} on Half day on {1},"Empleado {0}, media jornada el día {1}"
DocType: Purchase Invoice Item,Item,Producto
DocType: Payment Entry,Deductions or Loss,Deducciones o Pérdidas
DocType: Cheque Print Template,Cheque Size,Tamaño de Cheque
apps/erpnext/erpnext/utilities/activation.py +128,Make Student Batch,Hacer lotes de Estudiante
Components,Componentes,
Employee {0} on Half day on {1},"Empleado {0}, media jornada el día {1}"
Item,Producto,
Deductions or Loss,Deducciones o Pérdidas,
Cheque Size,Tamaño de Cheque,
Make Student Batch,Hacer lotes de Estudiante,
Loading

0 comments on commit 140cec8

Please sign in to comment.