finish redmine-6 merge into dev

This commit is contained in:
2026-01-22 20:43:06 -05:00
parent 3c2f1d0edd
commit 1bc9227c7f
2 changed files with 23 additions and 27 deletions

View File

@@ -28,11 +28,7 @@ Redmine::Plugin.register :redmine_qbo do
User.safe_attributes 'employee_id' User.safe_attributes 'employee_id'
TimeEntry.safe_attributes 'billed' TimeEntry.safe_attributes 'billed'
Project.safe_attributes 'customer_id' Project.safe_attributes 'customer_id'
Project.safe_attributes 'vehicle_id'
# We are playing in the sandbox
#Quickbooks.sandbox_mode = true
# set per_page globally # set per_page globally
WillPaginate.per_page = 20 WillPaginate.per_page = 20

View File

@@ -12,33 +12,33 @@ require_dependency 'project'
module Patches module Patches
# Patches Redmine's Projects dynamically. # Patches Redmine's Projects dynamically.
# Adds a relationships # Adds a relationships
module ProjectPatch module ProjectPatch
def self.included(base) # :nodoc: def self.included(base) # :nodoc:
base.extend(ClassMethods) base.extend(ClassMethods)
base.send(:include, InstanceMethods) base.send(:include, InstanceMethods)
# Same as typing in the class # Same as typing in the class
base.class_eval do base.class_eval do
unloadable # Send unloadable so it will not be unloaded in development belongs_to :customer, primary_key: :id
belongs_to :customer, primary_key: :id belongs_to :vehicle, primary_key: :id
belongs_to :vehicle, primary_key: :id end
end end
end
end
module ClassMethods end
module ClassMethods
end
end module InstanceMethods
module InstanceMethods end
end # Add module to Project
Project.send(:include, ProjectPatch)
# Add module to Project
Project.send(:include, ProjectPatch)
end end