def restore_after_import(self, project): self.company = restore.restore_by(self.company, self._company_ref, project.companies, by=["name"]) self.job = restore.restore_by(self.job, self._job_ref, project.jobs, by=["id", "company.name"])
def restore(self, project): """Restore pointers by UID. Args: project (proj.Project): Embedding project """ super(ArchJob, self).restore(project) self.trade = restore.restore_by(self.trade, self._trade_ref, project.trades) self.cost_group = restore.restore_by(self.cost_group, self._cost_group_ref, project.cost_groups)
def restore_after_import(self, project): """Restore pointers by name/id. Args: project (proj.Project): Embedding project """ super(ArchJob, self).restore_after_import(project) self.trade = restore.restore_by(self.trade, self._trade_ref, project.trades, by=["name"]) self.cost_group = restore.restore_by(self.cost_group, self._cost_group_ref, project.cost_groups, by=["id"])
def restore(self, project): """Restore pointers by UID. Args: project (proj.Project): Embedding project """ self.parent = restore.restore_by(self.parent, self._parent_ref, project.cost_groups)
def restore_after_import(self, project): """Restore pointers by name/id. Args: project (proj.Project): Embedding project """ self.parent = restore.restore_by(self.parent, self._parent_ref, project.cost_groups, by=["id"])
def restore(self, project): self.cost_group = restore.restore_by(self.cost_group, self._cost_group_ref, project.cost_groups) self.trade = restore.restore_by(self.trade, self._trade_ref, project.trades)
def restore(self, project): self.restore_prev_invoices(project.invoices) self.company = restore.restore_by(self.company, self._company_ref, project.companies) self.job = restore.restore_by(self.job, self._job_ref, project.jobs)
def restore_after_import(self, project): self.company = restore.restore_by(self.company, self._company_ref, project.companies, by=["name"])
def restore(self, project): self.company = restore.restore_by(self.company, self._company_ref, project.companies)