Comments (8)
Sorry:
I am development a new module (not finished yet... NO TIME )
it create 2 field
1º Days before
2º Virtual date
Virtual date is the today.date + Days before
So, you can custom every contract separately
antelacion = fields.Integer(
string='Dias de antelacion',
default=5,
help="Mete los dias de antelacion con los que quieres ejecutar el cron",
)
virtual_date = fields.Date(
string='Fecha Virtual',
compute='_compute_date'
)
def _compute_date(self):
self.virtual_date = date.today() + timedelta(days=self.antelacion)
@api.model
def cron_recurring_create_invoice(self):
contracts = self.with_context(cron=True).search([
('recurring_invoices', '=', True),
('recurring_next_date', '<=', **virtual_date**),
'|',
('date_end', '=', False),
('date_end', '>=', today),
])
return contracts.recurring_create_invoice()
well .... dont work... i am not an an expert in odoo orm
someone wants finish it??
p.d.
other option is add an action in contract form list, for select all contract you want and execute the cron manually without need to go into form view...
from contract.
This feature will be highly appreciate.
from contract.
@angelmoya @babatoko If you could test/review my PR it would be appreciated. If PR is accepted, i will also forward port it to 11.0 and 12.0.
from contract.
Well, it can be good if it's set as a parameter. Can be done at journal level, company level or system parameter. The second one can be the best balanced maybe.
from contract.
Yes, I was thinking about create X as a system parameter.
from contract.
from contract.
Better by company...
from contract.
I close this issue as it has been done in #282
from contract.
Related Issues (20)
- Issue with auto pricing on contract template lines HOT 1
- Migration to version 17.0 HOT 5
- Error when selected auto renew in contract template HOT 3
- Invoice lines are not assigned with the correct partner_id HOT 2
- Question regarding subscription and contract modules HOT 7
- [16.0] contract: Error migrating from 15.0 to 16.0 HOT 5
- [16.0] Bugs and improvements in subscription_oca HOT 2
- [16.0] Problem with post-period contracts HOT 2
- [16.0][BUG] contract: 'last_date_invoiced' is not calculating correctly on the lines.
- [16.0] contract: Invoices after contract termination HOT 6
- [16.0] subscription_oca: error when creating subscription invoice (manually or cron) with "Next Invoice Date" value is empty
- Reccuring Stopped
- [16.0] Error Group by date end
- [17.0] New module: subscription_oca_purchase HOT 1
- Purpose of refactoring subscription_oca module HOT 17
- [17.0] Bug in subscription_oca
- [17.0] bug in contract HOT 1
- [16.0] Wrong translation HOT 2
- [16.0] Wrong translation HOT 1
- When creating invoice, the last_date_invoice is with wrong date for 2 or more products HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from contract.