diff --git a/agriculture_management_odoo/doc/RELEASE_NOTES.md b/agriculture_management_odoo/doc/RELEASE_NOTES.md
index 13dd51295..2c2718d07 100644
--- a/agriculture_management_odoo/doc/RELEASE_NOTES.md
+++ b/agriculture_management_odoo/doc/RELEASE_NOTES.md
@@ -5,9 +5,8 @@
#### ADD
- Initial commit for agriculture_management_odoo
-
#### 19.11.2022
#### Version 16.0.2.0.0
#### UPDT
-- Updated
+- Update
diff --git a/agriculture_management_odoo/models/vehicle_rental.py b/agriculture_management_odoo/models/vehicle_rental.py
index 2ddd18955..87f09734c 100644
--- a/agriculture_management_odoo/models/vehicle_rental.py
+++ b/agriculture_management_odoo/models/vehicle_rental.py
@@ -26,6 +26,7 @@ class VehicleRental(models.Model):
_name = 'vehicle.rental'
_inherit = ['mail.thread', 'mail.activity.mixin']
_description = 'Vehicle Rental'
+ _rec_name = 'vehicle_id'
vehicle_id = fields.Many2one('vehicle.details', string='Vehicle',
required=True, tracking=True)
diff --git a/agriculture_management_odoo/report/pest_report_template.xml b/agriculture_management_odoo/report/pest_report_template.xml
index 983cad220..9324c9aa7 100644
--- a/agriculture_management_odoo/report/pest_report_template.xml
+++ b/agriculture_management_odoo/report/pest_report_template.xml
@@ -86,11 +86,11 @@
+ t-esc="val[6]"/>
|
+ t-esc="val[5]"/>
|
today:
raise UserError(
_('You could not set the start date or the end date in the future.'))
- if self.date_to:
+ else:
+ ret = ret + """ where crop_requests.request_date >= '""" + str(
+ self.date_from) + """' AND crop_requests.request_date <= '""" \
+ + str(
+ today) + """'"""
+
+ if self.date_to and not self.date_from:
if self.date_to > today:
raise UserError(
_('You could not set the start date or the end date in the future.'))
- if self.date_from >= self.date_to:
- raise UserError(
- _('The start date must be inferior to the end date.'))
-
+ else:
+ ret = ret + """ where crop_requests.request_date <= '""" + str(
+ self.date_to) + """'"""
if self.date_from and self.date_to:
- ret = ret + """ where crop_requests.request_date >= '""" + str(
- self.date_from) + """' AND crop_requests.request_date <= '""" \
- + str(
- self.date_to) + """'"""
+ if self.date_from <= self.date_to:
+ ret = ret + """ where crop_requests.request_date >= '""" + \
+ str(self.date_from) + """' AND crop_requests.request_date <= '""" \
+ + str(self.date_to) + """'"""
+ else:
+ raise UserError(
+ _('The start date must be inferior to the end date.'))
+
self.env.cr.execute(ret)
record = self.env.cr.fetchall()
data = {
diff --git a/agriculture_management_odoo/wizard/pest_report_wiz.py b/agriculture_management_odoo/wizard/pest_report_wiz.py
index ccc49d7a1..4f13f0034 100644
--- a/agriculture_management_odoo/wizard/pest_report_wiz.py
+++ b/agriculture_management_odoo/wizard/pest_report_wiz.py
@@ -32,30 +32,42 @@ class CropReport(models.TransientModel):
def action_pdf_pest_report(self):
ret = """select pest_request.reference, res_partner.name, crop_requests.ref,
- pest_request.disease, pest_details.pest_name,pest_request.pest_quantity,
- pest_request.pest_cost, pest_request.total_cost,pest_request.state from pest_request
+ pest_request.disease, pest_details.pest_name as pest_name,pest_details.pest_cost as cost,pest_request.pest_quantity,
+ pest_request.total_cost,pest_request.state from pest_request
inner join res_partner on pest_request.farmer_id = res_partner.id
inner join crop_requests on crop_requests.id = pest_request.crop_id
inner join pest_details on pest_details.id = pest_request.pest_id"""
today = fields.Date.today()
- if self.date_from:
+ if self.date_from and not self.date_to:
if self.date_from > today:
raise UserError(
_('You could not set the start date or the end date in the future.'))
- if self.date_to:
+ else:
+ ret = ret + ret + """ where pest_request.request_date >= '""" \
+ + str(
+ self.date_from) + """' AND pest_request.request_date <=
+ '""" \
+ + str(
+ today) + """'"""
+ if self.date_to and not self.date_from:
if self.date_to > today:
raise UserError(
_('You could not set the start date or the end date in the future.'))
- if self.date_from >= self.date_to:
- raise UserError(
- _('The start date must be inferior to the end date.'))
+ else:
+ ret = ret + """ where pest_request.request_date <= '""" + str(
+ self.date_to) + """'"""
if self.date_from and self.date_to:
- ret = ret + """ where crop_requests.request_date >= '""" + str(
- self.date_from) + """' AND crop_requests.request_date <= '"""\
- + str(
- self.date_to) + """'"""
+ if self.date_from <= self.date_to:
+ ret = ret + """ where pest_request.request_date >= '""" + \
+ str(self.date_from) + """' AND pest_request.request_date
+ <= '""" \
+ + str(self.date_to) + """'"""
+ else:
+ raise UserError(
+ _('The start date must be inferior to the end date.'))
+
self.env.cr.execute(ret)
record = self.env.cr.fetchall()
data = {
diff --git a/auto_database_backup/static/description/index.html b/auto_database_backup/static/description/index.html
index 3a3583c4d..a31f85e57 100644
--- a/auto_database_backup/static/description/index.html
+++ b/auto_database_backup/static/description/index.html
@@ -1,588 +1,585 @@
-
-
- 
-
-
- Community
-
-
- Enterprise
-
+
+
+ 
+
+
+ Community
+
+
+ Enterprise
+
-
-
-
-
-
-
-
-
-
-
- Automatic
- Database Backup
- Automatic Database
- Backup To
- Local
- Server, Remote Server, Google Drive, Onedrive And Dropbox.
-
- 
-
-
+
+
+
+
+
+
+
+
+
+
+ Automatic
+ Database Backup
+ Automatic Database
+ Backup To
+ Local
+ Server, Remote Server, Google Drive, Onedrive And Dropbox.
+
+ 
+
+
-
- 
-
- Explore This
- Module
+
+ 
+
+ Explore This
+ Module
-
- 
-
- Overview
-
+
+ 
+
+ Overview
+
-
- This module helps to generate backups of your databases automatically on regular interval of times.
- The generated backups can be stored into local storage, ftp server, sftp server, dropbox, Google Drive or
- Onedrive.
- User can enable auto remove option to automatically delete old backups.
- User can enable email notification to be notified about the success and failure of the backup generation
- and storage.
- Using Automatic Database Backup module user can generate and store database backups to multiple
- location.
-
-
-
- This module uses an external python dependency 'dropbox'.Before installing the module install the python package
- first.The required python package can be installed using the following command,
-
-
- pip install dropbox
+
+ This module helps to generate backups of your databases automatically on regular interval of times.
+ The generated backups can be stored into local storage, ftp server, sftp server, dropbox, Google Drive or
+ Onedrive.
+ User can enable auto remove option to automatically delete old backups.
+ User can enable email notification to be notified about the success and failure of the backup generation
+ and storage.
+ Using Automatic Database Backup module user can generate and store database backups to multiple
+ location.
+
+
+ This module uses an external python dependency 'dropbox'.Before installing the module install the python
+ package
+ first.The required python package can be installed using the following command,
+
+ pip install dropbox
+
+
+
-
- 
-
- Features
-
+
+ 
+
+ Features
+
-
-
- 
- Generate Database
+
+
+ 
+ Generate Database
Backups on regular intervals
-
+
-
- 
- Store Backup to
+
+ 
+ Store Backup to
Dropbox
-
+
-
- 
- Store Backup to
+
+ 
+ Store Backup to
Onedrive
-
+
-
- 
- Notify user on success
+
+ 
+ Notify user on
+ success
and failure of backup generation
-
-
-
- 
- Store Backup to Remote
+
+
+
+ 
+ Store Backup to
+ Remote
Server
-
+
-
- 
- Generated backup can be
+
+ 
+ Generated backup can
+ be
stored to Google Drive
-
+
-
- 
- Automatically remove
+
+ 
+ Automatically remove
old backups
-
+
-
- 
-
- Screenshots
-
+
+ 
+
+ Screenshots
+
-
-
-
- Database Backup
- Configuration Menu
-
- Got Setting --> Technical --> Backup Configuration to configure backups
- 
-
-
-
- Crate New Database
- Backup
- Configuration
-
- Enter the database name and master password. specify backup type and destination.
- Enter the backup directory path, if directory does not exist new directory will be created.
- 
-
+
+
+
+ Database Backup
+ Configuration Menu
+
+ Got Setting --> Technical --> Backup Configuration to configure backups
+ 
+
-
- Store Backup to
- Remote
- SFTP Server
-
- Select backup destination as SFTP, enter credentials.
- Test connection button to check whether the connection is successful.
-
- 
-
+
+ Crate New Database
+ Backup
+ Configuration
+
+ Enter the database name and master password. specify backup type and destination.
+ Enter the backup directory path, if directory does not exist new directory will be created.
+ 
+
-
- Store Backup to
- Remote
- FTP Server
- Select backup
- destination
- as FTP, enter credentials.
- Test connection button to check whether the connection is successful.
- 
-
+
+ Store Backup to
+ Remote
+ SFTP Server
+
+ Select backup destination as SFTP, enter credentials.
+ Test connection button to check whether the connection is successful.
+
+ 
+
-
- Store Backup to
- Google
- Drive
- you'll need to create a
- new
- Google API project and enabling the Google Drive API, Go to the Google API Console and log into your
- account.
- While creating the project, for the Redirect URI restrictions, copy your Odoo database URI followed by
- /google_drive/authentication. Example:
- 
- Enable Google Drive
- API
- 
- 
- Create Credentials,
- Follow
- the steps, select Website application for the Application Type.
- 
- Under the Authorized
- JavaScript Origins section, click + Add URI and type your company’s Odoo URL address.
- Under the Authorized redirect URIs section, click + Add URI and type your company’s Odoo URL address
- followed
- by /google_drive/authentication.
- After all the steps are completed, A client ID and Secret will be given, copy the credentials
-
- 
- Configure Backup, Copy
- Client ID and Client Secret from Google Drive API Credentials page into their respective fields.
- 
- Setup Tokens, it will
- be
- redirected to an authorization page.
- 
- 
- Reset the token if
- required.
- 
-
+
+ Store Backup to
+ Remote
+ FTP Server
+ Select backup
+ destination
+ as FTP, enter credentials.
+ Test connection button to check whether the connection is successful.
+ 
+
+
+ Store Backup to
+ Google
+ Drive
+ you'll need to create a
+ new
+ Google API project and enabling the Google Drive API, Go to the Google API Console and log into your
+ account.
+ While creating the project, for the Redirect URI restrictions, copy your Odoo database URI followed by
+ /google_drive/authentication. Example:
+ 
+ Enable Google Drive
+ API
+ 
+ 
+ Create Credentials,
+ Follow
+ the steps, select Website application for the Application Type.
+ 
+ Under the Authorized
+ JavaScript Origins section, click + Add URI and type your company’s Odoo URL address.
+ Under the Authorized redirect URIs section, click + Add URI and type your company’s Odoo URL address
+ followed
+ by /google_drive/authentication.
+ After all the steps are completed, A client ID and Secret will be given, copy the credentials
+
+ 
+ Configure Backup, Copy
+ Client ID and Client Secret from Google Drive API Credentials page into their respective fields.
+ 
+ Setup Tokens, it will
+ be
+ redirected to an authorization page.
+ 
+ 
+ Reset the token if
+ required.
+ 
+
-
- Store Backup to
- Dropbox
-
- Select backup
- destination
- as Dropbox. Enter the App key and App secret.
- you'll need to register a new app in the App
- Console.
- Select Dropbox API app and choose your app's permission (files.content.write and files.content.read
- permissions
- required).
-
- Install python dropbox
- library (pip install dropbox).
- 
- Setup refresh token
- 
- Get the authorization
- code
- and click confirm.
- 
- Reset the refresh token
- if
- required
- 
-
-
- Store Backup to
- Onedrive
-
- Select backup
- destination
- as onedrive. Enter the App key and App secret.
- you'll need to register a new app in the Microsoft
- Azure
- portal.
- While registering the app for the Redirect URI restrictions, copy your Odoo database URI followed by
- /onedrive/authentication. Example:
- 
- Copy the Client ID
- 
- Generate Client
- Secret.
- 
- 
- get onedrive folder ID,
- where need to store the backup files.
- 
- Configure the
- backup
- 
- Setup Tokens, it will
- be
- redirected to an authorization page.
- 
- 
- Reset the token if
- required
-
- 
-
+
+ Store Backup to
+ Dropbox
+
+ Select backup
+ destination
+ as Dropbox. Enter the App key and App secret.
+ you'll need to register a new app in the App
+ Console.
+ Select Dropbox API app and choose your app's permission (files.content.write and files.content.read
+ permissions
+ required).
+
+ Install python dropbox
+ library (pip install dropbox).
+ 
+ Setup refresh token
+ 
+ Get the authorization
+ code
+ and click confirm.
+ 
+ Reset the refresh token
+ if
+ required
+ 
+
-
- Automatically Remove
- Old
- Backups
- TEnable auto remove
- option,
- specify number of days to remove backups.
- 
-
+
+ Store Backup to
+ Onedrive
+
+ Select backup
+ destination
+ as onedrive. Enter the App key and App secret.
+ you'll need to register a new app in the Microsoft
+ Azure
+ portal.
+ While registering the app for the Redirect URI restrictions, copy your Odoo database URI followed by
+ /onedrive/authentication. Example:
+ 
+ Copy the Client ID
+ 
+ Generate Client
+ Secret.
+ 
+ 
+ get onedrive folder ID,
+ where need to store the backup files.
+ 
+ Configure the
+ backup
+ 
+ Setup Tokens, it will
+ be
+ redirected to an authorization page.
+ 
+ 
+ Reset the token if
+ required
+
+ 
+
-
- Notify User on
- Success
- and Failure of Backup Generation
- Enable notify user
- option,
- and select a user to notify. An email notification will be sent to the selected user on
- backup successful and failure.
-
- 
-
+
+ Automatically Remove
+ Old
+ Backups
+ TEnable auto remove
+ option,
+ specify number of days to remove backups.
+ 
+
-
- Successful backup
- notification email
- 
-
+
+ Notify User on
+ Success
+ and Failure of Backup Generation
+ Enable notify user
+ option,
+ and select a user to notify. An email notification will be sent to the selected user on
+ backup successful and failure.
+
+ 
+
-
- Notification email
- when
- backup generation failed
- 
-
+
+ Successful backup
+ notification email
+ 
+
-
- Scheduled Action For
- Generating Backup
- Enable the 'Automatic
- database Backup' scheduled action, and set up the execution interval.
- Based on the scheduled action setup, backups will be generated on regular intervals.
- 
- 
-
+
+ Notification email
+ when
+ backup generation failed
+ 
+
+
+ Scheduled Action For
+ Generating Backup
+ Enable the 'Automatic
+ database Backup' scheduled action, and set up the execution interval.
+ Based on the scheduled action setup, backups will be generated on regular intervals.
+ 
+
+
+
-
- 
-
- Related
- Products
-
+
+ 
+
+ Related
+ Products
+
-
-
- 
-
- Our Services
-
+
+ 
+
+ Our Services
+
-
-
-
- 
-
-
- Odoo
- Customization
-
+
+
+
+ 
+
+
+ Odoo
+ Customization
+
-
-
- 
-
-
- Odoo
- Implementation
-
+
+
+ 
+
+
+ Odoo
+ Implementation
+
-
-
- 
-
-
- Odoo
- Support
-
+
+
+ 
+
+
+ Odoo
+ Support
+
-
-
- 
-
-
- Hire
- Odoo
- Developer
-
+
+
+ 
+
+
+ Hire
+ Odoo
+ Developer
+
-
-
- 
-
-
- Odoo
- Integration
-
+
+
+ 
+
+
+ Odoo
+ Integration
+
-
-
- 
-
-
- Odoo
- Migration
-
+
+
+ 
+
+
+ Odoo
+ Migration
+
-
-
- 
-
-
- Odoo
- Consultancy
-
+
+
+ 
+
+
+ Odoo
+ Consultancy
+
-
-
- 
-
-
- Odoo
- Implementation
-
+
+
+ 
+
+
+ Odoo
+ Implementation
+
-
-
- 
-
-
- Odoo
- Licensing Consultancy
-
+
+
+ 
+
+
+ Odoo
+ Licensing Consultancy
+
@@ -591,178 +588,177 @@
-
- 
-
- Our
- Industries
-
+
+ 
+
+ Our
+ Industries
+
-
-
-
- 
-
- Trading
-
-
- Easily procure
- and
- sell your products
-
-
+
+
+
+ 
+
+ Trading
+
+
+ Easily procure
+ and
+ sell your products
+
+
-
-
- 
-
- POS
-
-
- Easy
- configuration
- and convivial experience
-
-
+
+
+ 
+
+ POS
+
+
+ Easy
+ configuration
+ and convivial experience
+
+
-
-
- 
-
- Education
-
-
- A platform for
- educational management
-
-
+
+
+ 
+
+ Education
+
+
+ A platform for
+ educational management
+
+
-
-
- 
-
- Manufacturing
-
-
- Plan, track and
- schedule your operations
-
-
+
+
+ 
+
+ Manufacturing
+
+
+ Plan, track and
+ schedule your operations
+
+
-
-
- 
-
- E-commerce & Website
-
-
- Mobile
- friendly,
- awe-inspiring product pages
-
-
+
+
+ 
+
+ E-commerce & Website
+
+
+ Mobile
+ friendly,
+ awe-inspiring product pages
+
+
-
-
- 
-
- Service Management
-
-
- Keep track of
- services and invoice
-
-
+
+
+ 
+
+ Service Management
+
+
+ Keep track of
+ services and invoice
+
+
-
-
- 
-
- Restaurant
-
-
- Run your bar or
- restaurant methodically
-
-
+
+
+ 
+
+ Restaurant
+
+
+ Run your bar or
+ restaurant methodically
+
+
-
-
- 
-
- Hotel Management
-
-
- An
- all-inclusive
- hotel management application
-
-
+
+
+ 
+
+ Hotel Management
+
+
+ An
+ all-inclusive
+ hotel management application
+
+
-
- 
-
- Support
-
+
+ 
+
+ Support
+
-
-
-
-
- 
-
-
-
-
-
-
-
- 
-
-
-
+
+
+
+
+
+
+
-
-
- 
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
|