cron update sale order lines
This commit is contained in:
parent
56509892e6
commit
4ea0286b52
1 changed files with 10 additions and 0 deletions
|
|
@ -8,6 +8,16 @@ _logger = logging.getLogger(__name__)
|
||||||
class SaleOrder(models.Model):
|
class SaleOrder(models.Model):
|
||||||
_inherit = "sale.order"
|
_inherit = "sale.order"
|
||||||
|
|
||||||
|
def cron_action_update_lines_from_list_price(self):
|
||||||
|
records = self.env["sale.order"].search(
|
||||||
|
[
|
||||||
|
("invoice_status", "!=", "invoiced"),
|
||||||
|
("invoice_status", "!=", "up_to_date"),
|
||||||
|
("state", "!=", "cancel"),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
records.action_update_lines_from_list_price()
|
||||||
|
|
||||||
def action_update_lines_from_list_price(self):
|
def action_update_lines_from_list_price(self):
|
||||||
"""Copy current product list price into sale order lines.
|
"""Copy current product list price into sale order lines.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue